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