mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-09-01 02:34:55 +00:00
* lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
a split double-inclusion guard. Needed for cygwin, where <sys/time.h> includes <cygwin/sys_time.h> which includes <sys/select.h> which include <sys/time.h>. Reported by Eric Blake.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2007-07-06 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* lib/sys_time_.h: Use a recursion-safe inclusion guard rather than
|
||||
a split double-inclusion guard. Needed for cygwin, where <sys/time.h>
|
||||
includes <cygwin/sys_time.h> which includes <sys/select.h> which
|
||||
include <sys/time.h>.
|
||||
Reported by Eric Blake.
|
||||
|
||||
2007-07-06 Eric Blake <ebb9@byu.net>
|
||||
|
||||
Fix testing canonicalize on cygwin.
|
||||
|
||||
+19
-15
@@ -18,31 +18,35 @@
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
#ifndef _GL_SYS_TIME_H
|
||||
#if defined _GL_SYS_TIME_H
|
||||
|
||||
/* Simply delegate to the system's header, without adding anything. */
|
||||
# if @HAVE_SYS_TIME_H@
|
||||
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
|
||||
# endif
|
||||
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#if @HAVE_SYS_TIME_H@
|
||||
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
|
||||
#else
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
#ifndef _GL_SYS_TIME_H
|
||||
#define _GL_SYS_TIME_H
|
||||
# define _GL_SYS_TIME_H
|
||||
|
||||
#if ! @HAVE_STRUCT_TIMEVAL@
|
||||
# if @HAVE_SYS_TIME_H@
|
||||
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
|
||||
# if ! @HAVE_STRUCT_TIMEVAL@
|
||||
struct timeval
|
||||
{
|
||||
time_t tv_sec;
|
||||
long int tv_usec;
|
||||
};
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#if @REPLACE_GETTIMEOFDAY@
|
||||
# undef gettimeofday
|
||||
# define gettimeofday rpl_gettimeofday
|
||||
# if @REPLACE_GETTIMEOFDAY@
|
||||
# undef gettimeofday
|
||||
# define gettimeofday rpl_gettimeofday
|
||||
int gettimeofday (struct timeval *restrict, void *restrict);
|
||||
#endif
|
||||
# endif
|
||||
|
||||
#endif /* _GL_SYS_TIME_H */
|
||||
#endif /* _GL_SYS_TIME_H */
|
||||
|
||||
Reference in New Issue
Block a user