File: z-time.h

package info (click to toggle)
unzip 5.40-1
  • links: PTS
  • area: non-free
  • in suites: potato
  • size: 4,120 kB
  • ctags: 5,900
  • sloc: ansic: 40,977; cpp: 3,778; makefile: 1,384; asm: 1,228; sh: 133
file content (68 lines) | stat: -rw-r--r-- 1,972 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef __amiga_z_time_h
#define __amiga_z_time_h

/* A <time.h> replacement for use with time_lib.c */
/* Usage: * Define (or Undefine) USE_TIME_LIB below             */
/*        * Replace any <time.h> includes by "amiga/z-time.h"   */

/* First of all: Select whether to use time_lib functions or not */
#if 1
#  ifndef USE_TIME_LIB
#  define USE_TIME_LIB
#  endif
#else
#  ifdef USE_TIME_LIB
#  undef USE_TIME_LIB
#  endif
#endif

#ifdef USE_TIME_LIB
   /* constants needed everywhere */
#  define MAXTIMEZONELEN 16
#  ifndef DEFAULT_TZ_STR
#    define DEFAULT_TZ_STR "EST5EDT" /* US East Coast is the usual default */
#  endif

   /* define time_t where needed (everywhere but amiga/time_lib.c) */
#  if defined(__SASC) && defined(NO_TIME_H) && !defined(__amiga_time_lib_c)
     typedef unsigned long time_t;  /* override sas/c's time_t */
#    define _TIME_T        1        /* mark it as already defined */
#    define _COMMTIME_H             /* do not include sys/commtime.h */
#  endif

#  ifndef NO_TIME_H
#    include <time.h>               /* time_lib.c uses NO_TIME_H */
#  endif

   /* adjust included time.h */
#  ifdef __SASC
     /* tz[sd]tn arrays have different length now: need different names */
#    define __tzstn         tzstn
#    define __tzdtn         tzdtn
     /* prevent other possible name conflicts */
#    define __nextdstchange nextdstchange
#    define __stdoffset     stdoffset
#    define __dstoffset     dstoffset

#    ifndef __amiga_time_lib_c
#      ifdef TZ
#        undef TZ                       /* defined in sas/c time.h */
#      endif TZ
#      define TZ  DEFAULT_TZ_STR        /* redefine TZ to default timezone */
       extern char __tzstn[MAXTIMEZONELEN];
       extern char __tzdtn[MAXTIMEZONELEN];
#    endif
#  endif /* __SASC */

#  ifdef AZTEC_C
     void tzset(void);
#  endif

#else /* ?USE_TIME_LIB */

#  ifndef NO_TIME_H
#    include <time.h>
#  endif
#endif /* !USE_TIME_LIB */

#endif /* __amiga_z_time_h */