aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlan Mackenzie2016-03-30 16:53:36 +0000
committerAlan Mackenzie2016-03-30 16:53:36 +0000
commited19f207449c43f7f08285ada87ae7a46c61c8d1 (patch)
treefc495d64b752f276f1e8dc86427098de80789988 /lib
parenteabd667a9584fe5bd2422e296d256dceea67debf (diff)
parent7c1802f6ffc2704ba8042c7c1c6faa73dfa210d1 (diff)
downloademacs-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.h19
-rw-r--r--lib/time_rz.c6
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. */
48enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) }; 48enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - offsetof (struct tm_zone, abbrs) };
49 49
50static 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)
205static char * 203static char *
206getenv_TZ (void) 204getenv_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)
213static int 211static int
214setenv_TZ (char const *tz) 212setenv_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