bump standards-version
[gnulib.git] / doc / posix-functions / gettimeofday.texi
1 @node gettimeofday
2 @section @code{gettimeofday}
3 @findex gettimeofday
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html}
6
7 Gnulib module: gettimeofday
8
9 Portability problems fixed by Gnulib:
10 @itemize
11 @item
12 This function is missing on some platforms:
13 mingw, MSVC 9.
14 @item
15 This function is declared with a nonstandard function prototype (only one
16 argument, or ``...'' after the first argument) on some platforms.
17 @item
18 On some platforms, the second argument has type @code{struct
19 timezone*} rather than @code{void *}, making it an error to redeclare
20 the function with the POSIX signature:
21 glibc.
22 However, rather than penalize these systems with a replacement
23 function, gnulib defines @code{GETTIMEOFDAY_TIMEZONE} to the
24 appropriate type for use in avoiding a compiler warning if assigning
25 @code{gettimeofday} to a function pointer.
26 @item
27 On some platforms, @code{gettimeofday} clobbers the buffer in which
28 @code{localtime} returns its result:
29 MacOS X 10.0.
30 @end itemize
31
32 Portability problems not fixed by Gnulib:
33 @itemize
34 @item
35 Behavior is non-portable if the second argument to @code{gettimeofday}
36 is not @code{NULL}.
37 @end itemize