00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _GENERAL_H
00012 #define _GENERAL_H
00013
00014
00015
00016
00017 #if defined (HAVE_CONFIG_H)
00018 # include <config.h>
00019 #elif defined (AMIGA)
00020 # include "e_amiga.h"
00021 #elif defined (DJGPP)
00022 # include "e_djgpp.h"
00023 #elif defined (macintosh)
00024 # include "e_mac.h"
00025 #elif defined (MSDOS) || defined (WIN32)
00026 # include "e_msoft.h"
00027 #elif defined (OS2)
00028 # include "e_os2.h"
00029 #elif defined (QDOS)
00030 # include "e_qdos.h"
00031 #elif defined (RISCOS)
00032 # include "e_riscos.h"
00033 #elif defined (__vms) || defined (VMS)
00034 # include "e_vms.h"
00035 # ifndef VMS
00036 # define VMS 1
00037 # endif
00038 #endif
00039
00040
00041
00042
00043
00044
00045
00046
00047 #ifndef errout
00048 # define errout stderr
00049 #endif
00050
00051
00052 #if (defined (HAVE_REGCOMP) && !defined (REGCOMP_BROKEN))
00053 # define HAVE_REGEX 1
00054 #endif
00055
00056
00057
00058
00059 #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(defined (__APPLE_CC__) || defined (__GNUG__))
00060 # define __unused__ __attribute__((unused))
00061 # define __printf__(s,f) __attribute__((format (printf, s, f)))
00062 #else
00063 # define __unused__
00064 # define __printf__(s,f)
00065 #endif
00066
00067
00068
00069
00070 #if !defined(HAVE_STRCASECMP) && !defined(strcasecmp)
00071 # ifdef HAVE_STRICMP
00072 # define strcasecmp(s1,s2) stricmp(s1,s2)
00073 # else
00074 # define strcasecmp(s1,s2) struppercmp(s1,s2)
00075 # endif
00076 #endif
00077
00078 #if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp)
00079 # ifdef HAVE_STRNICMP
00080 # define strncasecmp(s1,s2,n) strnicmp(s1,s2,n)
00081 # else
00082 # define strncasecmp(s1,s2,n) strnuppercmp(s1,s2,n)
00083 # endif
00084 #endif
00085
00086
00087
00088
00089
00090 #undef FALSE
00091 #undef TRUE
00092 #ifdef VAXC
00093 typedef enum { FALSE, TRUE } booleanType;
00094 typedef int boolean;
00095 #else
00096 # ifdef __cplusplus
00097 typedef bool boolean;
00098 #define FALSE false
00099 #define TRUE true
00100 # else
00101 typedef enum { FALSE, TRUE } boolean;
00102 # endif
00103 #endif
00104
00105 #if ! defined (HAVE_FGETPOS) && ! defined (fpos_t)
00106 # define fpos_t long
00107 #endif
00108
00109
00110
00111
00112
00113 #if defined (NEED_PROTO_REMOVE) && defined (HAVE_REMOVE)
00114 extern int remove (const char *);
00115 #endif
00116
00117 #if defined (NEED_PROTO_UNLINK) && ! defined (HAVE_REMOVE)
00118 extern void *unlink (const char *);
00119 #endif
00120
00121 #ifdef NEED_PROTO_GETENV
00122 extern char *getenv (const char *);
00123 #endif
00124
00125 #endif
00126
00127