diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sys_select.in.h | 9 | ||||
| -rw-r--r-- | lib/time_rz.c | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index f7b260d2ad5..a557e04ab5d 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h | |||
| @@ -289,12 +289,15 @@ _GL_WARN_ON_USE (pselect, "pselect is not portable - " | |||
| 289 | # define select rpl_select | 289 | # define select rpl_select |
| 290 | # endif | 290 | # endif |
| 291 | _GL_FUNCDECL_RPL (select, int, | 291 | _GL_FUNCDECL_RPL (select, int, |
| 292 | (int, fd_set *, fd_set *, fd_set *, struct timeval *)); | 292 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 293 | struct timeval *restrict)); | ||
| 293 | _GL_CXXALIAS_RPL (select, int, | 294 | _GL_CXXALIAS_RPL (select, int, |
| 294 | (int, fd_set *, fd_set *, fd_set *, struct timeval *)); | 295 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 296 | struct timeval *restrict)); | ||
| 295 | # else | 297 | # else |
| 296 | _GL_CXXALIAS_SYS (select, int, | 298 | _GL_CXXALIAS_SYS (select, int, |
| 297 | (int, fd_set *, fd_set *, fd_set *, struct timeval *)); | 299 | (int, fd_set *restrict, fd_set *restrict, fd_set *restrict, |
| 300 | struct timeval *restrict)); | ||
| 298 | # endif | 301 | # endif |
| 299 | _GL_CXXALIASWARN (select); | 302 | _GL_CXXALIASWARN (select); |
| 300 | #elif @HAVE_WINSOCK2_H@ | 303 | #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 | ||