perl 3.0 patch #33 patch #29, continued
[p5sagit/p5-mst-13.2.git] / perl.h
1 /* $Header: perl.h,v 3.0.1.9 90/10/15 17:59:41 lwall Locked $
2  *
3  *    Copyright (c) 1989, Larry Wall
4  *
5  *    You may distribute under the terms of the GNU General Public License
6  *    as specified in the README file that comes with the perl 3.0 kit.
7  *
8  * $Log:        perl.h,v $
9  * Revision 3.0.1.9  90/10/15  17:59:41  lwall
10  * patch29: some machines didn't like unsigned C preprocessor values
11  * 
12  * Revision 3.0.1.8  90/08/09  04:10:53  lwall
13  * patch19: various MSDOS and OS/2 patches folded in
14  * patch19: did preliminary work toward debugging packages and evals
15  * patch19: added -x switch to extract script from input trash
16  * 
17  * Revision 3.0.1.7  90/03/27  16:12:52  lwall
18  * patch16: MSDOS support
19  * patch16: support for machines that can't cast negative floats to unsigned ints
20  * 
21  * Revision 3.0.1.6  90/03/12  16:40:43  lwall
22  * patch13: did some ndir straightening up for Xenix
23  * 
24  * Revision 3.0.1.5  90/02/28  17:52:28  lwall
25  * patch9: Configure now determines whether volatile is supported
26  * patch9: volatilized some more variables for super-optimizing compilers
27  * patch9: unused VREG symbol deleted
28  * patch9: perl can now start up other interpreters scripts  
29  * patch9: you may now undef $/ to have no input record separator
30  * patch9: nested evals clobbered their longjmp environment
31  * 
32  * Revision 3.0.1.4  89/12/21  20:07:35  lwall
33  * patch7: arranged for certain registers to be restored after longjmp()
34  * patch7: Configure now compiles a test program to figure out time.h fiasco
35  * patch7: Configure now detects DG/UX thingies like [sg]etpgrp2 and utime.h
36  * patch7: memcpy() and memset() return void in __STDC__
37  * patch7: errno may now be a macro with an lvalue
38  * patch7: ANSI strerror() is now supported
39  * patch7: Xenix support for sys/ndir.h, cross compilation
40  * 
41  * Revision 3.0.1.3  89/11/17  15:28:57  lwall
42  * patch5: byteorder now is a hex value
43  * patch5: Configure now looks for <time.h> including <sys/time.h>
44  * 
45  * Revision 3.0.1.2  89/11/11  04:39:38  lwall
46  * patch2: Configure may now set -DDEBUGGING
47  * patch2: netinet/in.h needed sys/types.h some places
48  * patch2: more <sys/time.h> and <time.h> wrangling
49  * patch2: yydebug moved to where type doesn't matter  
50  * 
51  * Revision 3.0.1.1  89/10/26  23:17:08  lwall
52  * patch1: vfork now conditionally defined based on VFORK
53  * patch1: DEC risc machines have a buggy memcmp
54  * patch1: perl.h now includes <netinet/in.h> if it exists
55  * 
56  * Revision 3.0  89/10/18  15:21:21  lwall
57  * 3.0 baseline
58  * 
59  */
60
61 #define VOIDUSED 1
62 #include "config.h"
63
64 #ifdef MSDOS
65 /*
66  * BUGGY_MSC:
67  *      This symbol is defined if you are the unfortunate owner of a buggy
68  *      Microsoft C compiler and want to use intrinsic functions.  Versions
69  *      up to 5.1 are known conform to this definition.  This is not needed
70  *      under Unix.
71  */
72 #define BUGGY_MSC                       /**/
73 /*
74  * BINARY:
75  *      This symbol is defined if you run under an operating system that
76  *      distinguishes between binary and text files.  If so the function
77  *      setmode will be used to set the file into binary mode.  Unix
78  *      doesn't distinguish.
79  */
80 #define BINARY                          /**/
81
82 #define I_FCNTL
83
84 #else /* !MSDOS */
85
86 /*
87  * The following symbols are defined if your operating system supports
88  * functions by that name.  All Unixes I know of support them, thus they
89  * are not checked by the configuration script, but are directly defined
90  * here.
91  */
92 #define CHOWN
93 #define CHROOT
94 #define FORK
95 #define GETLOGIN
96 #define GETPPID
97 #define KILL
98 #define LINK
99 #define PIPE
100 #define WAIT
101 #define UMASK
102 /*
103  * The following symbols are defined if your operating system supports
104  * password and group functions in general.  All Unix systems do.
105  */
106 #define GROUP
107 #define PASSWD
108
109 #endif /* !MSDOS */
110
111 #if defined(HASVOLATILE) || defined(__STDC__)
112 #define VOLATILE volatile
113 #else
114 #define VOLATILE
115 #endif
116
117 #ifdef IAMSUID
118 #   ifndef TAINT
119 #       define TAINT
120 #   endif
121 #endif
122
123 #ifndef VFORK
124 #   define vfork fork
125 #endif
126
127 #ifdef GETPGRP2
128 #   ifndef GETPGRP
129 #       define GETPGRP
130 #   endif
131 #   define getpgrp getpgrp2
132 #endif
133
134 #ifdef SETPGRP2
135 #   ifndef SETPGRP
136 #       define SETPGRP
137 #   endif
138 #   define setpgrp setpgrp2
139 #endif
140
141 #if defined(MEMCMP) && defined(mips) && BYTEORDER == 0x1234
142 #undef MEMCMP
143 #endif
144
145 #ifdef MEMCPY
146 #ifndef memcpy
147 #if defined(__STDC__ ) || defined(MSDOS)
148 extern void *memcpy(), *memset();
149 #else
150 extern char *memcpy(), *memset();
151 #endif
152 extern int memcmp();
153 #endif
154 #define bcopy(s1,s2,l) memcpy(s2,s1,l)
155 #define bzero(s,l) memset(s,0,l)
156 #endif
157 #ifndef BCMP            /* prefer bcmp slightly 'cuz it doesn't order */
158 #define bcmp(s1,s2,l) memcmp(s1,s2,l)
159 #endif
160
161 #include <stdio.h>
162 #include <ctype.h>
163 #include <setjmp.h>
164 #ifndef MSDOS
165 #include <sys/param.h>  /* if this needs types.h we're still wrong */
166 #endif
167
168 #ifndef _TYPES_         /* If types.h defines this it's easy. */
169 #ifndef major           /* Does everyone's types.h define this? */
170 #include <sys/types.h>
171 #endif
172 #endif
173
174 #ifdef I_NETINET_IN
175 #include <netinet/in.h>
176 #endif
177
178 #include <sys/stat.h>
179
180 #ifdef I_TIME
181 #   include <time.h>
182 #endif
183
184 #ifdef I_SYSTIME
185 #   ifdef SYSTIMEKERNEL
186 #       define KERNEL
187 #   endif
188 #   include <sys/time.h>
189 #   ifdef SYSTIMEKERNEL
190 #       undef KERNEL
191 #   endif
192 #endif
193
194 #ifndef MSDOS
195 #include <sys/times.h>
196 #endif
197
198 #if defined(STRERROR) && (!defined(MKDIR) || !defined(RMDIR))
199 #undef STRERROR
200 #endif
201
202 #include <errno.h>
203 #ifndef MSDOS
204 #ifndef errno
205 extern int errno;     /* ANSI allows errno to be an lvalue expr */
206 #endif
207 #endif
208
209 #ifdef STRERROR
210 char *strerror();
211 #else
212 extern int sys_nerr;
213 extern char *sys_errlist[];
214 #define strerror(e) ((e) < 0 || (e) >= sys_nerr ? "(unknown)" : sys_errlist[e])
215 #endif
216
217 #ifdef I_SYSIOCTL
218 #ifndef _IOCTL_
219 #include <sys/ioctl.h>
220 #endif
221 #endif
222
223 #if defined(mc300) || defined(mc500) || defined(mc700)  /* MASSCOMP */
224 #ifdef SOCKETPAIR
225 #undef SOCKETPAIR
226 #endif
227 #ifdef NDBM
228 #undef NDBM
229 #endif
230 #endif
231
232 #ifdef NDBM
233 #include <ndbm.h>
234 #define SOME_DBM
235 #ifdef ODBM
236 #undef ODBM
237 #endif
238 #else
239 #ifdef ODBM
240 #ifdef NULL
241 #undef NULL             /* suppress redefinition message */
242 #endif
243 #include <dbm.h>
244 #ifdef NULL
245 #undef NULL
246 #endif
247 #define NULL 0          /* silly thing is, we don't even use this */
248 #define SOME_DBM
249 #define dbm_fetch(db,dkey) fetch(dkey)
250 #define dbm_delete(db,dkey) delete(dkey)
251 #define dbm_store(db,dkey,dcontent,flags) store(dkey,dcontent)
252 #define dbm_close(db) dbmclose()
253 #define dbm_firstkey(db) firstkey()
254 #endif /* ODBM */
255 #endif /* NDBM */
256 #ifdef SOME_DBM
257 EXT char *dbmkey;
258 EXT int dbmlen;
259 #endif
260
261 #if INTSIZE == 2
262 #define htoni htons
263 #define ntohi ntohs
264 #else
265 #define htoni htonl
266 #define ntohi ntohl
267 #endif
268
269 #if defined(I_DIRENT) && !defined(M_XENIX)
270 #   include <dirent.h>
271 #   define DIRENT dirent
272 #else
273 #   ifdef I_SYSNDIR
274 #       include <sys/ndir.h>
275 #       define DIRENT direct
276 #   else
277 #       ifdef I_SYSDIR
278 #           ifdef hp9000s500
279 #               include <ndir.h>        /* may be wrong in the future */
280 #           else
281 #               include <sys/dir.h>
282 #           endif
283 #           define DIRENT direct
284 #       endif
285 #   endif
286 #endif
287
288 typedef unsigned int STRLEN;
289
290 typedef struct arg ARG;
291 typedef struct cmd CMD;
292 typedef struct formcmd FCMD;
293 typedef struct scanpat SPAT;
294 typedef struct stio STIO;
295 typedef struct sub SUBR;
296 typedef struct string STR;
297 typedef struct atbl ARRAY;
298 typedef struct htbl HASH;
299 typedef struct regexp REGEXP;
300 typedef struct stabptrs STBP;
301 typedef struct stab STAB;
302 typedef struct callsave CSV;
303
304 #include "handy.h"
305 #include "regexp.h"
306 #include "str.h"
307 #include "util.h"
308 #include "form.h"
309 #include "stab.h"
310 #include "spat.h"
311 #include "arg.h"
312 #include "cmd.h"
313 #include "array.h"
314 #include "hash.h"
315
316 #if defined(iAPX286) || defined(M_I286) || defined(I80286)
317 #   define I286
318 #endif
319
320 #ifndef __STDC__
321 #ifdef CHARSPRINTF
322     char *sprintf();
323 #else
324     int sprintf();
325 #endif
326 #endif
327
328 EXT char *Yes INIT("1");
329 EXT char *No INIT("");
330
331 /* "gimme" values */
332
333 /* Note: cmd.c assumes that it can use && to produce one of these values! */
334 #define G_SCALAR 0
335 #define G_ARRAY 1
336
337 #ifdef CRIPPLED_CC
338 int str_true();
339 #else /* !CRIPPLED_CC */
340 #define str_true(str) (Str = (str), \
341         (Str->str_pok ? \
342             ((*Str->str_ptr > '0' || \
343               Str->str_cur > 1 || \
344               (Str->str_cur && *Str->str_ptr != '0')) ? 1 : 0) \
345         : \
346             (Str->str_nok ? (Str->str_u.str_nval != 0.0) : 0 ) ))
347 #endif /* CRIPPLED_CC */
348
349 #ifdef DEBUGGING
350 #define str_peek(str) (Str = (str), \
351         (Str->str_pok ? \
352             Str->str_ptr : \
353             (Str->str_nok ? \
354                 (sprintf(tokenbuf,"num(%g)",Str->str_u.str_nval), \
355                     (char*)tokenbuf) : \
356                 "" )))
357 #endif
358
359 #ifdef CRIPPLED_CC
360 char *str_get();
361 #else
362 #ifdef TAINT
363 #define str_get(str) (Str = (str), tainted |= Str->str_tainted, \
364         (Str->str_pok ? Str->str_ptr : str_2ptr(Str)))
365 #else
366 #define str_get(str) (Str = (str), (Str->str_pok ? Str->str_ptr : str_2ptr(Str)))
367 #endif /* TAINT */
368 #endif /* CRIPPLED_CC */
369
370 #ifdef CRIPPLED_CC
371 double str_gnum();
372 #else /* !CRIPPLED_CC */
373 #ifdef TAINT
374 #define str_gnum(str) (Str = (str), tainted |= Str->str_tainted, \
375         (Str->str_nok ? Str->str_u.str_nval : str_2num(Str)))
376 #else /* !TAINT */
377 #define str_gnum(str) (Str = (str), (Str->str_nok ? Str->str_u.str_nval : str_2num(Str)))
378 #endif /* TAINT*/
379 #endif /* CRIPPLED_CC */
380 EXT STR *Str;
381
382 #define GROWSTR(pp,lp,len) if (*(lp) < (len)) growstr(pp,lp,len)
383
384 #ifndef MSDOS
385 #define STR_GROW(str,len) if ((str)->str_len < (len)) str_grow(str,len)
386 #define Str_Grow str_grow
387 #else
388 /* extra parentheses intentionally NOT placed around "len"! */
389 #define STR_GROW(str,len) if ((str)->str_len < (unsigned long)len) \
390                 str_grow(str,(unsigned long)len)
391 #define Str_Grow(str,len) str_grow(str,(unsigned long)(len))
392 #endif /* MSDOS */
393
394 #ifndef BYTEORDER
395 #define BYTEORDER 0x1234
396 #endif
397
398 #if defined(htonl) && !defined(HTONL)
399 #define HTONL
400 #endif
401 #if defined(htons) && !defined(HTONS)
402 #define HTONS
403 #endif
404 #if defined(ntohl) && !defined(NTOHL)
405 #define NTOHL
406 #endif
407 #if defined(ntohs) && !defined(NTOHS)
408 #define NTOHS
409 #endif
410 #ifndef HTONL
411 #if (BYTEORDER & 0xffff) != 0x4321
412 #define HTONS
413 #define HTONL
414 #define NTOHS
415 #define NTOHL
416 #define MYSWAP
417 #define htons my_swap
418 #define htonl my_htonl
419 #define ntohs my_swap
420 #define ntohl my_ntohl
421 #endif
422 #else
423 #if (BYTEORDER & 0xffff) == 0x4321
424 #undef HTONS
425 #undef HTONL
426 #undef NTOHS
427 #undef NTOHL
428 #endif
429 #endif
430
431 #ifdef CASTNEGFLOAT
432 #define U_S(what) ((unsigned short)(what))
433 #define U_I(what) ((unsigned int)(what))
434 #define U_L(what) ((unsigned long)(what))
435 #else
436 unsigned long castulong();
437 #define U_S(what) ((unsigned int)castulong(what))
438 #define U_I(what) ((unsigned int)castulong(what))
439 #define U_L(what) (castulong(what))
440 #endif
441
442 CMD *add_label();
443 CMD *block_head();
444 CMD *append_line();
445 CMD *make_acmd();
446 CMD *make_ccmd();
447 CMD *make_icmd();
448 CMD *invert();
449 CMD *addcond();
450 CMD *addloop();
451 CMD *wopt();
452 CMD *over();
453
454 STAB *stabent();
455 STAB *genstab();
456
457 ARG *stab2arg();
458 ARG *op_new();
459 ARG *make_op();
460 ARG *make_match();
461 ARG *make_split();
462 ARG *rcatmaybe();
463 ARG *listish();
464 ARG *maybelistish();
465 ARG *localize();
466 ARG *fixeval();
467 ARG *jmaybe();
468 ARG *l();
469 ARG *fixl();
470 ARG *mod_match();
471 ARG *make_list();
472 ARG *cmd_to_arg();
473 ARG *addflags();
474 ARG *hide_ary();
475 ARG *cval_to_arg();
476
477 STR *str_new();
478 STR *stab_str();
479
480 int do_each();
481 int do_subr();
482 int do_match();
483 int do_unpack();
484 int eval();             /* this evaluates expressions */
485 int do_eval();          /* this evaluates eval operator */
486 int do_assign();
487
488 SUBR *make_sub();
489
490 FCMD *load_format();
491
492 char *scanpat();
493 char *scansubst();
494 char *scantrans();
495 char *scanstr();
496 char *scanreg();
497 char *str_append_till();
498 char *str_gets();
499 char *str_grow();
500
501 bool do_open();
502 bool do_close();
503 bool do_print();
504 bool do_aprint();
505 bool do_exec();
506 bool do_aexec();
507
508 int do_subst();
509 int cando();
510 int ingroup();
511
512 void str_replace();
513 void str_inc();
514 void str_dec();
515 void str_free();
516 void stab_clear();
517 void do_join();
518 void do_sprintf();
519 void do_accept();
520 void do_pipe();
521 void do_vecset();
522 void savelist();
523 void saveitem();
524 void saveint();
525 void savelong();
526 void savesptr();
527 void savehptr();
528 void restorelist();
529 void repeatcpy();
530 HASH *savehash();
531 ARRAY *saveary();
532
533 EXT char **origargv;
534 EXT int origargc;
535 EXT line_t subline INIT(0);
536 EXT STR *subname INIT(Nullstr);
537 EXT int arybase INIT(0);
538
539 struct outrec {
540     long        o_lines;
541     char        *o_str;
542     int         o_len;
543 };
544
545 EXT struct outrec outrec;
546 EXT struct outrec toprec;
547
548 EXT STAB *stdinstab INIT(Nullstab);
549 EXT STAB *last_in_stab INIT(Nullstab);
550 EXT STAB *defstab INIT(Nullstab);
551 EXT STAB *argvstab INIT(Nullstab);
552 EXT STAB *envstab INIT(Nullstab);
553 EXT STAB *sigstab INIT(Nullstab);
554 EXT STAB *defoutstab INIT(Nullstab);
555 EXT STAB *curoutstab INIT(Nullstab);
556 EXT STAB *argvoutstab INIT(Nullstab);
557 EXT STAB *incstab INIT(Nullstab);
558 EXT STAB *leftstab INIT(Nullstab);
559 EXT STAB *amperstab INIT(Nullstab);
560 EXT STAB *rightstab INIT(Nullstab);
561 EXT STAB *DBstab INIT(Nullstab);
562 EXT STAB *DBline INIT(Nullstab);
563 EXT STAB *DBsub INIT(Nullstab);
564
565 EXT HASH *defstash;             /* main symbol table */
566 EXT HASH *curstash;             /* symbol table for current package */
567 EXT HASH *debstash;             /* symbol table for perldb package */
568
569 EXT STR *curstname;             /* name of current package */
570
571 EXT STR *freestrroot INIT(Nullstr);
572 EXT STR *lastretstr INIT(Nullstr);
573 EXT STR *DBsingle INIT(Nullstr);
574 EXT STR *DBtrace INIT(Nullstr);
575 EXT STR *DBsignal INIT(Nullstr);
576
577 EXT int lastspbase;
578 EXT int lastsize;
579
580 EXT char *origfilename;
581 EXT FILE * VOLATILE rsfp;
582 EXT char buf[1024];
583 EXT char *bufptr;
584 EXT char *oldbufptr;
585 EXT char *oldoldbufptr;
586 EXT char *bufend;
587
588 EXT STR *linestr INIT(Nullstr);
589
590 EXT int record_separator INIT('\n');
591 EXT int rslen INIT(1);
592 EXT char *ofs INIT(Nullch);
593 EXT int ofslen INIT(0);
594 EXT char *ors INIT(Nullch);
595 EXT int orslen INIT(0);
596 EXT char *ofmt INIT(Nullch);
597 EXT char *inplace INIT(Nullch);
598 EXT char *nointrp INIT("");
599
600 EXT bool preprocess INIT(FALSE);
601 EXT bool minus_n INIT(FALSE);
602 EXT bool minus_p INIT(FALSE);
603 EXT bool minus_a INIT(FALSE);
604 EXT bool doswitches INIT(FALSE);
605 EXT bool dowarn INIT(FALSE);
606 EXT bool doextract INIT(FALSE);
607 EXT bool allstabs INIT(FALSE);  /* init all customary symbols in symbol table?*/
608 EXT bool sawampersand INIT(FALSE);      /* must save all match strings */
609 EXT bool sawstudy INIT(FALSE);          /* do fbminstr on all strings */
610 EXT bool sawi INIT(FALSE);              /* study must assume case insensitive */
611 EXT bool sawvec INIT(FALSE);
612 EXT bool localizing INIT(FALSE);        /* are we processing a local() list? */
613
614 #ifdef CSH
615 char *cshname INIT(CSH);
616 int cshlen INIT(0);
617 #endif /* CSH */
618
619 #ifdef TAINT
620 EXT bool tainted INIT(FALSE);           /* using variables controlled by $< */
621 #endif
622
623 #ifndef MSDOS
624 #define TMPPATH "/tmp/perl-eXXXXXX"
625 #else
626 #define TMPPATH "/tmp/plXXXXXX"
627 #endif /* MSDOS */
628 EXT char *e_tmpname;
629 EXT FILE *e_fp INIT(Nullfp);
630
631 EXT char tokenbuf[256];
632 EXT int expectterm INIT(TRUE);          /* how to interpret ambiguous tokens */
633 EXT VOLATILE int in_eval INIT(FALSE);   /* trap fatal errors? */
634 EXT int multiline INIT(0);              /* $*--do strings hold >1 line? */
635 EXT int forkprocess;                    /* so do_open |- can return proc# */
636 EXT int do_undump INIT(0);              /* -u or dump seen? */
637 EXT int error_count INIT(0);            /* how many errors so far, max 10 */
638 EXT int multi_start INIT(0);            /* 1st line of multi-line string */
639 EXT int multi_end INIT(0);              /* last line of multi-line string */
640 EXT int multi_open INIT(0);             /* delimiter of said string */
641 EXT int multi_close INIT(0);            /* delimiter of said string */
642
643 FILE *popen();
644 /* char *str_get(); */
645 STR *interp();
646 void free_arg();
647 STIO *stio_new();
648
649 EXT struct stat statbuf;
650 EXT struct stat statcache;
651 STAB *statstab INIT(Nullstab);
652 STR *statname;
653 #ifndef MSDOS
654 EXT struct tms timesbuf;
655 #endif
656 EXT int uid;
657 EXT int euid;
658 EXT int gid;
659 EXT int egid;
660 UIDTYPE getuid();
661 UIDTYPE geteuid();
662 GIDTYPE getgid();
663 GIDTYPE getegid();
664 EXT int unsafe;
665
666 #ifdef DEBUGGING
667 EXT VOLATILE int debug INIT(0);
668 EXT int dlevel INIT(0);
669 EXT int dlmax INIT(128);
670 EXT char *debname;
671 EXT char *debdelim;
672 #define YYDEBUG 1
673 #endif
674 EXT int perldb INIT(0);
675
676 EXT line_t cmdline INIT(NOLINE);
677
678 EXT STR str_undef;
679 EXT STR str_no;
680 EXT STR str_yes;
681
682 /* runtime control stuff */
683
684 EXT struct loop {
685     char *loop_label;           /* what the loop was called, if anything */
686     int loop_sp;                /* stack pointer to copy stuff down to */
687     jmp_buf loop_env;
688 } *loop_stack;
689
690 EXT int loop_ptr INIT(-1);
691 EXT int loop_max INIT(128);
692
693 EXT jmp_buf top_env;
694
695 EXT char * VOLATILE goto_targ INIT(Nullch); /* cmd_exec gets strange when set */
696
697 struct ufuncs {
698     int (*uf_val)();
699     int (*uf_set)();
700     int uf_index;
701 };
702
703 EXT ARRAY *stack;               /* THE STACK */
704
705 EXT ARRAY * VOLATILE savestack;         /* to save non-local values on */
706
707 EXT ARRAY *tosave;              /* strings to save on recursive subroutine */
708
709 EXT ARRAY *lineary;             /* lines of script for debugger */
710 EXT ARRAY *dbargs;              /* args to call listed by caller function */
711
712 EXT ARRAY *fdpid;               /* keep fd-to-pid mappings for mypopen */
713 EXT HASH *pidstatus;            /* keep pid-to-status mappings for waitpid */
714
715 EXT int *di;                    /* for tmp use in debuggers */
716 EXT char *dc;
717 EXT short *ds;
718
719 double atof();
720 long time();
721 EXT long basetime INIT(0);
722 struct tm *gmtime(), *localtime();
723 char *mktemp();
724 char *index(), *rindex();
725 char *strcpy(), *strcat();
726
727 #ifdef EUNICE
728 #define UNLINK unlnk
729 int unlnk();
730 #else
731 #define UNLINK unlink
732 #endif
733
734 #ifndef SETREUID
735 #ifdef SETRESUID
736 #define setreuid(r,e) setresuid(r,e,-1)
737 #define SETREUID
738 #endif
739 #endif
740 #ifndef SETREGID
741 #ifdef SETRESGID
742 #define setregid(r,e) setresgid(r,e,-1)
743 #define SETREGID
744 #endif
745 #endif