diff options
| author | Alan Mackenzie | 2016-03-30 16:53:36 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2016-03-30 16:53:36 +0000 |
| commit | ed19f207449c43f7f08285ada87ae7a46c61c8d1 (patch) | |
| tree | fc495d64b752f276f1e8dc86427098de80789988 /lib | |
| parent | eabd667a9584fe5bd2422e296d256dceea67debf (diff) | |
| parent | 7c1802f6ffc2704ba8042c7c1c6faa73dfa210d1 (diff) | |
| download | emacs-ed19f207449c43f7f08285ada87ae7a46c61c8d1.tar.gz emacs-ed19f207449c43f7f08285ada87ae7a46c61c8d1.zip | |
Merge branch 'emacs-25' of /home/acm/emacs/emacs.git/emacs-25 into emacs-25
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sys_select.in.h | 19 | ||||
| -rw-r--r-- | lib/time_rz.c | 6 |
2 files changed, 14 insertions, 11 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index f7b260d2ad5..9a2622f9789 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h | |||
| @@ -81,8 +81,9 @@ | |||
| 81 | of 'struct timeval', and no definition of this type. | 81 | of 'struct timeval', and no definition of this type. |
| 82 | Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() | 82 | Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select() |
| 83 | in <sys/time.h>. | 83 | in <sys/time.h>. |
| 84 | But avoid namespace pollution on glibc systems. */ | 84 | But avoid namespace pollution on glibc systems and "unknown type |
| 85 | # ifndef __GLIBC__ | 85 | name" problems on Cygwin. */ |
| 86 | # if !(defined __GLIBC__ || defined __CYGWIN__) | ||
| 86 | # include <sys/time.h> | 87 | # include <sys/time.h> |
| 87 | # endif | 88 | # endif |
| 88 | 89 | ||
| @@ -100,10 +101,11 @@ | |||
| 100 | #endif | 101 | #endif |
| 101 | 102 | ||
| 102 | /* Get definition of 'sigset_t'. | 103 | /* Get definition of 'sigset_t'. |
| 103 | But avoid namespace pollution on glibc systems. | 104 | But avoid namespace pollution on glibc systems and "unknown type |
| 105 | name" problems on Cygwin. | ||
| 104 | Do this after the include_next (for the sake of OpenBSD 5.0) but before | 106 | Do this after the include_next (for the sake of OpenBSD 5.0) but before |
| 105 | the split double-inclusion guard (for the sake of Solaris). */ | 107 | the split double-inclusion guard (for the sake of Solaris). */ |
| 106 | #if !(defined __GLIBC__ && !defined __UCLIBC__) | 108 | #if !((defined __GLIBC__ || defined __CYGWIN__) && !defined __UCLIBC__) |
| 107 | # include <signal.h> | 109 | # include <signal.h> |
| 108 | #endif | 110 | #endif |
| 109 | 111 | ||
| @@ -289,12 +291,15 @@ _GL_WARN_ON_USE (pselect, "pselect is not portable - " | |||
| 289 | # define select rpl_select | 291 | # define select rpl_select |
| 290 | # endif | 292 | # endif |
| 291 | _GL_FUNCDECL_RPL (select, int, | 293 | _GL_FUNCDECL_RPL (select, int, |
| 292 | (int, fd_set *, fd_set *, fd_set *, struct timeval *)); | 294 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 295 | struct timeval *restrict)); | ||
| 293 | _GL_CXXALIAS_RPL (select, int, | 296 | _GL_CXXALIAS_RPL (select, int, |
| 294 | (int, fd_set *, fd_set *, fd_set *, struct timeval *)); | 297 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 298 | struct timeval *restrict)); | ||
| 295 | # else | 299 | # else |
| 296 | _GL_CXXALIAS_SYS (select, int, | 300 | _GL_CXXALIAS_SYS (select, int, |
| 297 | (int, fd_set *, fd_set *, fd_set *, struct timeval *)); | 301 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 302 | struct timeval *restrict)); | ||
| 298 | # endif | 303 | # endif |
| 299 | _GL_CXXALIASWARN (select); | 304 | _GL_CXXALIASWARN (select); |
| 300 | #elif @HAVE_WINSOCK2_H@ | 305 | #elif @HAVE_WINSOCK2_H@ |
diff --git a/lib/time_rz.c b/lib/time_rz.c index bc801275b6d..55b764ea8b3 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c | |||
| @@ -47,8 +47,6 @@ enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; | |||
| 47 | used. */ | 47 | used. */ |
| 48 | enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) }; | 48 | enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) }; |
| 49 | 49 | ||
| 50 | static char const TZ[] = "TZ"; | ||
| 51 | |||
| 52 | /* Magic cookie timezone_t value, for local time. It differs from | 50 | /* Magic cookie timezone_t value, for local time. It differs from |
| 53 | NULL and from all other timezone_t values. Only the address | 51 | NULL and from all other timezone_t values. Only the address |
| 54 | matters; the pointer is never dereferenced. */ | 52 | matters; the pointer is never dereferenced. */ |
| @@ -205,7 +203,7 @@ tzfree (timezone_t tz) | |||
| 205 | static char * | 203 | static char * |
| 206 | getenv_TZ (void) | 204 | getenv_TZ (void) |
| 207 | { | 205 | { |
| 208 | return getenv (TZ); | 206 | return getenv ("TZ"); |
| 209 | } | 207 | } |
| 210 | #endif | 208 | #endif |
| 211 | 209 | ||
| @@ -213,7 +211,7 @@ getenv_TZ (void) | |||
| 213 | static int | 211 | static int |
| 214 | setenv_TZ (char const *tz) | 212 | setenv_TZ (char const *tz) |
| 215 | { | 213 | { |
| 216 | return tz ? setenv (TZ, tz, 1) : unsetenv (TZ); | 214 | return tz ? setenv ("TZ", tz, 1) : unsetenv ("TZ"); |
| 217 | } | 215 | } |
| 218 | #endif | 216 | #endif |
| 219 | 217 | ||