00001
00002
00003 #ifndef PRIVATE_H
00004
00005 #define PRIVATE_H
00006
00007
00008
00009
00010
00011
00012 #ifndef __CYGWIN__
00013 #ifndef TM_GMTOFF
00014 #define TM_GMTOFF tm_gmtoff
00015 #define TM_ZONE tm_zone
00016 #endif
00017 #define STD_INSPIRED 1
00018 #define PCTS 1
00019 #define HAVE_LONG_DOUBLE 1
00020 #define HAVE_STRERROR 1
00021 #define HAVE_UNISTD_H 1
00022 #define LOCALE_HOME _PATH_LOCALE
00023 #ifdef SOLARIS
00024 #define TZDIR "/usr/share/lib/zoneinfo"
00025 #else
00026 #define TZDIR "/usr/share/zoneinfo"
00027 #endif
00028 #endif
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef lint
00043 #ifndef NOID
00044
00045
00046
00047 #endif
00048 #endif
00049
00050
00051
00052
00053
00054
00055 #ifndef HAVE_ADJTIME
00056 #define HAVE_ADJTIME 1
00057 #endif
00058
00059 #ifndef HAVE_GETTEXT
00060 #define HAVE_GETTEXT 0
00061 #endif
00062
00063 #ifndef HAVE_SETTIMEOFDAY
00064 #define HAVE_SETTIMEOFDAY 3
00065 #endif
00066
00067 #ifndef HAVE_STRERROR
00068 #define HAVE_STRERROR 0
00069 #endif
00070
00071 #ifndef HAVE_UNISTD_H
00072 #define HAVE_UNISTD_H 1
00073 #endif
00074
00075 #ifndef HAVE_UTMPX_H
00076 #define HAVE_UTMPX_H 0
00077 #endif
00078
00079 #ifndef LOCALE_HOME
00080 #define LOCALE_HOME "/usr/lib/locale"
00081 #endif
00082
00083
00084
00085
00086
00087 #include "sys/types.h"
00088 #include "stdio.h"
00089 #include "errno.h"
00090 #include "string.h"
00091 #include "limits.h"
00092 #include "time.h"
00093 #include "stdlib.h"
00094
00095 #if HAVE_GETTEXT - 0
00096 #include "libintl.h"
00097 #endif
00098
00099 #if HAVE_UNISTD_H - 0
00100 #include "unistd.h"
00101 #endif
00102
00103 #if !(HAVE_UNISTD_H - 0)
00104 #ifndef F_OK
00105 #define F_OK 0
00106 #endif
00107 #ifndef R_OK
00108 #define R_OK 4
00109 #endif
00110 #endif
00111
00112
00113 #define is_digit(c) ((unsigned)(c) - '0' <= 9)
00114
00115
00116
00117
00118
00119 #ifndef P
00120 #ifdef __STDC__
00121 #define P(x) x
00122 #endif
00123 #ifndef __STDC__
00124 #define P(x) ()
00125 #endif
00126 #endif
00127
00128
00129
00130
00131
00132 #ifndef FILENAME_MAX
00133
00134 #ifndef MAXPATHLEN
00135 #ifdef unix
00136 #include "sys/param.h"
00137 #endif
00138 #endif
00139
00140 #ifdef MAXPATHLEN
00141 #define FILENAME_MAX MAXPATHLEN
00142 #endif
00143 #ifndef MAXPATHLEN
00144 #define FILENAME_MAX 1024
00145 #endif
00146
00147 #endif
00148
00149
00150
00151
00152
00153 #ifndef TRUE
00154 #define TRUE 1
00155 #endif
00156
00157 #ifndef FALSE
00158 #define FALSE 0
00159 #endif
00160
00161 #ifndef TYPE_BIT
00162 #define TYPE_BIT(type) (sizeof (type) * CHAR_BIT)
00163 #endif
00164
00165 #ifndef TYPE_SIGNED
00166 #define TYPE_SIGNED(type) (((type) -1) < 0)
00167 #endif
00168
00169 #ifndef INT_STRLEN_MAXIMUM
00170
00171
00172
00173
00174
00175
00176 #define INT_STRLEN_MAXIMUM(type) \
00177 ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type))
00178 #endif
00179
00180
00181
00182
00183
00184 #ifndef GNUC_or_lint
00185 #ifdef lint
00186 #define GNUC_or_lint
00187 #endif
00188 #ifndef lint
00189 #ifdef __GNUC__
00190 #define GNUC_or_lint
00191 #endif
00192 #endif
00193 #endif
00194
00195 #ifndef INITIALIZE
00196 #ifdef GNUC_or_lint
00197 #define INITIALIZE(x) ((x) = 0)
00198 #endif
00199 #ifndef GNUC_or_lint
00200 #define INITIALIZE(x)
00201 #endif
00202 #endif
00203
00204
00205
00206
00207
00208
00209
00210 #ifndef _
00211 #if HAVE_GETTEXT - 0
00212 #define _(msgid) gettext(msgid)
00213 #else
00214 #define _(msgid) msgid
00215 #endif
00216 #endif
00217
00218 #ifndef TZ_DOMAIN
00219 #define TZ_DOMAIN "tz"
00220 #endif
00221
00222
00223
00224
00225
00226 #endif