perl 4.0.00: (no release announcement available)
[p5sagit/p5-mst-13.2.git] / os2 / config.h
CommitLineData
87250799 1/* config.h
2 * This file was hand tailored for compiling under MS-DOS and MSC 5.1.
3 * Diomidis Spinellis, March 1990.
4 *
5 * Then it got mangled again for compiling under OS/2 and MSC 6.0.
6 * Raymond Chen, June 1990.
7 */
8#define OS2 /**/
9
10/* OS/2 supports some additional things MS-DOS doesn't.
11 */
12#ifdef OS2
13#define PIPE
14#define GETPPID
fe14fcc3 15#define HAS_GETPRIORITY
16#define HAS_SETPRIORITY
87250799 17#define KILL
18#endif /* OS2 */
19
20/* SUFFIX:
21 * This symbol, if defined, indicates that the function add_suffix has
22 * been supplied in a system-dependent .c file. This function is
23 * recommended for operating systems whose filenaming conventions
24 * do not permit arbitrary strings as filenames.
25 */
26#define SUFFIX /**/
27
28/* EUNICE:
29 * This symbol, if defined, indicates that the program is being compiled
30 * under the EUNICE package under VMS. The program will need to handle
31 * things like files that don't go away the first time you unlink them,
32 * due to version numbering. It will also need to compensate for lack
33 * of a respectable link() command.
34 */
35/* VMS:
36 * This symbol, if defined, indicates that the program is running under
37 * VMS. It is currently only set in conjunction with the EUNICE symbol.
38 */
39/*#undef EUNICE /**/
40/*#undef VMS /**/
41
42/* BIN:
43 * This symbol holds the name of the directory in which the user wants
44 * to put publicly executable images for the package in question. It
45 * is most often a local directory such as /usr/local/bin.
46 */
47#define BIN "/usr/local/bin" /**/
48
49/* BYTEORDER:
50 * This symbol contains an encoding of the order of bytes in a long.
51 * Usual values (in octal) are 01234, 04321, 02143, 03412...
52 */
53/* CHECK */
54#define BYTEORDER 0x1234 /**/
55
56/* CPPSTDIN:
57 * This symbol contains the first part of the string which will invoke
58 * the C preprocessor on the standard input and produce to standard
59 * output. Typical value of "cc -{" or "/lib/cpp".
60 */
61/* CPPMINUS:
62 * This symbol contains the second part of the string which will invoke
63 * the C preprocessor on the standard input and produce to standard
64 * output. This symbol will have the value "-" if CPPSTDIN needs a minus
65 * to specify standard input, otherwise the value is "".
66 */
67/* TODO */
68#define CPPSTDIN "cc -{"
69#define CPPMINUS ""
70
fe14fcc3 71/* HAS_BCMP:
87250799 72 * This symbol, if defined, indicates that the bcmp routine is available
73 * to compare blocks of memory. If undefined, use memcmp. If that's
74 * not available, roll your own.
75 */
fe14fcc3 76/*#define HAS_BCMP /**/
87250799 77
fe14fcc3 78/* HAS_BCOPY:
87250799 79 * This symbol, if defined, indicates that the bcopy routine is available
80 * to copy blocks of memory. Otherwise you should probably use memcpy().
81 */
fe14fcc3 82/*#define HAS_BCOPY /**/
87250799 83
84/* CHARSPRINTF:
85 * This symbol is defined if this system declares "char *sprintf()" in
86 * stdio.h. The trend seems to be to declare it as "int sprintf()". It
87 * is up to the package author to declare sprintf correctly based on the
88 * symbol.
89 */
90/*#define CHARSPRINTF /**/
91
fe14fcc3 92/* HAS_CRYPT:
87250799 93 * This symbol, if defined, indicates that the crypt routine is available
94 * to encrypt passwords and the like.
95 */
96/* TODO */
fe14fcc3 97/*#define HAS_CRYPT /**/
87250799 98
99/* DOSUID:
100 * This symbol, if defined, indicates that the C program should
101 * check the script that it is executing for setuid/setgid bits, and
102 * attempt to emulate setuid/setgid on systems that have disabled
103 * setuid #! scripts because the kernel can't do it securely.
104 * It is up to the package designer to make sure that this emulation
105 * is done securely. Among other things, it should do an fstat on
106 * the script it just opened to make sure it really is a setuid/setgid
107 * script, it should make sure the arguments passed correspond exactly
108 * to the argument on the #! line, and it should not trust any
109 * subprocesses to which it must pass the filename rather than the
110 * file descriptor of the script to be executed.
111 */
112/*#define DOSUID /**/
113
fe14fcc3 114/* HAS_DUP2:
87250799 115 * This symbol, if defined, indicates that the dup2 routine is available
116 * to dup file descriptors. Otherwise you should use dup().
117 */
fe14fcc3 118#define HAS_DUP2 /**/
87250799 119
fe14fcc3 120/* HAS_FCHMOD:
87250799 121 * This symbol, if defined, indicates that the fchmod routine is available
122 * to change mode of opened files. If unavailable, use chmod().
123 */
fe14fcc3 124/*#define HAS_FCHMOD /**/
87250799 125
fe14fcc3 126/* HAS_FCHOWN:
87250799 127 * This symbol, if defined, indicates that the fchown routine is available
128 * to change ownership of opened files. If unavailable, use chown().
129 */
fe14fcc3 130/*#define HAS_FCHOWN /**/
87250799 131
fe14fcc3 132/* I_FCNTL:
87250799 133 * This symbol, if defined, indicates to the C program that it should
134 * include fcntl.h.
135 */
fe14fcc3 136/*#define I_FCNTL /**/
87250799 137
fe14fcc3 138/* HAS_FLOCK:
87250799 139 * This symbol, if defined, indicates that the flock() routine is
140 * available to do file locking.
141 */
fe14fcc3 142/*#define HAS_FLOCK /**/
87250799 143
fe14fcc3 144/* HAS_GETGROUPS:
87250799 145 * This symbol, if defined, indicates that the getgroups() routine is
146 * available to get the list of process groups. If unavailable, multiple
147 * groups are probably not supported.
148 */
fe14fcc3 149/*#define HAS_GETGROUPS /**/
87250799 150
fe14fcc3 151/* HAS_GETHOSTENT:
87250799 152 * This symbol, if defined, indicates that the gethostent() routine is
153 * available to lookup host names in some data base or other.
154 */
fe14fcc3 155/*#define HAS_GETHOSTENT /**/
87250799 156
fe14fcc3 157/* HAS_GETPGRP:
87250799 158 * This symbol, if defined, indicates that the getpgrp() routine is
159 * available to get the current process group.
160 */
fe14fcc3 161/*#define HAS_GETPGRP /**/
87250799 162
fe14fcc3 163/* HAS_GETPRIORITY:
87250799 164 * This symbol, if defined, indicates that the getpriority() routine is
165 * available to get a process's priority.
166 */
fe14fcc3 167/*#define HAS_GETPRIORITY /**/
87250799 168
fe14fcc3 169/* HAS_HTONS:
87250799 170 * This symbol, if defined, indicates that the htons routine (and friends)
171 * are available to do network order byte swapping.
172 */
fe14fcc3 173/* HAS_HTONL:
87250799 174 * This symbol, if defined, indicates that the htonl routine (and friends)
175 * are available to do network order byte swapping.
176 */
fe14fcc3 177/* HAS_NTOHS:
87250799 178 * This symbol, if defined, indicates that the ntohs routine (and friends)
179 * are available to do network order byte swapping.
180 */
fe14fcc3 181/* HAS_NTOHL:
87250799 182 * This symbol, if defined, indicates that the ntohl routine (and friends)
183 * are available to do network order byte swapping.
184 */
fe14fcc3 185/*#define HAS_HTONS /**/
186/*#define HAS_HTONL /**/
187/*#define HAS_NTOHS /**/
188/*#define HAS_NTOHL /**/
87250799 189
190/* index:
191 * This preprocessor symbol is defined, along with rindex, if the system
192 * uses the strchr and strrchr routines instead.
193 */
194/* rindex:
195 * This preprocessor symbol is defined, along with index, if the system
196 * uses the strchr and strrchr routines instead.
197 */
198#define index strchr /* cultural */
199#define rindex strrchr /* differences? */
200
fe14fcc3 201/* I_SYSIOCTL:
87250799 202 * This symbol, if defined, indicates that sys/ioctl.h exists and should
203 * be included.
204 */
fe14fcc3 205/*#define I_SYSIOCTL /**/
87250799 206
fe14fcc3 207/* HAS_KILLPG:
87250799 208 * This symbol, if defined, indicates that the killpg routine is available
209 * to kill process groups. If unavailable, you probably should use kill
210 * with a negative process number.
211 */
fe14fcc3 212/*#define HAS_KILLPG /**/
87250799 213
fe14fcc3 214/* HAS_MEMCMP:
87250799 215 * This symbol, if defined, indicates that the memcmp routine is available
216 * to compare blocks of memory. If undefined, roll your own.
217 */
fe14fcc3 218#define HAS_MEMCMP /**/
87250799 219
fe14fcc3 220/* HAS_MEMCPY:
87250799 221 * This symbol, if defined, indicates that the memcpy routine is available
222 * to copy blocks of memory. Otherwise you should probably use bcopy().
223 * If neither is defined, roll your own.
224 */
fe14fcc3 225#define HAS_MEMCPY /**/
87250799 226
fe14fcc3 227/* HAS_MKDIR:
87250799 228 * This symbol, if defined, indicates that the mkdir routine is available
229 * to create directories. Otherwise you should fork off a new process to
230 * exec /bin/mkdir.
231 */
fe14fcc3 232#define HAS_MKDIR /**/
87250799 233
fe14fcc3 234/* HAS_NDBM:
87250799 235 * This symbol, if defined, indicates that ndbm.h exists and should
236 * be included.
237 */
fe14fcc3 238#define HAS_NDBM /**/
87250799 239
fe14fcc3 240/* HAS_ODBM:
87250799 241 * This symbol, if defined, indicates that dbm.h exists and should
242 * be included.
243 */
fe14fcc3 244/*#define HAS_ODBM /**/
87250799 245
fe14fcc3 246/* HAS_READDIR:
87250799 247 * This symbol, if defined, indicates that the readdir routine is available
248 * from the C library to create directories.
249 */
fe14fcc3 250#define HAS_READDIR /**/
87250799 251
fe14fcc3 252/* HAS_RENAME:
87250799 253 * This symbol, if defined, indicates that the rename routine is available
254 * to rename files. Otherwise you should do the unlink(), link(), unlink()
255 * trick.
256 */
fe14fcc3 257#define HAS_RENAME /**/
87250799 258
fe14fcc3 259/* HAS_RMDIR:
87250799 260 * This symbol, if defined, indicates that the rmdir routine is available
261 * to remove directories. Otherwise you should fork off a new process to
262 * exec /bin/rmdir.
263 */
fe14fcc3 264#define HAS_RMDIR /**/
87250799 265
fe14fcc3 266/* HAS_SETEGID:
87250799 267 * This symbol, if defined, indicates that the setegid routine is available
268 * to change the effective gid of the current program.
269 */
fe14fcc3 270/*#define HAS_SETEGID /**/
87250799 271
fe14fcc3 272/* HAS_SETEUID:
87250799 273 * This symbol, if defined, indicates that the seteuid routine is available
274 * to change the effective uid of the current program.
275 */
fe14fcc3 276/*#define HAS_SETEUID /**/
87250799 277
fe14fcc3 278/* HAS_SETPGRP:
87250799 279 * This symbol, if defined, indicates that the setpgrp() routine is
280 * available to set the current process group.
281 */
fe14fcc3 282/*#define HAS_SETPGRP /**/
87250799 283
fe14fcc3 284/* HAS_SETPRIORITY:
87250799 285 * This symbol, if defined, indicates that the setpriority() routine is
286 * available to set a process's priority.
287 */
fe14fcc3 288/*#define HAS_SETPRIORITY /**/
87250799 289
fe14fcc3 290/* HAS_SETREGID:
87250799 291 * This symbol, if defined, indicates that the setregid routine is available
292 * to change the real and effective gid of the current program.
293 */
fe14fcc3 294/*#define HAS_SETREGID /**/
87250799 295
fe14fcc3 296/* HAS_SETREUID:
87250799 297 * This symbol, if defined, indicates that the setreuid routine is available
298 * to change the real and effective uid of the current program.
299 */
fe14fcc3 300/*#define HAS_SETREUID /**/
87250799 301
fe14fcc3 302/* HAS_SETRGID:
87250799 303 * This symbol, if defined, indicates that the setrgid routine is available
304 * to change the real gid of the current program.
305 */
fe14fcc3 306/*#define HAS_SETRGID /**/
87250799 307
fe14fcc3 308/* HAS_SETRUID:
87250799 309 * This symbol, if defined, indicates that the setruid routine is available
310 * to change the real uid of the current program.
311 */
fe14fcc3 312/*#define HAS_SETRUID /**/
87250799 313
fe14fcc3 314/* HAS_SOCKET:
87250799 315 * This symbol, if defined, indicates that the BSD socket interface is
316 * supported.
317 */
fe14fcc3 318/* HAS_SOCKETPAIR:
87250799 319 * This symbol, if defined, indicates that the BSD socketpair call is
320 * supported.
321 */
322/* OLDSOCKET:
323 * This symbol, if defined, indicates that the 4.1c BSD socket interface
324 * is supported instead of the 4.2/4.3 BSD socket interface.
325 */
fe14fcc3 326/*#undef HAS_SOCKET /**/
87250799 327
fe14fcc3 328/*#undef HAS_SOCKETPAIR /**/
87250799 329
330/*#undef OLDSOCKET /**/
331
332/* STATBLOCKS:
333 * This symbol is defined if this system has a stat structure declaring
334 * st_blksize and st_blocks.
335 */
336/*#define STATBLOCKS /**/
337
338/* STDSTDIO:
339 * This symbol is defined if this system has a FILE structure declaring
340 * _ptr and _cnt in stdio.h.
341 */
342#define STDSTDIO /**/
343
344/* STRUCTCOPY:
345 * This symbol, if defined, indicates that this C compiler knows how
346 * to copy structures. If undefined, you'll need to use a block copy
347 * routine of some sort instead.
348 */
349#define STRUCTCOPY /**/
350
fe14fcc3 351/* HAS_SYMLINK:
87250799 352 * This symbol, if defined, indicates that the symlink routine is available
353 * to create symbolic links.
354 */
fe14fcc3 355/*#define HAS_SYMLINK /**/
87250799 356
fe14fcc3 357/* HAS_SYSCALL:
87250799 358 * This symbol, if defined, indicates that the syscall routine is available
359 * to call arbitrary system calls. If undefined, that's tough.
360 */
fe14fcc3 361/*#define HAS_SYSCALL /**/
87250799 362
fe14fcc3 363/* s_tm:
87250799 364 * This symbol is defined if this system declares "struct tm" in
365 * in <sys/time.h> rather than <time.h>. We can't just say
366 * -I/usr/include/sys because some systems have both time files, and
367 * the -I trick gets the wrong one.
368 */
fe14fcc3 369/* I_SYS_TIME:
87250799 370 * This symbol is defined if this system has the file <sys/time.h>.
371 */
372/*
373 * I_TIME:
374 * This symbol is defined if time this system has the file <time.h>.
375 */
fe14fcc3 376/*#undef s_tm /**/
377/*#define I_SYS_TIME /**/
87250799 378#define I_TIME
379
380/* VARARGS:
381 * This symbol, if defined, indicates to the C program that it should
382 * include varargs.h.
383 */
384#define VARARGS /**/
385
386/* vfork:
387 * This symbol, if defined, remaps the vfork routine to fork if the
388 * vfork() routine isn't supported here.
389 */
390/*#undef vfork fork /**/
391
392/* VOIDSIG:
393 * This symbol is defined if this system declares "void (*signal())()" in
394 * signal.h. The old way was to declare it as "int (*signal())()". It
395 * is up to the package author to declare things correctly based on the
396 * symbol.
397 */
398#define VOIDSIG /**/
399
fe14fcc3 400/* HAS_VPRINTF:
87250799 401 * This symbol, if defined, indicates that the vprintf routine is available
402 * to printf with a pointer to an argument list. If unavailable, you
403 * may need to write your own, probably in terms of _doprnt().
404 */
405/* CHARVSPRINTF:
406 * This symbol is defined if this system has vsprintf() returning type
407 * (char*). The trend seems to be to declare it as "int vsprintf()". It
408 * is up to the package author to declare vsprintf correctly based on the
409 * symbol.
410 */
fe14fcc3 411#define HAS_VPRINTF /**/
87250799 412/*#undef CHARVSPRINTF /**/
413
414/* GIDTYPE:
415 * This symbol has a value like gid_t, int, ushort, or whatever type is
416 * used to declare group ids in the kernel.
417 */
418/* TODO */
419#define GIDTYPE int /**/
420
421/* I_DIRENT:
422 * This symbol, if defined, indicates to the C program that it should
423 * include dirent.h.
424 */
425/* DIRNAMLEN:
426 * This symbol, if defined, indicates to the C program that the length
427 * of directory entry names is provided by a d_namlen field. Otherwise
428 * you need to do strlen() on the d_name field.
429 */
430/*#undef I_DIRENT /**/
431#define DIRNAMLEN /**/
432
433/* I_FCNTL:
434 * This symbol, if defined, indicates to the C program that it should
435 * include fcntl.h.
436 */
39c3038c 437/*#define I_FCNTL /**/
87250799 438
439/* I_GRP:
440 * This symbol, if defined, indicates to the C program that it should
441 * include grp.h.
442 */
443/*#define I_GRP /**/
444
445/* I_PWD:
446 * This symbol, if defined, indicates to the C program that it should
447 * include pwd.h.
448 */
449/* PWQUOTA:
450 * This symbol, if defined, indicates to the C program that struct passwd
451 * contains pw_quota.
452 */
453/* PWAGE:
454 * This symbol, if defined, indicates to the C program that struct passwd
455 * contains pw_age.
456 */
457/*#define I_PWD /**/
458/*#define PWQUOTA /**/
459/*#undef PWAGE /**/
460
fe14fcc3 461/* I_SYS_DIR:
87250799 462 * This symbol, if defined, indicates to the C program that it should
463 * include sys/dir.h.
464 */
fe14fcc3 465#define I_SYS_DIR /**/
87250799 466
467/* I_SYSIOCTL:
468 * This symbol, if defined, indicates that sys/ioctl.h exists and should
469 * be included.
470 */
471/*#define I_SYSIOCTL /**/
472
473/* I_VARARGS:
474 * This symbol, if defined, indicates to the C program that it should
475 * include varargs.h.
476 */
477#define I_VARARGS /**/
478
479/* INTSIZE:
480 * This symbol contains the size of an int, so that the C preprocessor
481 * can make decisions based on it.
482 */
483#define INTSIZE 2 /**/
484
485/* RANDBITS:
486 * This symbol contains the number of bits of random number the rand()
487 * function produces. Usual values are 15, 16, and 31.
488 */
489#define RANDBITS 31 /**/
490
491/* SIG_NAME:
492 * This symbol contains an list of signal names in order.
493 */
494#ifdef OS2
495#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","IOT","EMT","FPE",\
496 /* 0 1 2 3 4 5 6 7 8 */\
fe14fcc3 497 "KILL","BUS","SEGV","SYS","PIPE","UALRM","TERM","ALRM","USR2","CLD",\
87250799 498 /* 9 10 11 12 13 14 15 16 17 18 */\
499 "PWR","USR3","BREAK","ABRT"
500 /*19 20 21 22 */
501#else
502#define SIG_NAME "ZERO","HUP","INT","QUIT","ILL","TRAP","IOT","EMT","FPE","KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CHLD","TTIN","TTOU","IO","XCPU","XFSZ","VTALRM","PROF","WINCH","USR1","USR2" /**/
503#endif /* OS2 */
504
505/* STDCHAR:
506 * This symbol is defined to be the type of char used in stdio.h.
507 * It has the values "unsigned char" or "char".
508 */
509#define STDCHAR char /**/
510
511/* UIDTYPE:
512 * This symbol has a value like uid_t, int, ushort, or whatever type is
513 * used to declare user ids in the kernel.
514 */
515#define UIDTYPE int /**/
516
517/* VOIDFLAGS:
518 * This symbol indicates how much support of the void type is given by this
519 * compiler. What various bits mean:
520 *
521 * 1 = supports declaration of void
522 * 2 = supports arrays of pointers to functions returning void
523 * 4 = supports comparisons between pointers to void functions and
524 * addresses of void functions
525 *
526 * The package designer should define VOIDUSED to indicate the requirements
527 * of the package. This can be done either by #defining VOIDUSED before
528 * including config.h, or by defining defvoidused in Myinit.U. If the
529 * latter approach is taken, only those flags will be tested. If the
530 * level of void support necessary is not present, defines void to int.
531 */
532#ifndef VOIDUSED
533#define VOIDUSED 7
534#endif
535#define VOIDFLAGS 7
536#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
537#define void int /* is void to be avoided? */
538#define M_VOID /* Xenix strikes again */
539#endif
540
541/* PRIVLIB:
542 * This symbol contains the name of the private library for this package.
543 * The library is private in the sense that it needn't be in anyone's
544 * execution path, but it should be accessible by the world. The program
545 * should be prepared to do ^ expansion.
546 */
39c3038c 547#define PRIVLIB "c:/bin/perl" /**/
87250799 548
549/*
550 * BUGGY_MSC:
551 * This symbol is defined if you are the unfortunate owner of a buggy
552 * Microsoft C compiler and want to use intrinsic functions. Versions
553 * up to 5.1 are known conform to this definition.
554 */
555/*#define BUGGY_MSC /**/
556
557/*
558 * BINARY:
559 * This symbol is defined if you run under an operating system that
560 * distinguishes between binary and text files. If so the function
561 * setmode will be used to set the file into binary mode.
562 */
563#define BINARY
564
565#define S_ISUID 0
566#define S_ISGID 0
567#define CASTNEGFLOAT