Do only one call to GetVersionEx in the common case.
[pspp] / lib / time.in.h
index 4d5cab8dafae71e09edf90e1e44ee1f34d8859fc..e8e7c197f6d6318e95eed4c52bd0895e31f9b67e 100644 (file)
@@ -1,6 +1,6 @@
 /* A more-standard <time.h>.
 
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    along with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
 /* Don't get in the way of glibc when it includes time.h merely to
    declare a few standard symbols, rather than to declare all the
    symbols.  Also, Solaris 8 <time.h> eventually includes itself
@@ -33,6 +37,9 @@
 
 # @INCLUDE_NEXT@ @NEXT_TIME_H@
 
+/* NetBSD 5.0 mis-defines NULL.  */
+#include <stddef.h>
+
 # ifdef __cplusplus
 extern "C" {
 # endif
@@ -62,6 +69,12 @@ struct timespec
 int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
 # endif
 
+/* Return the 'time_t' representation of TP and normalize TP.  */
+# if @REPLACE_MKTIME@
+#  define mktime rpl_mktime
+extern time_t mktime (struct tm *__tp);
+# endif
+
 /* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
    <http://www.opengroup.org/susv3xsh/localtime_r.html> and
    <http://www.opengroup.org/susv3xsh/gmtime_r.html>.  */