perl 3.0 patch #37 (combined patch)
[p5sagit/p5-mst-13.2.git] / os2 / config.h
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
15 #define GETPRIORITY
16 #define SETPRIORITY
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
71 /* BCMP:
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  */
76 /*#define       BCMP            /**/
77
78 /* BCOPY:
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  */
82 /*#define       BCOPY           /**/
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
92 /* CRYPT:
93  *      This symbol, if defined, indicates that the crypt routine is available
94  *      to encrypt passwords and the like.
95  */
96 /* TODO */
97 /*#define       CRYPT           /**/
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
114 /* DUP2:
115  *      This symbol, if defined, indicates that the dup2 routine is available
116  *      to dup file descriptors.  Otherwise you should use dup().
117  */
118 #define DUP2            /**/
119
120 /* FCHMOD:
121  *      This symbol, if defined, indicates that the fchmod routine is available
122  *      to change mode of opened files.  If unavailable, use chmod().
123  */
124 /*#define       FCHMOD          /**/
125
126 /* FCHOWN:
127  *      This symbol, if defined, indicates that the fchown routine is available
128  *      to change ownership of opened files.  If unavailable, use chown().
129  */
130 /*#define       FCHOWN          /**/
131
132 /* FCNTL:
133  *      This symbol, if defined, indicates to the C program that it should
134  *      include fcntl.h.
135  */
136 /*#define       FCNTL           /**/
137
138 /* FLOCK:
139  *      This symbol, if defined, indicates that the flock() routine is
140  *      available to do file locking.
141  */
142 /*#define       FLOCK           /**/
143
144 /* GETGROUPS:
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  */
149 /*#define       GETGROUPS               /**/
150
151 /* GETHOSTENT:
152  *      This symbol, if defined, indicates that the gethostent() routine is
153  *      available to lookup host names in some data base or other.
154  */
155 /*#define       GETHOSTENT              /**/
156
157 /* GETPGRP:
158  *      This symbol, if defined, indicates that the getpgrp() routine is
159  *      available to get the current process group.
160  */
161 /*#define       GETPGRP         /**/
162
163 /* GETPRIORITY:
164  *      This symbol, if defined, indicates that the getpriority() routine is
165  *      available to get a process's priority.
166  */
167 /*#define       GETPRIORITY             /**/
168
169 /* HTONS:
170  *      This symbol, if defined, indicates that the htons routine (and friends)
171  *      are available to do network order byte swapping.
172  */
173 /* HTONL:
174  *      This symbol, if defined, indicates that the htonl routine (and friends)
175  *      are available to do network order byte swapping.
176  */
177 /* NTOHS:
178  *      This symbol, if defined, indicates that the ntohs routine (and friends)
179  *      are available to do network order byte swapping.
180  */
181 /* NTOHL:
182  *      This symbol, if defined, indicates that the ntohl routine (and friends)
183  *      are available to do network order byte swapping.
184  */
185 /*#define       HTONS           /**/
186 /*#define       HTONL           /**/
187 /*#define       NTOHS           /**/
188 /*#define       NTOHL           /**/
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
201 /* IOCTL:
202  *      This symbol, if defined, indicates that sys/ioctl.h exists and should
203  *      be included.
204  */
205 /*#define       IOCTL           /**/
206
207 /* KILLPG:
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  */
212 /*#define       KILLPG          /**/
213
214 /* MEMCMP:
215  *      This symbol, if defined, indicates that the memcmp routine is available
216  *      to compare blocks of memory.  If undefined, roll your own.
217  */
218 #define MEMCMP          /**/
219
220 /* MEMCPY:
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  */
225 #define MEMCPY          /**/
226
227 /* MKDIR:
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  */
232 #define MKDIR           /**/
233
234 /* NDBM:
235  *      This symbol, if defined, indicates that ndbm.h exists and should
236  *      be included.
237  */
238 /*#define       NDBM            /**/
239
240 /* ODBM:
241  *      This symbol, if defined, indicates that dbm.h exists and should
242  *      be included.
243  */
244 /*#define       ODBM            /**/
245
246 /* READDIR:
247  *      This symbol, if defined, indicates that the readdir routine is available
248  *      from the C library to create directories.
249  */
250 #define READDIR         /**/
251
252 /* RENAME:
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  */
257 #define RENAME          /**/
258
259 /* RMDIR:
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  */
264 #define RMDIR           /**/
265
266 /* SETEGID:
267  *      This symbol, if defined, indicates that the setegid routine is available
268  *      to change the effective gid of the current program.
269  */
270 /*#define       SETEGID         /**/
271
272 /* SETEUID:
273  *      This symbol, if defined, indicates that the seteuid routine is available
274  *      to change the effective uid of the current program.
275  */
276 /*#define       SETEUID         /**/
277
278 /* SETPGRP:
279  *      This symbol, if defined, indicates that the setpgrp() routine is
280  *      available to set the current process group.
281  */
282 /*#define       SETPGRP         /**/
283
284 /* SETPRIORITY:
285  *      This symbol, if defined, indicates that the setpriority() routine is
286  *      available to set a process's priority.
287  */
288 /*#define       SETPRIORITY             /**/
289
290 /* SETREGID:
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  */
294 /*#define       SETREGID                /**/
295
296 /* SETREUID:
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  */
300 /*#define       SETREUID                /**/
301
302 /* SETRGID:
303  *      This symbol, if defined, indicates that the setrgid routine is available
304  *      to change the real gid of the current program.
305  */
306 /*#define       SETRGID         /**/
307
308 /* SETRUID:
309  *      This symbol, if defined, indicates that the setruid routine is available
310  *      to change the real uid of the current program.
311  */
312 /*#define       SETRUID         /**/
313
314 /* SOCKET:
315  *      This symbol, if defined, indicates that the BSD socket interface is
316  *      supported.
317  */
318 /* SOCKETPAIR:
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  */
326 /*#undef SOCKET          /**/
327
328 /*#undef SOCKETPAIR      /**/
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
351 /* SYMLINK:
352  *      This symbol, if defined, indicates that the symlink routine is available
353  *      to create symbolic links.
354  */
355 /*#define       SYMLINK         /**/
356
357 /* SYSCALL:
358  *      This symbol, if defined, indicates that the syscall routine is available
359  *      to call arbitrary system calls.  If undefined, that's tough.
360  */
361 /*#define       SYSCALL         /**/
362
363 /* TMINSYS:
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  */
369 /* I_SYSTIME:
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  */
376 /*#undef        TMINSYS         /**/
377 /*#define       I_SYSTIME       /**/
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
400 /* VPRINTF:
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  */
411 #define VPRINTF         /**/
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  */
437 /*#define       I_FCNTL         /**/
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
461 /* I_SYSDIR:
462  *      This symbol, if defined, indicates to the C program that it should
463  *      include sys/dir.h.
464  */
465 #define I_SYSDIR                /**/
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 */\
497    "KILL","BUS","SEGV","SYS","PIPE","ALRM","TERM","USR1","USR2","CLD",\
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  */
547 #define PRIVLIB "c:/bin/perl"           /**/
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