|
|
1.1 root 1: #ifndef __COMMON___TIME_H__
2: #define __COMMON___TIME_H__
3:
4: /*
5: * This internal header file is intended as the sole point of definition for
6: * the internal data type "__time_t", exactly equivalent to the ISO C data
7: * type "time_t" but given an internal name so that header files may refer
8: * to the type without exporting the user-level type unnecessarily.
9: *
10: * The System V ABI and the iBCS2 specification set define "time_t" as a long.
11: * A POSIX.1 system is permitted to use "unsigned long" to extend the range of
12: * time values since the POSIX.1 epoch, since conforming applications should
13: * be using ((time_t) -1) to detect errors.
14: *
15: * For now, we resolve this conflict by use of the _POSIX_SOURCE feature-test
16: * macro. If _POSIX_SOURCE is defined, then we use the "unsigned long" form as
17: * the client has contracted us in a POSIX guise.
18: */
19:
20: #if _POSIX_SOURCE
21:
22: typedef unsigned long __time_t;
23:
24: #else
25:
26: typedef long __time_t;
27:
28: #endif
29:
30:
31: #endif /* ! defined (__COMMON___TIME_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.