1#ifndef PRIVATE_H
2
3#define PRIVATE_H
4
5/* Stuff moved from Makefile.inc to reduce clutter */
6#ifndef TM_GMTOFF
7#define TM_GMTOFF tm_gmtoff
8#define TM_ZONE tm_zone
9#define STD_INSPIRED 1
10#define PCTS 1
11#define HAVE_LONG_DOUBLE 1
12#define TZDIR "/usr/share/zoneinfo"
13#endif /* ndef TM_GMTOFF */
14
15/*
16** This header is for use ONLY with the time conversion code.
17** There is no guarantee that it will remain unchanged,
18** or that it will remain at all.
19** Do NOT copy it to any system include directory.
20** Thank you!
21*/
22
23/*
24** ID
25*/
26
27#ifndef lint
28#ifndef NOID
29static char privatehid[] = "@(#)private.h 7.5";
30#endif /* !defined NOID */
31#endif /* !defined lint */
32
33/*
34** const
35*/
36
37#ifndef const
38#ifndef __STDC__
39#define const
40#endif /* !defined __STDC__ */
41#endif /* !defined const */
42
43/*
44** void
45*/
46
47#ifndef void
48#ifndef __STDC__
49#ifndef vax
50#ifndef sun
51#define void char
52#endif /* !defined sun */
53#endif /* !defined vax */
54#endif /* !defined __STDC__ */
55#endif /* !defined void */
56
57/*
58** P((args))
59*/
60
61#ifndef P
62#ifdef __STDC__
63#define P(x) x
64#endif /* defined __STDC__ */
65#ifndef __STDC__
66#define ASTERISK *
67#define P(x) ( /ASTERISK x ASTERISK/ )
68#endif /* !defined __STDC__ */
69#endif /* !defined P */
70
71/*
72** genericptr_t
73*/
74
75#ifdef __STDC__
76typedef void * genericptr_t;
77#endif /* defined __STDC__ */
78#ifndef __STDC__
79typedef char * genericptr_t;
80#endif /* !defined __STDC__ */
81
82#include "sys/types.h" /* for time_t */
83#include "stdio.h"
84#include "ctype.h"
85#include "errno.h"
86#include "string.h"
87#include "limits.h" /* for CHAR_BIT */
88#ifndef _TIME_
89#include "time.h"
90#endif /* !defined _TIME_ */
91
92#ifndef remove
93extern int unlink P((const char * filename));
94#define remove unlink
95#endif /* !defined remove */
96
97#ifndef FILENAME_MAX
98
99#ifndef MAXPATHLEN
100#ifdef unix
101#include "sys/param.h"
102#endif /* defined unix */
103#endif /* !defined MAXPATHLEN */
104
105#ifdef MAXPATHLEN
106#define FILENAME_MAX MAXPATHLEN
107#endif /* defined MAXPATHLEN */
108#ifndef MAXPATHLEN
109#define FILENAME_MAX 1024 /* Pure guesswork */
110#endif /* !defined MAXPATHLEN */
111
112#endif /* !defined FILENAME_MAX */
113
114#ifndef EXIT_SUCCESS
115#define EXIT_SUCCESS 0
116#endif /* !defined EXIT_SUCCESS */
117
118#ifndef EXIT_FAILURE
119#define EXIT_FAILURE 1
120#endif /* !defined EXIT_FAILURE */
121
122#ifdef __STDC__
123
124#define alloc_size_t size_t
125#define qsort_size_t size_t
126#define fwrite_size_t size_t
127
128#endif /* defined __STDC__ */
129#ifndef __STDC__
130
131#ifndef alloc_size_t
132#define alloc_size_t unsigned
133#endif /* !defined alloc_size_t */
134
135#ifndef qsort_size_t
136#ifdef USG
137#define qsort_size_t unsigned
138#endif /* defined USG */
139#ifndef USG
140#define qsort_size_t int
141#endif /* !defined USG */
142#endif /* !defined qsort_size_t */
143
144#ifndef fwrite_size_t
145#define fwrite_size_t int
146#endif /* !defined fwrite_size_t */
147
148#ifndef USG
149extern char * sprintf P((char * buf, const char * format, ...));
150#endif /* !defined USG */
151
152#endif /* !defined __STDC__ */
153
154/*
155** Ensure that these are declared--redundantly declaring them shouldn't hurt.
156*/
157
158extern char * getenv P((const char * name));
159extern genericptr_t malloc P((alloc_size_t size));
160extern genericptr_t calloc P((alloc_size_t nelem, alloc_size_t elsize));
161extern genericptr_t realloc P((genericptr_t oldptr, alloc_size_t newsize));
162
163#ifdef USG
164extern void exit P((int s));
165extern void qsort P((genericptr_t base, qsort_size_t nelem,
166 qsort_size_t elsize, int (*comp)()));
167extern void perror P((const char * string));
168extern void free P((char * buf));
169#endif /* defined USG */
170
171#ifndef TRUE
172#define TRUE 1
173#endif /* !defined TRUE */
174
175#ifndef FALSE
176#define FALSE 0
177#endif /* !defined FALSE */
178
179#ifndef INT_STRLEN_MAXIMUM
180/*
181** 302 / 1000 is log10(2.0) rounded up.
182** Subtract one for the sign bit;
183** add one for integer division truncation;
184** add one more for a minus sign.
185*/
186#define INT_STRLEN_MAXIMUM(type) \
187 ((sizeof(type) * CHAR_BIT - 1) * 302 / 1000 + 2)
188#endif /* !defined INT_STRLEN_MAXIMUM */
189
190/*
191** UNIX is a registered trademark of AT&T.
192** VAX is a trademark of Digital Equipment Corporation.
193*/
194
195#endif /* !defined PRIVATE_H */
2
3#define PRIVATE_H
4
5/* Stuff moved from Makefile.inc to reduce clutter */
6#ifndef TM_GMTOFF
7#define TM_GMTOFF tm_gmtoff
8#define TM_ZONE tm_zone
9#define STD_INSPIRED 1
10#define PCTS 1
11#define HAVE_LONG_DOUBLE 1
12#define TZDIR "/usr/share/zoneinfo"
13#endif /* ndef TM_GMTOFF */
14
15/*
16** This header is for use ONLY with the time conversion code.
17** There is no guarantee that it will remain unchanged,
18** or that it will remain at all.
19** Do NOT copy it to any system include directory.
20** Thank you!
21*/
22
23/*
24** ID
25*/
26
27#ifndef lint
28#ifndef NOID
29static char privatehid[] = "@(#)private.h 7.5";
30#endif /* !defined NOID */
31#endif /* !defined lint */
32
33/*
34** const
35*/
36
37#ifndef const
38#ifndef __STDC__
39#define const
40#endif /* !defined __STDC__ */
41#endif /* !defined const */
42
43/*
44** void
45*/
46
47#ifndef void
48#ifndef __STDC__
49#ifndef vax
50#ifndef sun
51#define void char
52#endif /* !defined sun */
53#endif /* !defined vax */
54#endif /* !defined __STDC__ */
55#endif /* !defined void */
56
57/*
58** P((args))
59*/
60
61#ifndef P
62#ifdef __STDC__
63#define P(x) x
64#endif /* defined __STDC__ */
65#ifndef __STDC__
66#define ASTERISK *
67#define P(x) ( /ASTERISK x ASTERISK/ )
68#endif /* !defined __STDC__ */
69#endif /* !defined P */
70
71/*
72** genericptr_t
73*/
74
75#ifdef __STDC__
76typedef void * genericptr_t;
77#endif /* defined __STDC__ */
78#ifndef __STDC__
79typedef char * genericptr_t;
80#endif /* !defined __STDC__ */
81
82#include "sys/types.h" /* for time_t */
83#include "stdio.h"
84#include "ctype.h"
85#include "errno.h"
86#include "string.h"
87#include "limits.h" /* for CHAR_BIT */
88#ifndef _TIME_
89#include "time.h"
90#endif /* !defined _TIME_ */
91
92#ifndef remove
93extern int unlink P((const char * filename));
94#define remove unlink
95#endif /* !defined remove */
96
97#ifndef FILENAME_MAX
98
99#ifndef MAXPATHLEN
100#ifdef unix
101#include "sys/param.h"
102#endif /* defined unix */
103#endif /* !defined MAXPATHLEN */
104
105#ifdef MAXPATHLEN
106#define FILENAME_MAX MAXPATHLEN
107#endif /* defined MAXPATHLEN */
108#ifndef MAXPATHLEN
109#define FILENAME_MAX 1024 /* Pure guesswork */
110#endif /* !defined MAXPATHLEN */
111
112#endif /* !defined FILENAME_MAX */
113
114#ifndef EXIT_SUCCESS
115#define EXIT_SUCCESS 0
116#endif /* !defined EXIT_SUCCESS */
117
118#ifndef EXIT_FAILURE
119#define EXIT_FAILURE 1
120#endif /* !defined EXIT_FAILURE */
121
122#ifdef __STDC__
123
124#define alloc_size_t size_t
125#define qsort_size_t size_t
126#define fwrite_size_t size_t
127
128#endif /* defined __STDC__ */
129#ifndef __STDC__
130
131#ifndef alloc_size_t
132#define alloc_size_t unsigned
133#endif /* !defined alloc_size_t */
134
135#ifndef qsort_size_t
136#ifdef USG
137#define qsort_size_t unsigned
138#endif /* defined USG */
139#ifndef USG
140#define qsort_size_t int
141#endif /* !defined USG */
142#endif /* !defined qsort_size_t */
143
144#ifndef fwrite_size_t
145#define fwrite_size_t int
146#endif /* !defined fwrite_size_t */
147
148#ifndef USG
149extern char * sprintf P((char * buf, const char * format, ...));
150#endif /* !defined USG */
151
152#endif /* !defined __STDC__ */
153
154/*
155** Ensure that these are declared--redundantly declaring them shouldn't hurt.
156*/
157
158extern char * getenv P((const char * name));
159extern genericptr_t malloc P((alloc_size_t size));
160extern genericptr_t calloc P((alloc_size_t nelem, alloc_size_t elsize));
161extern genericptr_t realloc P((genericptr_t oldptr, alloc_size_t newsize));
162
163#ifdef USG
164extern void exit P((int s));
165extern void qsort P((genericptr_t base, qsort_size_t nelem,
166 qsort_size_t elsize, int (*comp)()));
167extern void perror P((const char * string));
168extern void free P((char * buf));
169#endif /* defined USG */
170
171#ifndef TRUE
172#define TRUE 1
173#endif /* !defined TRUE */
174
175#ifndef FALSE
176#define FALSE 0
177#endif /* !defined FALSE */
178
179#ifndef INT_STRLEN_MAXIMUM
180/*
181** 302 / 1000 is log10(2.0) rounded up.
182** Subtract one for the sign bit;
183** add one for integer division truncation;
184** add one more for a minus sign.
185*/
186#define INT_STRLEN_MAXIMUM(type) \
187 ((sizeof(type) * CHAR_BIT - 1) * 302 / 1000 + 2)
188#endif /* !defined INT_STRLEN_MAXIMUM */
189
190/*
191** UNIX is a registered trademark of AT&T.
192** VAX is a trademark of Digital Equipment Corporation.
193*/
194
195#endif /* !defined PRIVATE_H */