summaryrefslogtreecommitdiff
path: root/lib/time.in.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-02-14 11:36:25 +0100
committerLudovic Courtès <ludo@gnu.org>2011-02-14 11:36:25 +0100
commit49114fd43de833c0724fbb0b6dc9ca639d1ab74f (patch)
treebd33e1612cbbc37218ff18a229ff603018d2d5d5 /lib/time.in.h
parentd9a00aa53612b97b11847cfc03647a3ab54b2a48 (diff)
downloadguile-49114fd43de833c0724fbb0b6dc9ca639d1ab74f.tar.gz
Update Gnulib; add new modules.
This updates Gnulib to v0.0-4889-ge375fe3. * m4/gnulib-cache.m4: Add `accept', `bind', `close', `connect', `getpeername', `getsockname', `getsockopt', `listen', `malloc', `malloca', `recv', `recvfrom', `send', `sendto', `setsockopt', `shutdown', `socket', and `sockets', requested by Jan Nieuwenhuizen <janneke-list@xs4all.nl> for cross-MinGW32 builds. Add `trunc', requested by Mark H Weaver <mhw@netris.org>.
Diffstat (limited to 'lib/time.in.h')
-rw-r--r--lib/time.in.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/time.in.h b/lib/time.in.h
index e2974cdca..afccc78c0 100644
--- a/lib/time.in.h
+++ b/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2010 Free Software Foundation, Inc.
+ Copyright (C) 2007-2011 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -69,13 +69,16 @@
extern "C" {
# endif
-# undef timespec
-# define timespec rpl_timespec
+# if !GNULIB_defined_struct_timespec
+# undef timespec
+# define timespec rpl_timespec
struct timespec
{
time_t tv_sec;
long int tv_nsec;
};
+# define GNULIB_defined_struct_timespec 1
+# endif
# ifdef __cplusplus
}
@@ -84,6 +87,7 @@ struct timespec
# endif
# endif
+# if !GNULIB_defined_struct_time_t_must_be_integral
/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
time_t to be an integer type, even though C99 permits floating
point. We don't know of any implementation that uses floating
@@ -92,6 +96,8 @@ struct timespec
struct __time_t_must_be_integral {
unsigned int __floating_time_t_unsupported : (time_t) 1;
};
+# define GNULIB_defined_struct_time_t_must_be_integral 1
+# endif
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
return -1 and store the remaining time into RMTP. See
@@ -147,7 +153,7 @@ _GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result));
# else
-# if ! @HAVE_LOCALTIME_R@
+# if ! @HAVE_DECL_LOCALTIME_R@
_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result)
_GL_ARG_NONNULL ((1, 2)));
@@ -155,7 +161,9 @@ _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result));
# endif
+# if @HAVE_DECL_LOCALTIME_R@
_GL_CXXALIASWARN (localtime_r);
+# endif
# if @REPLACE_LOCALTIME_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef gmtime_r
@@ -167,7 +175,7 @@ _GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result));
# else
-# if ! @HAVE_LOCALTIME_R@
+# if ! @HAVE_DECL_LOCALTIME_R@
_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result)
_GL_ARG_NONNULL ((1, 2)));
@@ -175,7 +183,9 @@ _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
struct tm *restrict __result));
# endif
+# if @HAVE_DECL_LOCALTIME_R@
_GL_CXXALIASWARN (gmtime_r);
+# endif
# endif
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store