1 /* 2 ** ____ _ 3 ** ___| _ \ ___ _ __| | 4 ** / _ \ |_) / _ \ '__| | 5 ** | __/ __/ __/ | | | 6 ** \___|_| \___|_| |_| 7 ** 8 ** ePerl -- Embedded Perl 5 Language 9 ** 10 ** ePerl interprets an ASCII file bristled with Perl 5 program statements 11 ** by evaluating the Perl 5 code while passing through the plain ASCII 12 ** data. It can operate both as a standard Unix filter for general file 13 ** generation tasks and as a powerful Webserver scripting language for 14 ** dynamic HTML page programming. 15 ** 16 ** ====================================================================== 17 ** 18 ** Copyright (c) 1996,1997,1998 Ralf S. Engelschall <rse@engelschall.com> 19 ** 20 ** This program is free software; it may be redistributed and/or modified 21 ** only under the terms of either the Artistic License or the GNU General 22 ** Public License, which may be found in the ePerl source distribution. 23 ** Look at the files ARTISTIC and COPYING or run ``eperl -l'' to receive 24 ** a built-in copy of both license files. 25 ** 26 ** This program is distributed in the hope that it will be useful, but 27 ** WITHOUT ANY WARRANTY; without even the implied warranty of 28 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the 29 ** Artistic License or the GNU General Public License for more details. 30 ** 31 ** ====================================================================== 32 ** 33 ** eperl_config.h -- ePerl configuration header 34 */ 35 #ifndef EPERL_CONFIG_H 36 #define EPERL_CONFIG_H 1 37 38 39 /* 40 ** 41 ** Headers from GNU autoconf 42 ** 43 */ 44 #include "config_ac.h" 45 #include "config_sc.h" 46 47 48 /* 49 ** 50 ** Headers from the Unix system 51 ** 52 */ 53 #ifdef HAVE_STDIO_H 54 #include <stdio.h> 55 #endif 56 #ifdef HAVE_STDARG_H 57 #include <stdarg.h> 58 #else 59 #include <varargs.h> 60 #endif 61 #ifdef HAVE_STDLIB_H 62 #include <stdlib.h> 63 #endif 64 #ifdef HAVE_STRING_H 65 #include <string.h> 66 #else 67 #include <strings.h> 68 #endif 69 #ifdef HAVE_CTYPE_H 70 #include <ctype.h> 71 #endif 72 #ifdef HAVE_UNISTD_H 73 #include <unistd.h> 74 #endif 75 #ifdef HAVE_TIME_H 76 #include <time.h> 77 #endif 78 #ifdef HAVE_SIGNAL_H 79 #include <signal.h> 80 #endif 81 #ifdef HAVE_PWD_H 82 #include <pwd.h> 83 #endif 84 #ifdef HAVE_GRP_H 85 #include <grp.h> 86 #endif 87 #ifdef HAVE_SYS_TYPES_H 88 #include <sys/types.h> 89 #endif 90 #ifdef HAVE_SYS_STAT_H 91 #include <sys/stat.h> 92 #endif 93 #ifdef HAVE_SYS_PARAM_H 94 #include <sys/param.h> 95 #endif 96 #ifdef HAVE_SYS_SOCKET_H 97 #include <sys/socket.h> 98 #endif 99 #ifdef HAVE_NETINET_IN_H 100 #include <netinet/in.h> 101 #endif 102 #ifdef HAVE_NETDB_H 103 #include <netdb.h> 104 #endif 105 106 107 /* 108 ** 109 ** Missing Prototypes. 110 ** They are needed to get a clean compile with gcc -Wall. 111 ** 112 */ 113 114 /* 115 * Believe it or not, these do have to be declared, at least on SunOS, 116 * because they aren't mentioned in the relevant system headers. 117 * Sun Quality Software. Gotta love it. 118 */ 119 #ifdef SUNOS_LIB_PROTOTYPES 120 int getopt (int, char **, char *); 121 int strcasecmp (char *, char *); 122 int strncasecmp (char *, char *, int); 123 int toupper(int); 124 int tolower(int); 125 int printf (char *, ...); 126 int fprintf (FILE *, char *, ...); 127 int fputs (char *, FILE *); 128 int fread (char *, int, int, FILE *); 129 int fwrite (char *, int, int, FILE *); 130 int fflush (FILE *); 131 int fclose (FILE *); 132 int ungetc (int, FILE *); 133 int _filbuf (FILE *); /* !!! */ 134 int _flsbuf (unsigned char, FILE *); /* !!! */ 135 int sscanf (char *, char *, ...); 136 void setbuf (FILE *, char *); 137 void perror (char *); 138 time_t time (time_t *); 139 int strftime (char *, int, char *, struct tm *); 140 int initgroups (char *, int); 141 int wait3 (int *, int, void*); /* Close enough for us... */ 142 int lstat (const char *, struct stat *); 143 int stat (const char *, struct stat *); 144 int flock (int, int); 145 #ifndef NO_KILLPG 146 int killpg(int, int); 147 #endif 148 int socket (int, int, int); 149 int setsockopt (int, int, int, const char*, int); 150 int listen (int, int); 151 int bind (int, struct sockaddr *, int); 152 int connect (int, struct sockaddr *, int); 153 int accept (int, struct sockaddr *, int *); 154 int shutdown (int, int); 155 int getsockname (int s, struct sockaddr *name, int *namelen); 156 int getpeername (int s, struct sockaddr *name, int *namelen); 157 int gethostname (char *name, int namelen); 158 void syslog (int, char *, ...); 159 char *mktemp (char *); 160 long vfprintf (FILE *, char *, va_list); 161 char *vsprintf (char *, char *, va_list); 162 #endif 163 164 /* 165 * 166 * We can provide own functions... 167 */ 168 #ifndef HAVE_STRDUP 169 char *strdup(const char *str); 170 #endif 171 172 173 /* 174 ** 175 ** OS Return Values 176 ** 177 */ 178 #define EX__BASE 64 /* base value for error messages */ 179 #define EX_USAGE 64 /* command line usage error */ 180 #define EX_DATAERR 65 /* data format error */ 181 #define EX_NOINPUT 66 /* cannot open input */ 182 #define EX_NOUSER 67 /* addressee unknown */ 183 #define EX_NOHOST 68 /* host name unknown */ 184 #define EX_UNAVAILABLE 69 /* service unavailable */ 185 #define EX_SOFTWARE 70 /* internal software error */ 186 #define EX_OSERR 71 /* system error (e.g., can't fork) */ 187 #define EX_OSFILE 72 /* critical OS file missing */ 188 #define EX_CANTCREAT 73 /* can't create (user) output file */ 189 #define EX_IOERR 74 /* input/output error */ 190 #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ 191 #define EX_PROTOCOL 76 /* remote error in protocol */ 192 #define EX_NOPERM 77 /* permission denied */ 193 #define EX_CONFIG 78 /* configuration error */ 194 #define EX__MAX 78 /* maximum listed value */ 195 196 /* OK and FAIL exits should ALWAYS exists */ 197 #ifndef EX_OK 198 #define EX_OK 0 199 #endif 200 #ifndef EX_FAIL 201 #define EX_FAIL 1 202 #endif 203 204 205 /* 206 ** 207 ** ASCII Control Codes 208 ** 209 */ 210 #define ASC_NUL '\x00' 211 #define ASC_SOH '\x01' 212 #define ASC_STX '\x02' 213 #define ASC_ETX '\x03' 214 #define ASC_EOT '\x04' 215 #define ASC_ENQ '\x05' 216 #define ASC_ACK '\x06' 217 #define ASC_BEL '\x07' 218 #define ASC_BS '\x08' 219 #define ASC_HT '\x09' 220 #define ASC_LF '\x0a' 221 #define ASC_VT '\x0b' 222 #define ASC_FF '\x0c' 223 #define ASC_CR '\x0d' 224 #define ASC_SO '\x0e' 225 #define ASC_SI '\x0f' 226 #define ASC_DLE '\x10' 227 #define ASC_DC1 '\x11' 228 #define ASC_DC2 '\x12' 229 #define ASC_DC3 '\x13' 230 #define ASC_DC4 '\x14' 231 #define ASC_NAK '\x15' 232 #define ASC_SYN '\x16' 233 #define ASC_ETB '\x17' 234 #define ASC_CAN '\x18' 235 #define ASC_EM '\x19' 236 #define ASC_SUB '\x1a' 237 #define ASC_ESC '\x1b' 238 #define ASC_FS '\x1c' 239 #define ASC_GS '\x1d' 240 #define ASC_RS '\x1e' 241 #define ASC_US '\x1f' 242 #define ASC_SP '\x20' 243 #define ASC_DEL '\x7f' 244 #define NUL ASC_NUL 245 246 #define ASC_QUOTE '\x22' 247 #define ASC_NL ASC_LF 248 #define NL ASC_NL 249 250 251 /* 252 ** 253 ** NULL 254 ** 255 */ 256 #ifndef NULL 257 #define NULL (void *)0 258 #endif 259 260 261 /* 262 ** 263 ** Boolean Values -- defined in a general and portable way 264 ** 265 */ 266 /* typedef enum { false = FALSE, true = TRUE } bool; */ 267 #undef TRUE 268 #define TRUE (0 || !(0)) 269 #undef FALSE 270 #define FALSE (!(TRUE)) 271 272 273 #endif /* EPERL_CONFIG_H */ 274 /*EOF*/ 275