| 1 |
/* |
| 2 |
* The Regina Rexx Interpreter |
| 3 |
* Copyright (C) 1992-1994 Anders Christensen <[email protected]> |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Library General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Library General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Library General Public |
| 16 |
* License along with this library; if not, write to the Free |
| 17 |
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 18 |
*/ |
| 19 |
/* |
| 20 |
* For platforms that don't use autoconf, put these here... |
| 21 |
*/ |
| 22 |
#define HAVE_ASSERT_H 1 |
| 23 |
#define HAVE_ERRNO_H 1 |
| 24 |
#define HAVE_CTYPE_H 1 |
| 25 |
#define HAVE_STDARG_H 1 |
| 26 |
#define HAVE_SYS_STAT_H 1 |
| 27 |
|
| 28 |
#if defined(DOS) && defined(EMX) |
| 29 |
# define HAVE_ALLOCA_H 1 |
| 30 |
# define HAVE_FTIME 1 |
| 31 |
# define HAVE_MATH_H 1 |
| 32 |
# define HAVE_RANDOM 1 |
| 33 |
#undef HAVE_RANDOM /* needs bsd support and linking with -lbsd */ |
| 34 |
# define HAVE_SIGACTION 1 |
| 35 |
# define HAVE_STDIO_H 1 |
| 36 |
# define HAVE_SYS_TIME_H 1 |
| 37 |
# define HAVE_SYSCONF 1 |
| 38 |
# define HAVE_TERMIOS_H 1 |
| 39 |
# define HAVE_TIME_H 1 |
| 40 |
# define HAVE_FCNTL_H 1 |
| 41 |
# define HAVE_GRP_H 1 |
| 42 |
# define HAVE_PWD_H 1 |
| 43 |
# define HAVE_LIMITS_H 1 |
| 44 |
# define HAVE_MALLOC_H 1 |
| 45 |
# define HAVE_SETJMP_H 1 |
| 46 |
# define HAVE_SIGNAL_H 1 |
| 47 |
# define HAVE_STDLIB_H 1 |
| 48 |
# define HAVE_STRING_H 1 |
| 49 |
# define HAVE_UNISTD_H 1 |
| 50 |
# define HAVE_SYS_SOCKET_H 1 |
| 51 |
# define HAVE_NETINET_IN_H 1 |
| 52 |
# define HAVE_SYS_SELECT_H 1 |
| 53 |
# define HAVE_NETDB_H 1 |
| 54 |
# define HAVE_ARPA_INET_H 1 |
| 55 |
# define HAVE__FULLPATH 1 |
| 56 |
# define HAVE_PUTENV 1 |
| 57 |
# define HAVE_GETTIMEOFDAY 1 |
| 58 |
# define HAVE_FTRUNCATE 1 |
| 59 |
# define HAVE_MEMCPY 1 |
| 60 |
# define HAVE_MEMMOVE 1 |
| 61 |
# define HAVE_STRERROR 1 |
| 62 |
# define HAVE_VSPRINTF 1 |
| 63 |
# define HAVE_GETPID 1 |
| 64 |
# define TIME_WITH_SYS_TIME 1 |
| 65 |
# define HAVE_DIV 1 |
| 66 |
# define HAVE_RAISE 1 |
| 67 |
#endif |
| 68 |
|
| 69 |
#if defined(OS2) && defined(EMX) |
| 70 |
# define HAVE_ALLOCA_H 1 |
| 71 |
# define HAVE_FTIME 1 |
| 72 |
# define HAVE_MATH_H 1 |
| 73 |
# define HAVE_RANDOM 1 |
| 74 |
#undef HAVE_RANDOM /* needs bsd support and linking with -lbsd */ |
| 75 |
# define HAVE_SIGACTION 1 |
| 76 |
# define HAVE_STDIO_H 1 |
| 77 |
# define HAVE_SYS_TIME_H 1 |
| 78 |
# define HAVE_SYS_STAT_H 1 |
| 79 |
# define HAVE_SYS_TYPES_H 1 |
| 80 |
# define HAVE_SYSCONF 1 |
| 81 |
# define HAVE_TERMIOS_H 1 |
| 82 |
# define HAVE_TIME_H 1 |
| 83 |
# define HAVE_FCNTL_H 1 |
| 84 |
# define HAVE_GRP_H 1 |
| 85 |
# define HAVE_PWD_H 1 |
| 86 |
# define HAVE_LIMITS_H 1 |
| 87 |
# define HAVE_PROCESS_H 1 |
| 88 |
# define HAVE_MALLOC_H 1 |
| 89 |
# define HAVE_SETJMP_H 1 |
| 90 |
# define HAVE_SIGNAL_H 1 |
| 91 |
# define HAVE_STDLIB_H 1 |
| 92 |
# define HAVE_STDINT_H 1 |
| 93 |
# define HAVE_STRING_H 1 |
| 94 |
# define HAVE_UNISTD_H 1 |
| 95 |
# define HAVE_SYS_SOCKET_H 1 |
| 96 |
# define HAVE_NETINET_IN_H 1 |
| 97 |
# define HAVE_SYS_SELECT_H 1 |
| 98 |
# define HAVE_NETDB_H 1 |
| 99 |
# define HAVE_ARPA_INET_H 1 |
| 100 |
# define HAVE__FULLPATH 1 |
| 101 |
# define HAVE_PUTENV 1 |
| 102 |
# define HAVE_GETTIMEOFDAY 1 |
| 103 |
# define HAVE_FTRUNCATE 1 |
| 104 |
# define HAVE_MEMCPY 1 |
| 105 |
# define HAVE_MEMMOVE 1 |
| 106 |
# define HAVE_STRERROR 1 |
| 107 |
# define HAVE_VSPRINTF 1 |
| 108 |
# define HAVE_GETPID 1 |
| 109 |
# define HAVE_DIV 1 |
| 110 |
# define HAVE_RAISE 1 |
| 111 |
# define TIME_WITH_SYS_TIME 1 |
| 112 |
# if defined(DYNAMIC) |
| 113 |
# define DYNAMIC_OS2 |
| 114 |
# endif |
| 115 |
#endif |
| 116 |
|
| 117 |
#if defined(OS2) && defined(__IBMC__) |
| 118 |
# define HAVE_SETJMP_H |
| 119 |
# define HAVE__FULLPATH |
| 120 |
# define HAVE_PUTENV |
| 121 |
# define HAVE_GETTIMEOFDAY |
| 122 |
# define HAVE_FTRUNCATE |
| 123 |
# define HAVE_MEMCPY |
| 124 |
# define HAVE_MEMMOVE |
| 125 |
# define HAVE_STRERROR |
| 126 |
# define HAVE_VSPRINTF |
| 127 |
# define HAVE_GETPID |
| 128 |
# define HAVE_DIV |
| 129 |
# define HAVE_RAISE |
| 130 |
# define TIME_WITH_SYS_TIME |
| 131 |
#endif |
| 132 |
|
| 133 |
#if defined(OS2) && defined(__WATCOMC__) |
| 134 |
# define HAVE_ARPA_INET_H /* at least OpenWatcom */ |
| 135 |
# define HAVE_DIRECT_H |
| 136 |
# define HAVE_DIV |
| 137 |
# define HAVE_FCNTL_H |
| 138 |
# define HAVE_FTIME |
| 139 |
# define HAVE_GETPID |
| 140 |
# define HAVE_MALLOC_H |
| 141 |
# define HAVE_MEMCPY |
| 142 |
# define HAVE_MEMMOVE |
| 143 |
# define HAVE_NETDB_H /* at least OpenWatcom */ |
| 144 |
# define HAVE_NETINET_IN_H /* at least OpenWatcom */ |
| 145 |
# define HAVE_PROCESS_H /* at least OpenWatcom */ |
| 146 |
# define HAVE_PUTENV |
| 147 |
# define HAVE_RAISE |
| 148 |
# define HAVE_SETENV |
| 149 |
# define HAVE_SETJMP_H |
| 150 |
# define HAVE_PROCESS_H |
| 151 |
# define HAVE_SIGNAL_H |
| 152 |
# define HAVE_STRERROR |
| 153 |
# define HAVE_STRING_H |
| 154 |
# define HAVE_SYS_SELECT_H /* at least OpenWatcom */ |
| 155 |
# define HAVE_SYS_SOCKET_H /* at least OpenWatcom */ |
| 156 |
# define HAVE_TYPES_H |
| 157 |
# define HAVE_UNISTD_H |
| 158 |
# define HAVE_VSPRINTF |
| 159 |
# define HAVE__FULLPATH |
| 160 |
# define HAVE__SPLITPATH2 |
| 161 |
# if defined(DYNAMIC) |
| 162 |
# define DYNAMIC_OS2 |
| 163 |
# endif |
| 164 |
#endif |
| 165 |
|
| 166 |
#if defined(WIN32) && defined(__WATCOMC__) |
| 167 |
# define HAVE_ARPA_INET_H /* at least OpenWatcom */ |
| 168 |
# define HAVE_DIRECT_H |
| 169 |
# define HAVE_DIV |
| 170 |
# define HAVE_FCNTL_H |
| 171 |
# define HAVE_FTIME |
| 172 |
# define HAVE_GETPID |
| 173 |
# define HAVE_MALLOC_H |
| 174 |
# define HAVE_MEMCPY |
| 175 |
# define HAVE_MEMMOVE |
| 176 |
# define HAVE_NETDB_H /* at least OpenWatcom */ |
| 177 |
# define HAVE_NETINET_IN_H /* at least OpenWatcom */ |
| 178 |
# define HAVE_PROCESS_H /* at least OpenWatcom */ |
| 179 |
# define HAVE_PUTENV |
| 180 |
# define HAVE_RAISE |
| 181 |
# define HAVE_SETENV |
| 182 |
# define HAVE_SETJMP_H |
| 183 |
# define HAVE_SIGNAL_H |
| 184 |
# define HAVE_STRERROR |
| 185 |
# define HAVE_STRING_H |
| 186 |
# define HAVE_SYS_SELECT_H /* at least OpenWatcom */ |
| 187 |
# define HAVE_SYS_SOCKET_H /* at least OpenWatcom */ |
| 188 |
# define HAVE_TYPES_H |
| 189 |
# define HAVE_UNISTD_H |
| 190 |
# define HAVE_VSPRINTF |
| 191 |
# define HAVE__FULLPATH |
| 192 |
# define HAVE__SPLITPATH2 |
| 193 |
# if defined(DYNAMIC) |
| 194 |
# define DYNAMIC_WIN32 |
| 195 |
# endif |
| 196 |
# define HAVE_I64U |
| 197 |
# define HAVE__STATI64 |
| 198 |
# define HAVE__ATOI64 |
| 199 |
/* |
| 200 |
* Following for contrib/LibSha1 |
| 201 |
*/ |
| 202 |
# define HAVE_STDINT_H |
| 203 |
# define HAVE_INTTYPES_H |
| 204 |
#endif |
| 205 |
|
| 206 |
#if defined(DOS) && defined(__WATCOMC__) |
| 207 |
# define HAVE_MALLOC_H |
| 208 |
# define HAVE_SETJMP_H |
| 209 |
# define HAVE_SIGNAL_H |
| 210 |
# define HAVE_UNISTD_H |
| 211 |
# define HAVE_STRING_H |
| 212 |
# define HAVE_FTIME |
| 213 |
# define HAVE_FCNTL_H |
| 214 |
# define HAVE_PROCESS_H /* at least OpenWatcom */ |
| 215 |
# define HAVE__FULLPATH |
| 216 |
# define HAVE__SPLITPATH2 |
| 217 |
/* # define HAVE_FTRUNCATE */ |
| 218 |
# define HAVE_MEMCPY |
| 219 |
# define HAVE_MEMMOVE |
| 220 |
# define HAVE_SETENV |
| 221 |
# define HAVE_STRERROR |
| 222 |
# define HAVE_VSPRINTF |
| 223 |
# define HAVE_GETPID |
| 224 |
# define HAVE_DIV |
| 225 |
# define HAVE_RAISE |
| 226 |
/* statically link Regutil */ |
| 227 |
# define HAVE_REXXUTIL_PACKAGE |
| 228 |
#endif |
| 229 |
|
| 230 |
#if defined(WIN32) && defined(_MSC_VER) |
| 231 |
# define HAVE_FCNTL_H |
| 232 |
# define HAVE_LIMITS_H |
| 233 |
# define HAVE_MALLOC_H |
| 234 |
# define HAVE_PROCESS_H |
| 235 |
# define HAVE_SETJMP_H |
| 236 |
# define HAVE_SIGNAL_H |
| 237 |
# define HAVE_STDLIB_H |
| 238 |
# define HAVE_STRING_H |
| 239 |
# define HAVE__FULLPATH |
| 240 |
# define HAVE__SPLITPATH |
| 241 |
# define HAVE_FTRUNCATE |
| 242 |
# define HAVE_MY_WIN32_SETENV |
| 243 |
# define HAVE_FTIME |
| 244 |
# define HAVE_MEMCPY |
| 245 |
# define HAVE_MEMMOVE |
| 246 |
# define HAVE_STRERROR |
| 247 |
# define HAVE_VSPRINTF |
| 248 |
# define HAVE_GETPID |
| 249 |
# define HAVE_DIV |
| 250 |
# define HAVE_RAISE |
| 251 |
# if defined(DYNAMIC) |
| 252 |
# define DYNAMIC_WIN32 |
| 253 |
# endif |
| 254 |
/* |
| 255 |
* Following for large file support |
| 256 |
*/ |
| 257 |
# define HAVE_I64U |
| 258 |
# define HAVE__STATI64 |
| 259 |
# define HAVE__ATOI64 |
| 260 |
/* |
| 261 |
* Following for contrib/LibSha1 |
| 262 |
*/ |
| 263 |
# define HAVE_STDINT_H |
| 264 |
# define HAVE_INTTYPES_H |
| 265 |
#endif |
| 266 |
|
| 267 |
#if defined(WIN32) && defined(__BORLANDC__) |
| 268 |
# define HAVE_FCNTL_H |
| 269 |
# define HAVE_LIMITS_H |
| 270 |
# define HAVE_MALLOC_H |
| 271 |
# define HAVE_PROCESS_H |
| 272 |
# define HAVE_SETJMP_H |
| 273 |
# define HAVE_SIGNAL_H |
| 274 |
# define HAVE_STDLIB_H |
| 275 |
# define HAVE_STRING_H |
| 276 |
# define HAVE__FULLPATH |
| 277 |
# define HAVE__SPLITPATH |
| 278 |
# define HAVE_MY_WIN32_SETENV |
| 279 |
# define HAVE_FTIME |
| 280 |
# define HAVE_MEMCPY |
| 281 |
# define HAVE_MEMMOVE |
| 282 |
# define HAVE_STRERROR |
| 283 |
# define HAVE_VSPRINTF |
| 284 |
# define HAVE_DIV |
| 285 |
# define HAVE_RAISE |
| 286 |
# if defined(DYNAMIC) |
| 287 |
# define DYNAMIC_WIN32 |
| 288 |
# endif |
| 289 |
#endif |
| 290 |
|
| 291 |
#if defined(WIN32) && defined(__CYGWIN32__) |
| 292 |
# define HAVE_GRP_H 1 |
| 293 |
# define HAVE_PWD_H 1 |
| 294 |
# define HAVE_LIMITS_H 1 |
| 295 |
# define HAVE_MALLOC_H 1 |
| 296 |
# define HAVE_PROCESS_H 1 |
| 297 |
# define HAVE_SETJMP_H 1 |
| 298 |
# define HAVE_SIGNAL_H 1 |
| 299 |
# define HAVE_STDLIB_H 1 |
| 300 |
# define HAVE_STRING_H 1 |
| 301 |
# define HAVE_UNISTD_H 1 |
| 302 |
/* # define HAVE__FULLPATH 1 */ |
| 303 |
# define HAVE_PUTENV 1 |
| 304 |
# define HAVE_GETTIMEOFDAY 1 |
| 305 |
# define HAVE_FTRUNCATE 1 |
| 306 |
# define HAVE_MEMCPY 1 |
| 307 |
# define HAVE_MEMMOVE 1 |
| 308 |
# define HAVE_STRERROR 1 |
| 309 |
# define HAVE_VSPRINTF 1 |
| 310 |
# define HAVE_GETPID |
| 311 |
# define HAVE_DIV |
| 312 |
# define HAVE_RAISE |
| 313 |
# define TIME_WITH_SYS_TIME 1 |
| 314 |
# if defined(DYNAMIC) |
| 315 |
# define DYNAMIC_WIN32 |
| 316 |
# endif |
| 317 |
#endif |
| 318 |
|
| 319 |
#if defined(WIN32) && defined(__MINGW32__) |
| 320 |
# define HAVE_LIMITS_H 1 |
| 321 |
# define HAVE_MALLOC_H 1 |
| 322 |
# define HAVE_PROCESS_H 1 |
| 323 |
# define HAVE_SETJMP_H 1 |
| 324 |
# define HAVE_SIGNAL_H 1 |
| 325 |
# define HAVE_STDLIB_H 1 |
| 326 |
# define HAVE_STRING_H 1 |
| 327 |
# define HAVE_UNISTD_H 1 |
| 328 |
# define HAVE_FCNTL_H 1 |
| 329 |
# define HAVE__FULLPATH 1 |
| 330 |
# define HAVE_PUTENV 1 |
| 331 |
/* # define HAVE_GETTIMEOFDAY 1 */ |
| 332 |
/* # define HAVE_FTRUNCATE 1 */ |
| 333 |
# define HAVE_MEMCPY 1 |
| 334 |
# define HAVE_MEMMOVE 1 |
| 335 |
# define HAVE_STRERROR 1 |
| 336 |
# define HAVE_VSPRINTF 1 |
| 337 |
# define HAVE_GETPID |
| 338 |
# define HAVE_DIV |
| 339 |
# define HAVE_RAISE |
| 340 |
# define TIME_WITH_SYS_TIME 1 |
| 341 |
# if defined(DYNAMIC) |
| 342 |
# define DYNAMIC_WIN32 |
| 343 |
# endif |
| 344 |
/* |
| 345 |
* Following for large file support |
| 346 |
*/ |
| 347 |
# define HAVE_I64U |
| 348 |
# define HAVE__STATI64 |
| 349 |
#endif |
| 350 |
|
| 351 |
#if defined(WIN32) && defined(__LCC__) |
| 352 |
# define HAVE_FCNTL_H 1 |
| 353 |
# define HAVE_DIRECT_H 1 |
| 354 |
# define HAVE_LIMITS_H 1 |
| 355 |
# define HAVE_MALLOC_H 1 |
| 356 |
# define HAVE_PROCESS_H 1 |
| 357 |
# define HAVE_SETJMP_H 1 |
| 358 |
# define HAVE_SIGNAL_H 1 |
| 359 |
# define HAVE_STDLIB_H 1 |
| 360 |
# define HAVE_STRING_H 1 |
| 361 |
# define HAVE_UNISTD_H 1 |
| 362 |
# define HAVE__FULLPATH 1 |
| 363 |
# define HAVE_PUTENV 1 |
| 364 |
/* # define HAVE_GETTIMEOFDAY 1 */ |
| 365 |
/* # define HAVE_FTRUNCATE 1 */ |
| 366 |
# define HAVE_MEMCPY 1 |
| 367 |
# define HAVE_MEMMOVE 1 |
| 368 |
# define HAVE_STRERROR 1 |
| 369 |
# define HAVE_VSPRINTF 1 |
| 370 |
# define HAVE__SPLITPATH 1 |
| 371 |
# define HAVE_GETPID 1 |
| 372 |
# define HAVE_DIV |
| 373 |
# define HAVE_RAISE |
| 374 |
/* # define TIME_WITH_SYS_TIME 1 */ |
| 375 |
# if defined(DYNAMIC) |
| 376 |
# define DYNAMIC_WIN32 |
| 377 |
# endif |
| 378 |
#endif |
| 379 |
|
| 380 |
#if defined(DOS) && defined(DJGPP) |
| 381 |
# define HAVE_FCNTL_H |
| 382 |
# define HAVE_GRP_H |
| 383 |
# define HAVE_PWD_H |
| 384 |
# define HAVE_LIMITS_H |
| 385 |
# define HAVE_STRING_H |
| 386 |
# define TIME_WITH_SYS_TIME |
| 387 |
# define HAVE_SETJMP_H |
| 388 |
# define HAVE_UNISTD_H |
| 389 |
# define HAVE_SYS_SOCKET_H |
| 390 |
# define HAVE_NETINET_IN_H |
| 391 |
/* # define HAVE_SYS_SELECT_H */ |
| 392 |
# define HAVE_NETDB_H |
| 393 |
# define HAVE_ARPA_INET_H |
| 394 |
# define HAVE_PUTENV |
| 395 |
# define HAVE_GETTIMEOFDAY |
| 396 |
# define HAVE_FTRUNCATE |
| 397 |
# define HAVE_RANDOM |
| 398 |
# define HAVE_USLEEP |
| 399 |
# define HAVE_MEMCPY |
| 400 |
# define HAVE_MEMMOVE |
| 401 |
# define HAVE_STRERROR |
| 402 |
# define HAVE__TRUENAME |
| 403 |
# define HAVE_VSPRINTF |
| 404 |
# define HAVE_GETPID |
| 405 |
# define HAVE_DIV |
| 406 |
# define HAVE_RAISE |
| 407 |
# ifndef _MAX_PATH |
| 408 |
# define _MAX_PATH PATH_MAX |
| 409 |
# endif |
| 410 |
#endif |
| 411 |
|
| 412 |
#if defined(_AMIGA) && defined(__SASC) |
| 413 |
# define HAVE_SETJMP_H |
| 414 |
/* # define HAVE_UNISTD_H */ |
| 415 |
# define HAVE_PUTENV |
| 416 |
# define HAVE_MEMCPY |
| 417 |
# define HAVE_MEMMOVE |
| 418 |
# define HAVE_STRERROR |
| 419 |
# define HAVE_VSPRINTF |
| 420 |
# define HAVE_DIV |
| 421 |
# define HAVE_RAISE |
| 422 |
# define UNIX |
| 423 |
#endif |
| 424 |
|
| 425 |
#if defined(AMIGA) && ( defined(GCC) || defined(__GNUC__) ) |
| 426 |
# define HAVE_GRP_H 1 |
| 427 |
# define HAVE_PWD_H 1 |
| 428 |
# define HAVE_LIMITS_H 1 |
| 429 |
# define HAVE_MALLOC_H 1 |
| 430 |
# define HAVE_SETJMP_H 1 |
| 431 |
# define HAVE_SIGNAL_H 1 |
| 432 |
# define HAVE_STDLIB_H 1 |
| 433 |
# define HAVE_STRING_H 1 |
| 434 |
# define HAVE_UNISTD_H 1 |
| 435 |
# define HAVE_SYS_SOCKET_H 1 |
| 436 |
# define HAVE_SYS_FCNTL_H 1 |
| 437 |
# define HAVE_NETINET_IN_H 1 |
| 438 |
# define HAVE_NETDB_H 1 |
| 439 |
# define HAVE_ARPA_INET_H 1 |
| 440 |
/* # define HAVE__FULLPATH 1 */ |
| 441 |
# define HAVE_PUTENV 1 |
| 442 |
# define HAVE_FTIME 1 |
| 443 |
# define HAVE_FTRUNCATE 1 |
| 444 |
# define HAVE_MEMCPY 1 |
| 445 |
# define HAVE_MEMMOVE 1 |
| 446 |
# define HAVE_STRERROR 1 |
| 447 |
# define HAVE_VSPRINTF 1 |
| 448 |
# define HAVE_GETPID |
| 449 |
# define HAVE_DIV |
| 450 |
# define HAVE_RAISE |
| 451 |
# define TIME_WITH_SYS_TIME 1 |
| 452 |
# if !defined( _AMIGA ) |
| 453 |
# define _AMIGA |
| 454 |
# endif |
| 455 |
# if !defined( __AMIGADATE__ ) |
| 456 |
# define __AMIGADATE__ "("__DATE__")" |
| 457 |
# endif |
| 458 |
#endif |
| 459 |
|
| 460 |
#if defined(MAC) |
| 461 |
/* # define HAVE_GRP_H 1 */ |
| 462 |
/* # define HAVE_PWD_H 1 */ |
| 463 |
# define HAVE_LIMITS_H 1 |
| 464 |
/* # define HAVE_MALLOC_H 1 */ |
| 465 |
# define HAVE_SETJMP_H 1 |
| 466 |
# define HAVE_SIGNAL_H 1 |
| 467 |
# define HAVE_STDLIB_H 1 |
| 468 |
# define HAVE_STRING_H 1 |
| 469 |
/* # define HAVE_UNISTD_H 1 */ |
| 470 |
/* |
| 471 |
# define HAVE_SYS_SOCKET_H 1 |
| 472 |
# define HAVE_NETINET_IN_H 1 |
| 473 |
# define HAVE_NETDB_H 1 |
| 474 |
# define HAVE_ARPA_INET_H 1 |
| 475 |
*/ |
| 476 |
/* # define HAVE__FULLPATH 1 */ |
| 477 |
/*# define HAVE_SETENV 1 */ |
| 478 |
/* # define HAVE_FTIME 1 */ |
| 479 |
/* # define HAVE_FTRUNCATE 1 */ |
| 480 |
# define HAVE_MEMCPY 1 |
| 481 |
# define HAVE_MEMMOVE 1 |
| 482 |
# define HAVE_STRERROR 1 |
| 483 |
# define HAVE_VSPRINTF 1 |
| 484 |
# define HAVE_GETPID |
| 485 |
# define HAVE_DIV |
| 486 |
# define HAVE_RAISE |
| 487 |
/* # define TIME_WITH_SYS_TIME 1 */ |
| 488 |
#endif |
| 489 |
|
| 490 |
/* |
| 491 |
* The following are for Epoc32 platform |
| 492 |
*/ |
| 493 |
#if defined(__VC32__) && defined(__WINS__) |
| 494 |
# define HAVE_SYS_FCNTL_H |
| 495 |
# define HAVE_LIMITS_H |
| 496 |
# define HAVE_PROCESS_H |
| 497 |
# define HAVE_SETJMP_H |
| 498 |
# define HAVE_SIGNAL_H |
| 499 |
# define HAVE_STDLIB_H |
| 500 |
# define HAVE_STRING_H |
| 501 |
/* # define HAVE__FULLPATH */ |
| 502 |
/* # define HAVE__SPLITPATH */ |
| 503 |
/* # define HAVE_FTRUNCATE */ |
| 504 |
/* # define HAVE_MY_WIN32_SETENV */ |
| 505 |
# define HAVE_MEMCPY |
| 506 |
# define HAVE_MEMMOVE |
| 507 |
# define HAVE_STRERROR |
| 508 |
# define HAVE_VSPRINTF |
| 509 |
# define HAVE_GETPID |
| 510 |
# define HAVE_DIV |
| 511 |
# define HAVE_RAISE |
| 512 |
# define HAVE_SYS_SOCKET_H |
| 513 |
# define HAVE_NETINET_IN_H |
| 514 |
# define HAVE_NETDB_H |
| 515 |
# define HAVE_ARPA_INET_H |
| 516 |
# define HAVE_UNISTD_H |
| 517 |
# if defined(DYNAMIC) |
| 518 |
# define DYNAMIC_WIN32 |
| 519 |
# endif |
| 520 |
#endif |
| 521 |
|
| 522 |
#if defined(__GCC32__) && defined(__EPOC32__) |
| 523 |
# define HAVE_SYS_FCNTL_H 1 |
| 524 |
/* # define HAVE_GRP_H 1 */ |
| 525 |
/* # define HAVE_PWD_H 1 */ |
| 526 |
# define HAVE_LIMITS_H 1 |
| 527 |
/*# define HAVE_MALLOC_H 1 */ |
| 528 |
# define HAVE_PROCESS_H 1 |
| 529 |
# define HAVE_SETJMP_H 1 |
| 530 |
# define HAVE_SIGNAL_H 1 |
| 531 |
# define HAVE_STDLIB_H 1 |
| 532 |
# define HAVE_STRING_H 1 |
| 533 |
# define HAVE_UNISTD_H 1 |
| 534 |
/* # define HAVE__FULLPATH 1 */ |
| 535 |
/* # define HAVE_PUTENV 1 */ |
| 536 |
# define HAVE_GETTIMEOFDAY 1 |
| 537 |
/*# define HAVE_FTRUNCATE 1 */ |
| 538 |
# define HAVE_MEMCPY 1 |
| 539 |
# define HAVE_MEMMOVE 1 |
| 540 |
# define HAVE_STRERROR 1 |
| 541 |
# define HAVE_VSPRINTF 1 |
| 542 |
# define HAVE_GETPID 1 |
| 543 |
# define HAVE_DIV |
| 544 |
# define HAVE_RAISE |
| 545 |
# define TIME_WITH_SYS_TIME 1 |
| 546 |
# define HAVE_SYS_SOCKET_H 1 |
| 547 |
# define HAVE_NETINET_IN_H 1 |
| 548 |
# define HAVE_NETDB_H 1 |
| 549 |
# define HAVE_ARPA_INET_H 1 |
| 550 |
# if defined(DYNAMIC) |
| 551 |
# define DYNAMIC_WIN32 |
| 552 |
# endif |
| 553 |
#endif |
| 554 |
|
| 555 |
#if defined(SKYOS) |
| 556 |
# include <skyos/libskyos.h> |
| 557 |
# define HAVE_SYS_FCNTL_H 1 |
| 558 |
# define HAVE_GRP_H 1 |
| 559 |
# define HAVE_PWD_H 1 |
| 560 |
# define HAVE_LIMITS_H 1 |
| 561 |
# define HAVE_MALLOC_H 1 |
| 562 |
# define HAVE_PROCESS_H 1 |
| 563 |
# define HAVE_SETJMP_H 1 |
| 564 |
# define HAVE_SIGNAL_H 1 |
| 565 |
# define HAVE_STDLIB_H 1 |
| 566 |
# define HAVE_STRING_H 1 |
| 567 |
# define HAVE_UNISTD_H 1 |
| 568 |
/* # define HAVE__FULLPATH 1 */ |
| 569 |
# define HAVE_PUTENV 1 |
| 570 |
# define HAVE_GETTIMEOFDAY 1 |
| 571 |
/*# define HAVE_FTRUNCATE 1 */ |
| 572 |
# define HAVE_MEMCPY 1 |
| 573 |
# define HAVE_MEMMOVE 1 |
| 574 |
# define HAVE_STRERROR 1 |
| 575 |
# define HAVE_VSPRINTF 1 |
| 576 |
# define HAVE_GETPID 1 |
| 577 |
# define HAVE_DIV 1 |
| 578 |
# define HAVE_RAISE 1 |
| 579 |
/*# define TIME_WITH_SYS_TIME 1*/ |
| 580 |
# define HAVE_SYS_SOCKET_H 1 |
| 581 |
# define HAVE_NETINET_IN_H 1 |
| 582 |
# define HAVE_NETDB_H 1 |
| 583 |
# define HAVE_ARPA_INET_H 1 |
| 584 |
# if defined(DYNAMIC) |
| 585 |
# define DYNAMIC_SKYOS |
| 586 |
# endif |
| 587 |
#endif |
| 588 |
|
| 589 |
#if defined(VMS) |
| 590 |
# include "vms.h" |
| 591 |
#endif |
| 592 |
|
| 593 |
/* Configurable values */ |
| 594 |
|
| 595 |
|
| 596 |
/* The macro MAXLEVELS is the maximum number of levels that the |
| 597 |
* interpreter shall handle. One level is used for functioncalls and |
| 598 |
* the commands CALL, IF, DO and SELECT |
| 599 |
*/ |
| 600 |
#define MAXLEVELS 1024 |
| 601 |
|
| 602 |
/* The macro MAX_INDEX_LENGTH defines the maximum length that the name |
| 603 |
* of an compund variable might expand to. |
| 604 |
*/ |
| 605 |
#define MAX_INDEX_LENGTH 256 |
| 606 |
|
| 607 |
/* The macro MAX_EXPONENT is the maximum exponent disregarding sign we |
| 608 |
* are able to handle. |
| 609 |
* This value MUST change for 64-bit-support. |
| 610 |
*/ |
| 611 |
#define MAX_EXPONENT 999999999 |
| 612 |
|
| 613 |
/* |
| 614 |
* The macro DEFAULT_FLUSH_STACK can be defined to either 1 or 0, |
| 615 |
* depending on whether you want the stack to be flushed during a |
| 616 |
* command reading input from or writing output to the stack. If |
| 617 |
* defined, a line written will be physically in the stack at once, |
| 618 |
* while if not defined, all output lines will be temporarily stacked |
| 619 |
* until the command has terminated, then they are all simultaneously |
| 620 |
* flushed to the stack. The default default value is 0, it can be |
| 621 |
* changed through OPTIONS. |
| 622 |
*/ |
| 623 |
#ifndef DEFAULT_FLUSHSTACK |
| 624 |
# define DEFAULT_FLUSHSTACK 0 |
| 625 |
#endif |
| 626 |
|
| 627 |
/* |
| 628 |
* The macro DEFAULT_LINEOUTTRUNC can be set to 1 or 0, whether you want |
| 629 |
* the default behavior of lineout() to truncate the file immediately |
| 630 |
* after the end of each new file written out. When set to 1, the file |
| 631 |
* will be truncated. Also note, that if HAVE_FTRUNCATE isn't set later |
| 632 |
* in this script, the DEFAULT_LINEOUTTRUNC will be forced to 0, just |
| 633 |
* for consistency (then, setting it to 1 will have no practical effect. |
| 634 |
*/ |
| 635 |
#ifndef DEFAULT_LINEOUTTRUNC |
| 636 |
# define DEFAULT_LINEOUTTRUNC 1 |
| 637 |
#endif |
| 638 |
|
| 639 |
#define DEFAULT_MAKEBUF_BIF 1 |
| 640 |
#define DEFAULT_DROPBUF_BIF 1 |
| 641 |
#define DEFAULT_BUFTYPE_BIF 1 |
| 642 |
#define DEFAULT_DESBUF_BIF 1 |
| 643 |
|
| 644 |
#define DEFAULT_CACHEEXT 0 |
| 645 |
#define DEFAULT_PRUNE_TRACE 1 |
| 646 |
|
| 647 |
/* |
| 648 |
* Indicates that Regina treats external commands as functions by default |
| 649 |
*/ |
| 650 |
#define DEFAULT_EXT_COMMANDS_AS_FUNCS 1 |
| 651 |
/* |
| 652 |
* Indicates that Regina does not send output that normally goes to stderr, to stdout |
| 653 |
*/ |
| 654 |
#define DEFAULT_STDOUT_FOR_STDERR 0 |
| 655 |
/* |
| 656 |
* Indicates that Regina allows external queues (and internal queues) by default |
| 657 |
*/ |
| 658 |
#define DEFAULT_INTERNAL_QUEUES 0 |
| 659 |
/* |
| 660 |
* Indicates that Regina does not wrap trace output in HTML code by default |
| 661 |
*/ |
| 662 |
#define DEFAULT_TRACE_HTML 0 |
| 663 |
/* |
| 664 |
* Indicates that Regina returns 1 or 0 for when calling LINES BIF without optional 2nd argument by default |
| 665 |
*/ |
| 666 |
#define DEFAULT_FAST_LINES_BIF_DEFAULT 1 |
| 667 |
/* |
| 668 |
* Indicates that Regina does not observe strict ANSI functionality by default |
| 669 |
*/ |
| 670 |
#define DEFAULT_STRICT_ANSI 0 |
| 671 |
/* |
| 672 |
* Indicates that Regina-specific BUFs are available by default |
| 673 |
*/ |
| 674 |
#define DEFAULT_REGINA_BIFS 1 |
| 675 |
/* |
| 676 |
* Indicates that Regina does not do strict white space comparison by default |
| 677 |
*/ |
| 678 |
#define DEFAULT_STRICT_WHITE_SPACE_COMPARISONS 0 |
| 679 |
/* |
| 680 |
* Indicates if the ARexx BIFs (OPEN, CLOSE, EOF) use AREXX semantics or not |
| 681 |
* On Amiga and AROS, they are on by default. |
| 682 |
*/ |
| 683 |
#if defined(_AMIGA) || defined(__AROS__) |
| 684 |
# define DEFAULT_AREXX_SEMANTICS 1 |
| 685 |
#else |
| 686 |
# define DEFAULT_AREXX_SEMANTICS 0 |
| 687 |
#endif |
| 688 |
/* |
| 689 |
* Indicates that AREXX BIFs are available by default on Amiga and AROS, but |
| 690 |
* OFF on other platforms |
| 691 |
*/ |
| 692 |
#if defined(_AMIGA) || defined(__AROS__) |
| 693 |
# define DEFAULT_AREXX_BIFS 1 |
| 694 |
#else |
| 695 |
# define DEFAULT_AREXX_BIFS 0 |
| 696 |
#endif |
| 697 |
/* |
| 698 |
* Indicates if the user want the "broken" semantics of ADDRESS COMMAND |
| 699 |
*/ |
| 700 |
#define DEFAULT_BROKEN_ADDRESS_COMMAND 0 |
| 701 |
/* |
| 702 |
* Indicates if the user wants outer parentheses when using CALL subroutine. |
| 703 |
*/ |
| 704 |
#define DEFAULT_CALLS_AS_FUNCS 0 |
| 705 |
/* |
| 706 |
* Indicates if the user wants the broken queue naming conventions. |
| 707 |
*/ |
| 708 |
#define DEFAULT_QUEUES_301 0 |
| 709 |
/* |
| 710 |
* Indicates if a failure in a call to an external routine halts the caller with error 40.1 |
| 711 |
*/ |
| 712 |
#define DEFAULT_HALT_ON_EXT_CALL_FAIL 0 |
| 713 |
/* |
| 714 |
* Indicates if a new thread calls an API function the call occurs in the current (and only one) instance of an interpreter |
| 715 |
*/ |
| 716 |
#define DEFAULT_SINGLE_INTERPRETER 0 |
| 717 |
/* |
| 718 |
* Indicates that Regina allows single line comments by default |
| 719 |
*/ |
| 720 |
#define DEFAULT_SINGLE_LINE_COMMENTS 1 |
| 721 |
|
| 722 |
/* |
| 723 |
* The FILE_SEPARATOR is one character, and defines the char that separates |
| 724 |
* directories, and filename from directories in a file's path. |
| 725 |
* The PATH_SEPARATOR is one character, and defines the char that separates |
| 726 |
* directories, from one another in a PATH environment variable. |
| 727 |
*/ |
| 728 |
|
| 729 |
#if defined(MSDOS) || ( defined(__WATCOMC__) && !defined(__QNX__) ) || defined(_MSC_VER) || defined(DOS) || defined(OS2) || defined(__WINS__) || defined(__EPOC32__) || defined(__LCC__) || defined(__BORLANDC__) || defined(__MINGW32__) |
| 730 |
# define FILE_SEPARATORS "\\/:" |
| 731 |
# define FILE_SEPARATOR '\\' |
| 732 |
# define FILE_SEPARATOR_STR "\\" |
| 733 |
# define PATH_SEPARATOR ';' |
| 734 |
# define PATH_SEPARATOR_STR ";" |
| 735 |
#elif defined(VMS) |
| 736 |
# define FILE_SEPARATORS "]" |
| 737 |
# define FILE_SEPARATOR ']' |
| 738 |
# define FILE_SEPARATOR_STR "]" |
| 739 |
# define PATH_SEPARATOR '?' |
| 740 |
# define PATH_SEPARATOR_STR "?" |
| 741 |
#elif defined(MAC) |
| 742 |
# define FILE_SEPARATOR "]" |
| 743 |
# define FILE_SEPARATOR ']' |
| 744 |
# define FILE_SEPARATOR_STR "]" |
| 745 |
# define PATH_SEPARATOR '?' |
| 746 |
# define PATH_SEPARATOR_STR "?" |
| 747 |
#else |
| 748 |
# define FILE_SEPARATORS "/" |
| 749 |
# define FILE_SEPARATOR '/' |
| 750 |
# define FILE_SEPARATOR_STR "/" |
| 751 |
# define PATH_SEPARATOR ':' |
| 752 |
# define PATH_SEPARATOR_STR ":" |
| 753 |
#endif |
| 754 |
|
| 755 |
|
| 756 |
#define FIX_PROTOS |
| 757 |
#define FIX_ALL_PROTOS |
| 758 |
|
| 759 |
|
| 760 |
#if defined(HPUX) || defined(__hpux) |
| 761 |
# define YY_CHAR_TYPE unsigned char |
| 762 |
#endif |
| 763 |
|
| 764 |
#if !defined(HAVE_MEMCPY) |
| 765 |
# define memcpy(a,b,c) bcopy((b),(a),(c)) |
| 766 |
#endif |
| 767 |
|
| 768 |
#if !defined(HAVE_MEMMOVE) |
| 769 |
# define memmove(a,b,c) bcopy((b),(a),(c)) |
| 770 |
#endif |
| 771 |
|
| 772 |
#if !defined(HAVE_STRERROR) |
| 773 |
const char *get_sys_errlist( int num ); |
| 774 |
# define strerror(a) get_sys_errlist(a) |
| 775 |
#endif |
| 776 |
|
| 777 |
|
| 778 |
#if defined(sgi) || defined(__sgi) |
| 779 |
# define SGI 1 |
| 780 |
#endif |
| 781 |
|
| 782 |
#if defined(__osf__) |
| 783 |
# define OSF 1 |
| 784 |
# define YY_CHAR_TYPE unsigned char |
| 785 |
#endif |
| 786 |
|
| 787 |
/* |
| 788 |
* Define HAVE_USLEEP if you have the usleep() function available. It will |
| 789 |
* take the number of micro-seconds to sleep. If this is not defined, |
| 790 |
* the 'normal' sleep() will be used. |
| 791 |
* Handled by autoconf |
| 792 |
*/ |
| 793 |
|
| 794 |
/* |
| 795 |
* Define HAVE_RANDOM if your machine has the routines random() and |
| 796 |
* srandom(). If it is not defined, rand() and srand() are used |
| 797 |
* instead. There are several reason why you might want to use |
| 798 |
* random() instead of rand() |
| 799 |
* Handled by autoconf |
| 800 |
*/ |
| 801 |
|
| 802 |
|
| 803 |
#define DEFAULT_NUMERIC_FUZZ 0 |
| 804 |
#define DEFAULT_NUMERIC_SIZE 9 |
| 805 |
#define DEFAULT_MATH_TYPE 0 |
| 806 |
|
| 807 |
|
| 808 |
/* |
| 809 |
* If you use gcc on a machine that does not have proper ANSI C |
| 810 |
* libraries and the function div() is not defined, then you can |
| 811 |
* define the symbol HAVE_NO_DIV, which will try to kludge it. |
| 812 |
* |
| 813 |
* This is necessary on Suns, and some other machines. |
| 814 |
* |
| 815 |
* Not used anymore MH 10-06-97 |
| 816 |
*/ |
| 817 |
|
| 818 |
|
| 819 |
#ifndef YY_CHAR_TYPE |
| 820 |
# ifdef _AIX |
| 821 |
# define YY_CHAR_TYPE unsigned char |
| 822 |
# else |
| 823 |
# define YY_CHAR_TYPE char |
| 824 |
# endif |
| 825 |
#endif |
| 826 |
|
| 827 |
|
| 828 |
/* Unfortunately, ftruncate() is not POSIX, so if you don't have it, |
| 829 |
* just ignore it, the effect is that lines written to the middle of a |
| 830 |
* file will not cause the rest of the file (after the linefeed |
| 831 |
* terminating the line written), also to truncate the file at that |
| 832 |
* point. If you wonder whether you have ftruncate(), the bsd portions |
| 833 |
* of you system (if it exist) is a good place to start looking. You |
| 834 |
* may have to link in a specific library too, maybe libbsd.a. |
| 835 |
*/ |
| 836 |
/*#define HAVE_FTRUNCATE*/ /* handled in makefile - TBD in autoconf */ |
| 837 |
|
| 838 |
|
| 839 |
|
| 840 |
#ifdef VMS |
| 841 |
# ifdef HAVE_GETTIMEOFDAY |
| 842 |
# undef HAVE_GETTIMEOFDAY |
| 843 |
# endif |
| 844 |
# ifdef HAVE_PUTENV |
| 845 |
# undef HAVE_PUTENV |
| 846 |
# endif |
| 847 |
# ifdef HAVE_FTRUNCATE |
| 848 |
# undef HAVE_FTRUNCATE |
| 849 |
# endif |
| 850 |
#endif |
| 851 |
|
| 852 |
|
| 853 |
#if defined(__GNUC__) && defined(VMS) |
| 854 |
# ifdef HAVE_GETTIMEOFODAY |
| 855 |
# undef HAVE_GETTIMEOFDAY |
| 856 |
# endif |
| 857 |
#endif |
| 858 |
|
| 859 |
/* |
| 860 |
* DLOPEN - dlopen()/dlsym() under SunOS and SysV4 |
| 861 |
* HPSHLOAD - shl_load()/shl_findsym() under HP-UX |
| 862 |
* AIXLOAD - load()/loadbind() under AIX - not supported |
| 863 |
* OS2 - DosLoadModule()/DosQueryProcAddr() under OS/2 |
| 864 |
* WIN32 - LoadLibrary()/GetProcAddress() under Win32 |
| 865 |
*/ |
| 866 |
|
| 867 |
/* |
| 868 |
* QNX 4.2x does have a ftrunc() equivalent: ltrunc() |
| 869 |
*/ |
| 870 |
#if defined(__WATCOMC__) && defined(__QNX__) |
| 871 |
# define HAVE_FTRUNCATE |
| 872 |
#endif |
| 873 |
/* |
| 874 |
* If we don't have ftruncate() then we don't want the default setting |
| 875 |
* of LINEOUT() to be to truncate after each new line written out. |
| 876 |
*/ |
| 877 |
#ifndef HAVE_FTRUNCATE |
| 878 |
# undef DEFAULT_LINEOUTTRUNC /* MH 10-06-96 */ |
| 879 |
# define DEFAULT_LINEOUTTRUNC 0 |
| 880 |
#endif |
| 881 |
|
| 882 |
#ifdef _MSC_VER |
| 883 |
/* This picky compiler claims about unused formal parameters. |
| 884 |
* This is correct but hides (for human eyes) other errors since they |
| 885 |
* are many and we can't reduce them all. |
| 886 |
* Error 4100 is "unused formal parameter". |
| 887 |
*/ |
| 888 |
# pragma warning(disable:4100) |
| 889 |
#endif |