aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'time/time.h')
-rw-r--r--time/time.h43
1 files changed, 41 insertions, 2 deletions
diff --git a/time/time.h b/time/time.h
index 184f4eda10..f60599d2cb 100644
--- a/time/time.h
+++ b/time/time.h
@@ -95,6 +95,13 @@ struct timespec
#undef __need_timespec
+/* Value used for `tm_' field in `struct tmx' if describing the local
+ time. */
+#define _LOCALTIME (0x7fffffff)
+
+/* Value used for `tm_leapsecond' field if the number cannot be computed. */
+#define _NO_LEAP_SECONDS (0x7fffffff)
+
#ifdef _TIME_H
/* Used by other time functions. */
@@ -119,10 +126,36 @@ struct tm
# endif
};
-#endif /* <time.h> included. */
+#ifdef __USE_ISOC9X
+/* Extended form of `struct tm' defined in ISO C 9X. */
+struct tmx
+{
+ int tm_sec; /* Seconds. [0-60] (1 leap second) */
+ int tm_min; /* Minutes. [0-59] */
+ int tm_hour; /* Hours. [0-23] */
+ int tm_mday; /* Day. [1-31] */
+ int tm_mon; /* Month. [0-11] */
+ int tm_year; /* Year - 1900. */
+ int tm_wday; /* Day of week. [0-6] */
+ int tm_yday; /* Days in year.[0-365] */
+ int tm_isdst; /* DST. [-1/0/1]*/
+
+# ifdef __USE_BSD
+ long int tm_gmtoff; /* Seconds east of UTC. */
+# else
+ long int __tm_gmtoff; /* Seconds east of UTC. */
+# endif
+ __const char *__tm_zonestr; /* Timezone abbreviation. */
+
+ int tm_version; /* Version number. */
+ int tm_zone; /* Minutes offset from UTC [-1439-1439] */
+ int tm_leapsecs; /* Number of leap seconds applied. */
+ void *tm_ext; /* Extension block. */
+ size_t tm_extlen; /* Size of the extension block. */
+};
+#endif
-#ifdef _TIME_H
/* Time used by the program so far (user time + system time).
The result / CLOCKS_PER_SECOND is program time in seconds. */
extern clock_t clock __P ((void));
@@ -145,6 +178,12 @@ extern time_t __mktime_internal __P ((struct tm *__tp,
struct tm *),
time_t *__offset));
+#ifdef __USE_ISOC9X
+/* Return the `time_t' representation of TP and normalize TP, taking
+ account for the extra members in `struct tmx'. */
+extern time_t mkxtime __P ((struct tmx *__tp));
+#endif
+
/* Format TP into S according to FORMAT.
Write no more than MAXSIZE characters and return the number