5 #define PERL_NO_GET_CONTEXT
8 #define PERLIO_NOT_STDIO 1
11 #if defined(PERL_OBJECT) || defined(PERL_CAPI) || defined(PERL_IMPLICIT_SYS)
15 # define open PerlLIO_open3
18 #ifdef I_DIRENT /* XXX maybe better to just rely on perl.h? */
45 /* XXX This comment is just to make I_TERMIO and I_SGTTY visible to
46 metaconfig for future extension writers. We don't use them in POSIX.
47 (This is really sneaky :-) --AD
49 #if defined(I_TERMIOS)
57 #include <sys/types.h>
62 #ifdef MACOS_TRADITIONAL
68 # if !defined(WIN32) && !defined(__CYGWIN__)
69 extern char *tzname[];
72 #if !defined(WIN32) || (defined(__MINGW32__) && !defined(tzname))
73 char *tzname[] = { "" , "" };
77 #if defined(__VMS) && !defined(__POSIX_SOURCE)
78 # include <libdef.h> /* LIB$_INVARG constant */
79 # include <lib$routines.h> /* prototype for lib$ediv() */
80 # include <starlet.h> /* prototype for sys$gettim() */
81 # if DECC_VERSION < 50000000
82 # define pid_t int /* old versions of DECC miss this in types.h */
86 # define mkfifo(a,b) (not_here("mkfifo"),-1)
87 # define tzset() not_here("tzset")
89 #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000)
90 # define HAS_TZNAME /* shows up in VMS 7.0 or Dec C 5.6 */
92 # endif /* __VMS_VER >= 70000000 or Dec C 5.6 */
94 /* The POSIX notion of ttyname() is better served by getname() under VMS */
95 static char ttnambuf[64];
96 # define ttyname(fd) (isatty(fd) > 0 ? getname(fd,ttnambuf,0) : NULL)
98 /* The non-POSIX CRTL times() has void return type, so we just get the
99 current time directly */
100 clock_t vms_times(struct tms *bufptr) {
103 /* Get wall time and convert to 10 ms intervals to
104 * produce the return value that the POSIX standard expects */
105 # if defined(__DECC) && defined (__ALPHA)
108 _ckvmssts(sys$gettim(&vmstime));
110 retval = vmstime & 0x7fffffff;
112 /* (Older hw or ccs don't have an atomic 64-bit type, so we
113 * juggle 32-bit ints (and a float) to produce a time_t result
114 * with minimal loss of information.) */
115 long int vmstime[2],remainder,divisor = 100000;
116 _ckvmssts(sys$gettim((unsigned long int *)vmstime));
117 vmstime[1] &= 0x7fff; /* prevent overflow in EDIV */
118 _ckvmssts(lib$ediv(&divisor,vmstime,(long int *)&retval,&remainder));
120 /* Fill in the struct tms using the CRTL routine . . .*/
121 times((tbuffer_t *)bufptr);
122 return (clock_t) retval;
124 # define times(t) vms_times(t)
126 #if defined (__CYGWIN__)
127 # define tzname _tzname
131 # define mkfifo(a,b) not_here("mkfifo")
132 # define ttyname(a) (char*)not_here("ttyname")
133 # define sigset_t long
136 # define tzname _tzname
139 # define mode_t short
142 # define mode_t short
144 # define tzset() not_here("tzset")
146 # ifndef _POSIX_OPEN_MAX
147 # define _POSIX_OPEN_MAX FOPEN_MAX /* XXX bogus ? */
150 # define sigaction(a,b,c) not_here("sigaction")
151 # define sigpending(a) not_here("sigpending")
152 # define sigprocmask(a,b,c) not_here("sigprocmask")
153 # define sigsuspend(a) not_here("sigsuspend")
154 # define sigemptyset(a) not_here("sigemptyset")
155 # define sigaddset(a,b) not_here("sigaddset")
156 # define sigdelset(a,b) not_here("sigdelset")
157 # define sigfillset(a) not_here("sigfillset")
158 # define sigismember(a,b) not_here("sigismember")
162 # if defined(OS2) || defined(MACOS_TRADITIONAL)
163 # define mkfifo(a,b) not_here("mkfifo")
164 # else /* !( defined OS2 ) */
166 # define mkfifo(path, mode) (mknod((path), (mode) | S_IFIFO, 0))
169 # endif /* !HAS_MKFIFO */
171 # ifdef MACOS_TRADITIONAL
172 # define ttyname(a) (char*)not_here("ttyname")
173 # define tzset() not_here("tzset")
176 # include <sys/times.h>
178 # include <sys/utsname.h>
180 # include <sys/wait.h>
189 typedef long SysRetLong;
190 typedef sigset_t* POSIX__SigSet;
191 typedef HV* POSIX__SigAction;
193 typedef struct termios* POSIX__Termios;
194 #else /* Define termios types to int, and call not_here for the functions.*/
195 #define POSIX__Termios int
199 #define cfgetispeed(x) not_here("cfgetispeed")
200 #define cfgetospeed(x) not_here("cfgetospeed")
201 #define tcdrain(x) not_here("tcdrain")
202 #define tcflush(x,y) not_here("tcflush")
203 #define tcsendbreak(x,y) not_here("tcsendbreak")
204 #define cfsetispeed(x,y) not_here("cfsetispeed")
205 #define cfsetospeed(x,y) not_here("cfsetospeed")
206 #define ctermid(x) (char *) not_here("ctermid")
207 #define tcflow(x,y) not_here("tcflow")
208 #define tcgetattr(x,y) not_here("tcgetattr")
209 #define tcsetattr(x,y,z) not_here("tcsetattr")
212 /* Possibly needed prototypes */
213 char *cuserid (char *);
214 double strtod (const char *, char **);
215 long strtol (const char *, char **, int);
216 unsigned long strtoul (const char *, char **, int);
219 #define cuserid(a) (char *) not_here("cuserid")
223 #define difftime(a,b) not_here("difftime")
226 #ifndef HAS_FPATHCONF
227 #define fpathconf(f,n) (SysRetLong) not_here("fpathconf")
230 #define mktime(a) not_here("mktime")
233 #define nice(a) not_here("nice")
236 #define pathconf(f,n) (SysRetLong) not_here("pathconf")
239 #define sysconf(n) (SysRetLong) not_here("sysconf")
242 #define readlink(a,b,c) not_here("readlink")
245 #define setpgid(a,b) not_here("setpgid")
248 #define setsid() not_here("setsid")
251 #define strcoll(s1,s2) not_here("strcoll")
254 #define strtod(s1,s2) not_here("strtod")
257 #define strtol(s1,s2,b) not_here("strtol")
260 #define strtoul(s1,s2,b) not_here("strtoul")
263 #define strxfrm(s1,s2,n) not_here("strxfrm")
265 #ifndef HAS_TCGETPGRP
266 #define tcgetpgrp(a) not_here("tcgetpgrp")
268 #ifndef HAS_TCSETPGRP
269 #define tcsetpgrp(a,b) not_here("tcsetpgrp")
272 #define times(a) not_here("times")
275 #define uname(a) not_here("uname")
278 #define waitpid(a,b,c) not_here("waitpid")
283 #define mblen(a,b) not_here("mblen")
287 #define mbstowcs(s, pwcs, n) not_here("mbstowcs")
290 #define mbtowc(pwc, s, n) not_here("mbtowc")
293 #define wcstombs(s, pwcs, n) not_here("wcstombs")
296 #define wctomb(s, wchar) not_here("wcstombs")
298 #if !defined(HAS_MBLEN) && !defined(HAS_MBSTOWCS) && !defined(HAS_MBTOWC) && !defined(HAS_WCSTOMBS) && !defined(HAS_WCTOMB)
299 /* If we don't have these functions, then we wouldn't have gotten a typedef
300 for wchar_t, the wide character type. Defining wchar_t allows the
301 functions referencing it to compile. Its actual type is then meaningless,
302 since without the above functions, all sections using it end up calling
303 not_here() and croak. --Kaveh Ghazi (ghazi@noc.rutgers.edu) 9/18/94. */
309 #ifndef HAS_LOCALECONV
310 #define localeconv() not_here("localeconv")
313 #ifdef HAS_LONG_DOUBLE
314 # if LONG_DOUBLESIZE > NVSIZE
315 # undef HAS_LONG_DOUBLE /* XXX until we figure out how to use them */
319 #ifndef HAS_LONG_DOUBLE
334 croak("POSIX::%s not implemented on this architecture", s);
338 #define PERL_constant_NOTFOUND 1
339 #define PERL_constant_NOTDEF 2
340 #define PERL_constant_ISIV 3
341 #define PERL_constant_ISNO 4
342 #define PERL_constant_ISNV 5
343 #define PERL_constant_ISPV 6
344 #define PERL_constant_ISPVN 7
345 #define PERL_constant_ISUNDEF 8
346 #define PERL_constant_ISUV 9
347 #define PERL_constant_ISYES 10
349 /* These were implemented in the old "constant" subroutine. They are actually
350 macros that take an integer argument and return an integer result. */
352 int_macro_int (const char *name, STRLEN len, IV *arg_result) {
353 /* Initially switch on the length of the name. */
354 /* This code has been edited from a "constant" function generated by:
356 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
358 my $types = {map {($_, 1)} qw(IV)};
359 my @names = (qw(S_ISBLK S_ISCHR S_ISDIR S_ISFIFO S_ISREG WEXITSTATUS WIFEXITED
360 WIFSIGNALED WIFSTOPPED WSTOPSIG WTERMSIG));
362 print constant_types(); # macro defs
363 foreach (C_constant ("POSIX", 'int_macro_int', 'IV', $types, undef, 5, @names) ) {
364 print $_, "\n"; # C constant subs
366 print "#### XS Section:\n";
367 print XS_constant ("POSIX", $types);
373 /* Names all of length 7. */
374 /* S_ISBLK S_ISCHR S_ISDIR S_ISREG */
375 /* Offset 5 gives the best switch position. */
378 if (memEQ(name, "S_ISREG", 7)) {
381 *arg_result = S_ISREG(*arg_result);
382 return PERL_constant_ISIV;
384 return PERL_constant_NOTDEF;
389 if (memEQ(name, "S_ISCHR", 7)) {
392 *arg_result = S_ISCHR(*arg_result);
393 return PERL_constant_ISIV;
395 return PERL_constant_NOTDEF;
400 if (memEQ(name, "S_ISDIR", 7)) {
403 *arg_result = S_ISDIR(*arg_result);
404 return PERL_constant_ISIV;
406 return PERL_constant_NOTDEF;
411 if (memEQ(name, "S_ISBLK", 7)) {
414 *arg_result = S_ISBLK(*arg_result);
415 return PERL_constant_ISIV;
417 return PERL_constant_NOTDEF;
424 /* Names all of length 8. */
425 /* S_ISFIFO WSTOPSIG WTERMSIG */
426 /* Offset 3 gives the best switch position. */
429 if (memEQ(name, "WSTOPSIG", 8)) {
432 *arg_result = WSTOPSIG(*arg_result);
433 return PERL_constant_ISIV;
435 return PERL_constant_NOTDEF;
440 if (memEQ(name, "WTERMSIG", 8)) {
443 *arg_result = WTERMSIG(*arg_result);
444 return PERL_constant_ISIV;
446 return PERL_constant_NOTDEF;
451 if (memEQ(name, "S_ISFIFO", 8)) {
454 *arg_result = S_ISFIFO(*arg_result);
455 return PERL_constant_ISIV;
457 return PERL_constant_NOTDEF;
464 if (memEQ(name, "WIFEXITED", 9)) {
466 *arg_result = WIFEXITED(*arg_result);
467 return PERL_constant_ISIV;
469 return PERL_constant_NOTDEF;
474 if (memEQ(name, "WIFSTOPPED", 10)) {
476 *arg_result = WIFSTOPPED(*arg_result);
477 return PERL_constant_ISIV;
479 return PERL_constant_NOTDEF;
484 /* Names all of length 11. */
485 /* WEXITSTATUS WIFSIGNALED */
486 /* Offset 1 gives the best switch position. */
489 if (memEQ(name, "WEXITSTATUS", 11)) {
492 *arg_result = WEXITSTATUS(*arg_result);
493 return PERL_constant_ISIV;
495 return PERL_constant_NOTDEF;
500 if (memEQ(name, "WIFSIGNALED", 11)) {
503 *arg_result = WIFSIGNALED(*arg_result);
504 return PERL_constant_ISIV;
506 return PERL_constant_NOTDEF;
513 return PERL_constant_NOTFOUND;
517 constant_3 (const char *name, IV *iv_return, NV *nv_return) {
518 /* When generated this function returned values for the list of names given
519 here. However, subsequent manual editing may have added or removed some.
520 B50 B75 CS5 CS6 CS7 CS8 EIO EOF */
521 /* Offset 2 gives the best switch position. */
524 if (memEQ(name, "B50", 3)) {
528 return PERL_constant_ISIV;
530 return PERL_constant_NOTDEF;
535 if (memEQ(name, "B75", 3)) {
539 return PERL_constant_ISIV;
541 return PERL_constant_NOTDEF;
544 if (memEQ(name, "CS5", 3)) {
548 return PERL_constant_ISIV;
550 return PERL_constant_NOTDEF;
555 if (memEQ(name, "CS6", 3)) {
559 return PERL_constant_ISIV;
561 return PERL_constant_NOTDEF;
566 if (memEQ(name, "CS7", 3)) {
570 return PERL_constant_ISIV;
572 return PERL_constant_NOTDEF;
577 if (memEQ(name, "CS8", 3)) {
581 return PERL_constant_ISIV;
583 return PERL_constant_NOTDEF;
588 if (memEQ(name, "EOF", 3)) {
592 return PERL_constant_ISIV;
594 return PERL_constant_NOTDEF;
599 if (memEQ(name, "EIO", 3)) {
603 return PERL_constant_ISIV;
605 return PERL_constant_NOTDEF;
610 return PERL_constant_NOTFOUND;
614 constant_4 (const char *name, IV *iv_return, NV *nv_return) {
615 /* When generated this function returned values for the list of names given
616 here. However, subsequent manual editing may have added or removed some.
617 B110 B134 B150 B200 B300 B600 ECHO EDOM F_OK ISIG IXON NCCS NULL R_OK VEOF
618 VEOL VMIN W_OK X_OK */
619 /* Offset 1 gives the best switch position. */
622 if (memEQ(name, "B110", 4)) {
626 return PERL_constant_ISIV;
628 return PERL_constant_NOTDEF;
631 if (memEQ(name, "B134", 4)) {
635 return PERL_constant_ISIV;
637 return PERL_constant_NOTDEF;
640 if (memEQ(name, "B150", 4)) {
644 return PERL_constant_ISIV;
646 return PERL_constant_NOTDEF;
651 if (memEQ(name, "B200", 4)) {
655 return PERL_constant_ISIV;
657 return PERL_constant_NOTDEF;
662 if (memEQ(name, "B300", 4)) {
666 return PERL_constant_ISIV;
668 return PERL_constant_NOTDEF;
673 if (memEQ(name, "B600", 4)) {
677 return PERL_constant_ISIV;
679 return PERL_constant_NOTDEF;
684 if (memEQ(name, "ECHO", 4)) {
688 return PERL_constant_ISIV;
690 return PERL_constant_NOTDEF;
693 if (memEQ(name, "NCCS", 4)) {
697 return PERL_constant_ISIV;
699 return PERL_constant_NOTDEF;
704 if (memEQ(name, "EDOM", 4)) {
708 return PERL_constant_ISIV;
710 return PERL_constant_NOTDEF;
715 if (memEQ(name, "VEOF", 4)) {
719 return PERL_constant_ISIV;
721 return PERL_constant_NOTDEF;
724 if (memEQ(name, "VEOL", 4)) {
728 return PERL_constant_ISIV;
730 return PERL_constant_NOTDEF;
735 if (memEQ(name, "VMIN", 4)) {
739 return PERL_constant_ISIV;
741 return PERL_constant_NOTDEF;
746 if (memEQ(name, "ISIG", 4)) {
750 return PERL_constant_ISIV;
752 return PERL_constant_NOTDEF;
757 if (memEQ(name, "NULL", 4)) {
761 return PERL_constant_ISIV;
763 return PERL_constant_NOTDEF;
768 if (memEQ(name, "IXON", 4)) {
772 return PERL_constant_ISIV;
774 return PERL_constant_NOTDEF;
779 if (memEQ(name, "F_OK", 4)) {
783 return PERL_constant_ISIV;
785 return PERL_constant_NOTDEF;
788 if (memEQ(name, "R_OK", 4)) {
792 return PERL_constant_ISIV;
794 return PERL_constant_NOTDEF;
797 if (memEQ(name, "W_OK", 4)) {
801 return PERL_constant_ISIV;
803 return PERL_constant_NOTDEF;
806 if (memEQ(name, "X_OK", 4)) {
810 return PERL_constant_ISIV;
812 return PERL_constant_NOTDEF;
817 return PERL_constant_NOTFOUND;
821 constant_5 (const char *name, IV *iv_return, NV *nv_return) {
822 /* When generated this function returned values for the list of names given
823 here. However, subsequent manual editing may have added or removed some.
824 B1200 B1800 B2400 B4800 B9600 CREAD CSIZE E2BIG EBADF EBUSY ECHOE ECHOK
825 EFBIG EINTR ELOOP ENXIO EPERM EPIPE EROFS ESRCH EXDEV HUPCL ICRNL IGNCR
826 INLCR INPCK IXOFF OPOST TCION TCOON VINTR VKILL VQUIT VSTOP VSUSP VTIME */
827 /* Offset 1 gives the best switch position. */
830 if (memEQ(name, "B1200", 5)) {
834 return PERL_constant_ISIV;
836 return PERL_constant_NOTDEF;
839 if (memEQ(name, "B1800", 5)) {
843 return PERL_constant_ISIV;
845 return PERL_constant_NOTDEF;
850 if (memEQ(name, "B2400", 5)) {
854 return PERL_constant_ISIV;
856 return PERL_constant_NOTDEF;
859 if (memEQ(name, "E2BIG", 5)) {
863 return PERL_constant_ISIV;
865 return PERL_constant_NOTDEF;
870 if (memEQ(name, "B4800", 5)) {
874 return PERL_constant_ISIV;
876 return PERL_constant_NOTDEF;
881 if (memEQ(name, "B9600", 5)) {
885 return PERL_constant_ISIV;
887 return PERL_constant_NOTDEF;
892 if (memEQ(name, "EBADF", 5)) {
896 return PERL_constant_ISIV;
898 return PERL_constant_NOTDEF;
901 if (memEQ(name, "EBUSY", 5)) {
905 return PERL_constant_ISIV;
907 return PERL_constant_NOTDEF;
912 if (memEQ(name, "ECHOE", 5)) {
916 return PERL_constant_ISIV;
918 return PERL_constant_NOTDEF;
921 if (memEQ(name, "ECHOK", 5)) {
925 return PERL_constant_ISIV;
927 return PERL_constant_NOTDEF;
930 if (memEQ(name, "ICRNL", 5)) {
934 return PERL_constant_ISIV;
936 return PERL_constant_NOTDEF;
939 if (memEQ(name, "TCION", 5)) {
943 return PERL_constant_ISIV;
945 return PERL_constant_NOTDEF;
948 if (memEQ(name, "TCOON", 5)) {
952 return PERL_constant_ISIV;
954 return PERL_constant_NOTDEF;
959 if (memEQ(name, "EFBIG", 5)) {
963 return PERL_constant_ISIV;
965 return PERL_constant_NOTDEF;
970 if (memEQ(name, "IGNCR", 5)) {
974 return PERL_constant_ISIV;
976 return PERL_constant_NOTDEF;
981 if (memEQ(name, "EINTR", 5)) {
985 return PERL_constant_ISIV;
987 return PERL_constant_NOTDEF;
990 if (memEQ(name, "VINTR", 5)) {
994 return PERL_constant_ISIV;
996 return PERL_constant_NOTDEF;
1001 if (memEQ(name, "VKILL", 5)) {
1005 return PERL_constant_ISIV;
1007 return PERL_constant_NOTDEF;
1012 if (memEQ(name, "ELOOP", 5)) {
1016 return PERL_constant_ISIV;
1018 return PERL_constant_NOTDEF;
1023 if (memEQ(name, "ENXIO", 5)) {
1027 return PERL_constant_ISIV;
1029 return PERL_constant_NOTDEF;
1032 if (memEQ(name, "INLCR", 5)) {
1036 return PERL_constant_ISIV;
1038 return PERL_constant_NOTDEF;
1041 if (memEQ(name, "INPCK", 5)) {
1045 return PERL_constant_ISIV;
1047 return PERL_constant_NOTDEF;
1052 if (memEQ(name, "EPERM", 5)) {
1056 return PERL_constant_ISIV;
1058 return PERL_constant_NOTDEF;
1061 if (memEQ(name, "EPIPE", 5)) {
1065 return PERL_constant_ISIV;
1067 return PERL_constant_NOTDEF;
1070 if (memEQ(name, "OPOST", 5)) {
1074 return PERL_constant_ISIV;
1076 return PERL_constant_NOTDEF;
1081 if (memEQ(name, "VQUIT", 5)) {
1085 return PERL_constant_ISIV;
1087 return PERL_constant_NOTDEF;
1092 if (memEQ(name, "CREAD", 5)) {
1096 return PERL_constant_ISIV;
1098 return PERL_constant_NOTDEF;
1101 if (memEQ(name, "EROFS", 5)) {
1105 return PERL_constant_ISIV;
1107 return PERL_constant_NOTDEF;
1112 if (memEQ(name, "CSIZE", 5)) {
1116 return PERL_constant_ISIV;
1118 return PERL_constant_NOTDEF;
1121 if (memEQ(name, "ESRCH", 5)) {
1125 return PERL_constant_ISIV;
1127 return PERL_constant_NOTDEF;
1130 if (memEQ(name, "VSTOP", 5)) {
1134 return PERL_constant_ISIV;
1136 return PERL_constant_NOTDEF;
1139 if (memEQ(name, "VSUSP", 5)) {
1143 return PERL_constant_ISIV;
1145 return PERL_constant_NOTDEF;
1150 if (memEQ(name, "VTIME", 5)) {
1154 return PERL_constant_ISIV;
1156 return PERL_constant_NOTDEF;
1161 if (memEQ(name, "HUPCL", 5)) {
1165 return PERL_constant_ISIV;
1167 return PERL_constant_NOTDEF;
1172 if (memEQ(name, "EXDEV", 5)) {
1176 return PERL_constant_ISIV;
1178 return PERL_constant_NOTDEF;
1181 if (memEQ(name, "IXOFF", 5)) {
1185 return PERL_constant_ISIV;
1187 return PERL_constant_NOTDEF;
1192 return PERL_constant_NOTFOUND;
1196 constant_6 (const char *name, IV *iv_return, NV *nv_return) {
1197 /* When generated this function returned values for the list of names given
1198 here. However, subsequent manual editing may have added or removed some.
1199 B19200 B38400 BRKINT BUFSIZ CLOCAL CSTOPB EACCES EAGAIN ECHILD ECHONL
1200 EDQUOT EEXIST EFAULT EINVAL EISDIR EMFILE EMLINK ENFILE ENODEV ENOENT
1201 ENOLCK ENOMEM ENOSPC ENOSYS ENOTTY ERANGE ESPIPE ESTALE EUSERS ICANON
1202 IEXTEN IGNBRK IGNPAR ISTRIP LC_ALL NOFLSH O_EXCL O_RDWR PARENB PARMRK
1203 PARODD SIGFPE SIGHUP SIGILL SIGINT TCIOFF TCOOFF TOSTOP VERASE VSTART */
1204 /* Offset 3 gives the best switch position. */
1207 if (memEQ(name, "B19200", 6)) {
1210 *iv_return = B19200;
1211 return PERL_constant_ISIV;
1213 return PERL_constant_NOTDEF;
1218 if (memEQ(name, "B38400", 6)) {
1221 *iv_return = B38400;
1222 return PERL_constant_ISIV;
1224 return PERL_constant_NOTDEF;
1229 if (memEQ(name, "EAGAIN", 6)) {
1232 *iv_return = EAGAIN;
1233 return PERL_constant_ISIV;
1235 return PERL_constant_NOTDEF;
1238 if (memEQ(name, "ESTALE", 6)) {
1241 *iv_return = ESTALE;
1242 return PERL_constant_ISIV;
1244 return PERL_constant_NOTDEF;
1247 if (memEQ(name, "LC_ALL", 6)) {
1250 *iv_return = LC_ALL;
1251 return PERL_constant_ISIV;
1253 return PERL_constant_NOTDEF;
1256 if (memEQ(name, "VERASE", 6)) {
1259 *iv_return = VERASE;
1260 return PERL_constant_ISIV;
1262 return PERL_constant_NOTDEF;
1265 if (memEQ(name, "VSTART", 6)) {
1268 *iv_return = VSTART;
1269 return PERL_constant_ISIV;
1271 return PERL_constant_NOTDEF;
1276 if (memEQ(name, "IGNBRK", 6)) {
1279 *iv_return = IGNBRK;
1280 return PERL_constant_ISIV;
1282 return PERL_constant_NOTDEF;
1287 if (memEQ(name, "CLOCAL", 6)) {
1290 *iv_return = CLOCAL;
1291 return PERL_constant_ISIV;
1293 return PERL_constant_NOTDEF;
1296 if (memEQ(name, "EACCES", 6)) {
1299 *iv_return = EACCES;
1300 return PERL_constant_ISIV;
1302 return PERL_constant_NOTDEF;
1307 if (memEQ(name, "EISDIR", 6)) {
1310 *iv_return = EISDIR;
1311 return PERL_constant_ISIV;
1313 return PERL_constant_NOTDEF;
1316 if (memEQ(name, "ENODEV", 6)) {
1319 *iv_return = ENODEV;
1320 return PERL_constant_ISIV;
1322 return PERL_constant_NOTDEF;
1325 if (memEQ(name, "O_RDWR", 6)) {
1328 *iv_return = O_RDWR;
1329 return PERL_constant_ISIV;
1331 return PERL_constant_NOTDEF;
1336 if (memEQ(name, "ENOENT", 6)) {
1339 *iv_return = ENOENT;
1340 return PERL_constant_ISIV;
1342 return PERL_constant_NOTDEF;
1345 if (memEQ(name, "EUSERS", 6)) {
1348 *iv_return = EUSERS;
1349 return PERL_constant_ISIV;
1351 return PERL_constant_NOTDEF;
1354 if (memEQ(name, "PARENB", 6)) {
1357 *iv_return = PARENB;
1358 return PERL_constant_ISIV;
1360 return PERL_constant_NOTDEF;
1365 if (memEQ(name, "SIGFPE", 6)) {
1368 *iv_return = SIGFPE;
1369 return PERL_constant_ISIV;
1371 return PERL_constant_NOTDEF;
1376 if (memEQ(name, "SIGHUP", 6)) {
1379 *iv_return = SIGHUP;
1380 return PERL_constant_ISIV;
1382 return PERL_constant_NOTDEF;
1387 if (memEQ(name, "BRKINT", 6)) {
1390 *iv_return = BRKINT;
1391 return PERL_constant_ISIV;
1393 return PERL_constant_NOTDEF;
1396 if (memEQ(name, "ECHILD", 6)) {
1399 *iv_return = ECHILD;
1400 return PERL_constant_ISIV;
1402 return PERL_constant_NOTDEF;
1405 if (memEQ(name, "EEXIST", 6)) {
1408 *iv_return = EEXIST;
1409 return PERL_constant_ISIV;
1411 return PERL_constant_NOTDEF;
1414 if (memEQ(name, "EMFILE", 6)) {
1417 *iv_return = EMFILE;
1418 return PERL_constant_ISIV;
1420 return PERL_constant_NOTDEF;
1423 if (memEQ(name, "EMLINK", 6)) {
1426 *iv_return = EMLINK;
1427 return PERL_constant_ISIV;
1429 return PERL_constant_NOTDEF;
1432 if (memEQ(name, "ENFILE", 6)) {
1435 *iv_return = ENFILE;
1436 return PERL_constant_ISIV;
1438 return PERL_constant_NOTDEF;
1441 if (memEQ(name, "ESPIPE", 6)) {
1444 *iv_return = ESPIPE;
1445 return PERL_constant_ISIV;
1447 return PERL_constant_NOTDEF;
1450 if (memEQ(name, "SIGILL", 6)) {
1453 *iv_return = SIGILL;
1454 return PERL_constant_ISIV;
1456 return PERL_constant_NOTDEF;
1459 if (memEQ(name, "SIGINT", 6)) {
1462 *iv_return = SIGINT;
1463 return PERL_constant_ISIV;
1465 return PERL_constant_NOTDEF;
1470 if (memEQ(name, "ENOLCK", 6)) {
1473 *iv_return = ENOLCK;
1474 return PERL_constant_ISIV;
1476 return PERL_constant_NOTDEF;
1479 if (memEQ(name, "NOFLSH", 6)) {
1482 *iv_return = NOFLSH;
1483 return PERL_constant_ISIV;
1485 return PERL_constant_NOTDEF;
1490 if (memEQ(name, "ENOMEM", 6)) {
1493 *iv_return = ENOMEM;
1494 return PERL_constant_ISIV;
1496 return PERL_constant_NOTDEF;
1499 if (memEQ(name, "PARMRK", 6)) {
1502 *iv_return = PARMRK;
1503 return PERL_constant_ISIV;
1505 return PERL_constant_NOTDEF;
1510 if (memEQ(name, "ERANGE", 6)) {
1513 *iv_return = ERANGE;
1514 return PERL_constant_ISIV;
1516 return PERL_constant_NOTDEF;
1519 if (memEQ(name, "ICANON", 6)) {
1522 *iv_return = ICANON;
1523 return PERL_constant_ISIV;
1525 return PERL_constant_NOTDEF;
1530 if (memEQ(name, "CSTOPB", 6)) {
1533 *iv_return = CSTOPB;
1534 return PERL_constant_ISIV;
1536 return PERL_constant_NOTDEF;
1539 if (memEQ(name, "ECHONL", 6)) {
1542 *iv_return = ECHONL;
1543 return PERL_constant_ISIV;
1545 return PERL_constant_NOTDEF;
1548 if (memEQ(name, "PARODD", 6)) {
1551 *iv_return = PARODD;
1552 return PERL_constant_ISIV;
1554 return PERL_constant_NOTDEF;
1557 if (memEQ(name, "TCIOFF", 6)) {
1560 *iv_return = TCIOFF;
1561 return PERL_constant_ISIV;
1563 return PERL_constant_NOTDEF;
1566 if (memEQ(name, "TCOOFF", 6)) {
1569 *iv_return = TCOOFF;
1570 return PERL_constant_ISIV;
1572 return PERL_constant_NOTDEF;
1577 if (memEQ(name, "IGNPAR", 6)) {
1580 *iv_return = IGNPAR;
1581 return PERL_constant_ISIV;
1583 return PERL_constant_NOTDEF;
1588 if (memEQ(name, "ISTRIP", 6)) {
1591 *iv_return = ISTRIP;
1592 return PERL_constant_ISIV;
1594 return PERL_constant_NOTDEF;
1599 if (memEQ(name, "BUFSIZ", 6)) {
1602 *iv_return = BUFSIZ;
1603 return PERL_constant_ISIV;
1605 return PERL_constant_NOTDEF;
1608 if (memEQ(name, "ENOSPC", 6)) {
1611 *iv_return = ENOSPC;
1612 return PERL_constant_ISIV;
1614 return PERL_constant_NOTDEF;
1617 if (memEQ(name, "ENOSYS", 6)) {
1620 *iv_return = ENOSYS;
1621 return PERL_constant_ISIV;
1623 return PERL_constant_NOTDEF;
1628 if (memEQ(name, "ENOTTY", 6)) {
1631 *iv_return = ENOTTY;
1632 return PERL_constant_ISIV;
1634 return PERL_constant_NOTDEF;
1637 if (memEQ(name, "IEXTEN", 6)) {
1640 *iv_return = IEXTEN;
1641 return PERL_constant_ISIV;
1643 return PERL_constant_NOTDEF;
1646 if (memEQ(name, "TOSTOP", 6)) {
1649 *iv_return = TOSTOP;
1650 return PERL_constant_ISIV;
1652 return PERL_constant_NOTDEF;
1657 if (memEQ(name, "EDQUOT", 6)) {
1660 *iv_return = EDQUOT;
1661 return PERL_constant_ISIV;
1663 return PERL_constant_NOTDEF;
1666 if (memEQ(name, "EFAULT", 6)) {
1669 *iv_return = EFAULT;
1670 return PERL_constant_ISIV;
1672 return PERL_constant_NOTDEF;
1677 if (memEQ(name, "EINVAL", 6)) {
1680 *iv_return = EINVAL;
1681 return PERL_constant_ISIV;
1683 return PERL_constant_NOTDEF;
1688 if (memEQ(name, "O_EXCL", 6)) {
1691 *iv_return = O_EXCL;
1692 return PERL_constant_ISIV;
1694 return PERL_constant_NOTDEF;
1699 return PERL_constant_NOTFOUND;
1703 constant_7 (const char *name, IV *iv_return, NV *nv_return) {
1704 /* When generated this function returned values for the list of names given
1705 here. However, subsequent manual editing may have added or removed some.
1706 ARG_MAX CLK_TCK DBL_DIG DBL_MAX DBL_MIN EDEADLK EISCONN ENOBUFS ENOEXEC
1707 ENOTBLK ENOTDIR EREMOTE ETXTBSY FLT_DIG FLT_MAX FLT_MIN F_DUPFD F_GETFD
1708 F_GETFL F_GETLK F_RDLCK F_SETFD F_SETFL F_SETLK F_UNLCK F_WRLCK INT_MAX
1709 INT_MIN LC_TIME O_CREAT O_TRUNC SIGABRT SIGALRM SIGCHLD SIGCONT SIGKILL
1710 SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU SIGUSR1
1711 SIGUSR2 SIG_DFL SIG_ERR SIG_IGN S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO
1712 S_IRWXU S_ISGID S_ISUID S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR
1713 TCSANOW TMP_MAX WNOHANG */
1714 /* Offset 6 gives the best switch position. */
1717 if (memEQ(name, "SIGUSR1", 7)) {
1720 *iv_return = SIGUSR1;
1721 return PERL_constant_ISIV;
1723 return PERL_constant_NOTDEF;
1728 if (memEQ(name, "SIGUSR2", 7)) {
1731 *iv_return = SIGUSR2;
1732 return PERL_constant_ISIV;
1734 return PERL_constant_NOTDEF;
1739 if (memEQ(name, "ENOEXEC", 7)) {
1742 *iv_return = ENOEXEC;
1743 return PERL_constant_ISIV;
1745 return PERL_constant_NOTDEF;
1748 if (memEQ(name, "O_TRUNC", 7)) {
1751 *iv_return = O_TRUNC;
1752 return PERL_constant_ISIV;
1754 return PERL_constant_NOTDEF;
1759 if (memEQ(name, "F_DUPFD", 7)) {
1762 *iv_return = F_DUPFD;
1763 return PERL_constant_ISIV;
1765 return PERL_constant_NOTDEF;
1768 if (memEQ(name, "F_GETFD", 7)) {
1771 *iv_return = F_GETFD;
1772 return PERL_constant_ISIV;
1774 return PERL_constant_NOTDEF;
1777 if (memEQ(name, "F_SETFD", 7)) {
1780 *iv_return = F_SETFD;
1781 return PERL_constant_ISIV;
1783 return PERL_constant_NOTDEF;
1786 if (memEQ(name, "SIGCHLD", 7)) {
1789 *iv_return = SIGCHLD;
1790 return PERL_constant_ISIV;
1792 return PERL_constant_NOTDEF;
1795 if (memEQ(name, "S_ISGID", 7)) {
1798 *iv_return = S_ISGID;
1799 return PERL_constant_ISIV;
1801 return PERL_constant_NOTDEF;
1804 if (memEQ(name, "S_ISUID", 7)) {
1807 *iv_return = S_ISUID;
1808 return PERL_constant_ISIV;
1810 return PERL_constant_NOTDEF;
1815 if (memEQ(name, "EREMOTE", 7)) {
1818 *iv_return = EREMOTE;
1819 return PERL_constant_ISIV;
1821 return PERL_constant_NOTDEF;
1824 if (memEQ(name, "LC_TIME", 7)) {
1827 *iv_return = LC_TIME;
1828 return PERL_constant_ISIV;
1830 return PERL_constant_NOTDEF;
1833 if (memEQ(name, "SIGPIPE", 7)) {
1836 *iv_return = SIGPIPE;
1837 return PERL_constant_ISIV;
1839 return PERL_constant_NOTDEF;
1844 if (memEQ(name, "DBL_DIG", 7)) {
1847 *nv_return = DBL_DIG;
1848 return PERL_constant_ISNV;
1850 return PERL_constant_NOTDEF;
1853 if (memEQ(name, "FLT_DIG", 7)) {
1856 *nv_return = FLT_DIG;
1857 return PERL_constant_ISNV;
1859 return PERL_constant_NOTDEF;
1862 if (memEQ(name, "S_IRWXG", 7)) {
1865 *iv_return = S_IRWXG;
1866 return PERL_constant_ISIV;
1868 return PERL_constant_NOTDEF;
1871 if (memEQ(name, "WNOHANG", 7)) {
1874 *iv_return = WNOHANG;
1875 return PERL_constant_ISIV;
1877 return PERL_constant_NOTDEF;
1882 if (memEQ(name, "S_IROTH", 7)) {
1885 *iv_return = S_IROTH;
1886 return PERL_constant_ISIV;
1888 return PERL_constant_NOTDEF;
1891 if (memEQ(name, "S_IWOTH", 7)) {
1894 *iv_return = S_IWOTH;
1895 return PERL_constant_ISIV;
1897 return PERL_constant_NOTDEF;
1900 if (memEQ(name, "S_IXOTH", 7)) {
1903 *iv_return = S_IXOTH;
1904 return PERL_constant_ISIV;
1906 return PERL_constant_NOTDEF;
1911 if (memEQ(name, "CLK_TCK", 7)) {
1914 *iv_return = CLK_TCK;
1915 return PERL_constant_ISIV;
1917 return PERL_constant_NOTDEF;
1920 if (memEQ(name, "EDEADLK", 7)) {
1923 *iv_return = EDEADLK;
1924 return PERL_constant_ISIV;
1926 return PERL_constant_NOTDEF;
1929 if (memEQ(name, "ENOTBLK", 7)) {
1932 *iv_return = ENOTBLK;
1933 return PERL_constant_ISIV;
1935 return PERL_constant_NOTDEF;
1938 if (memEQ(name, "F_GETLK", 7)) {
1941 *iv_return = F_GETLK;
1942 return PERL_constant_ISIV;
1944 return PERL_constant_NOTDEF;
1947 if (memEQ(name, "F_RDLCK", 7)) {
1950 *iv_return = F_RDLCK;
1951 return PERL_constant_ISIV;
1953 return PERL_constant_NOTDEF;
1956 if (memEQ(name, "F_SETLK", 7)) {
1959 *iv_return = F_SETLK;
1960 return PERL_constant_ISIV;
1962 return PERL_constant_NOTDEF;
1965 if (memEQ(name, "F_UNLCK", 7)) {
1968 *iv_return = F_UNLCK;
1969 return PERL_constant_ISIV;
1971 return PERL_constant_NOTDEF;
1974 if (memEQ(name, "F_WRLCK", 7)) {
1977 *iv_return = F_WRLCK;
1978 return PERL_constant_ISIV;
1980 return PERL_constant_NOTDEF;
1985 if (memEQ(name, "F_GETFL", 7)) {
1988 *iv_return = F_GETFL;
1989 return PERL_constant_ISIV;
1991 return PERL_constant_NOTDEF;
1994 if (memEQ(name, "F_SETFL", 7)) {
1997 *iv_return = F_SETFL;
1998 return PERL_constant_ISIV;
2000 return PERL_constant_NOTDEF;
2003 if (memEQ(name, "SIGKILL", 7)) {
2006 *iv_return = SIGKILL;
2007 return PERL_constant_ISIV;
2009 return PERL_constant_NOTDEF;
2012 if (memEQ(name, "SIG_DFL", 7)) {
2015 *iv_return = (IV)SIG_DFL;
2016 return PERL_constant_ISIV;
2018 return PERL_constant_NOTDEF;
2023 if (memEQ(name, "SIGALRM", 7)) {
2026 *iv_return = SIGALRM;
2027 return PERL_constant_ISIV;
2029 return PERL_constant_NOTDEF;
2032 if (memEQ(name, "SIGTERM", 7)) {
2035 *iv_return = SIGTERM;
2036 return PERL_constant_ISIV;
2038 return PERL_constant_NOTDEF;
2043 if (memEQ(name, "DBL_MIN", 7)) {
2046 *nv_return = DBL_MIN;
2047 return PERL_constant_ISNV;
2049 return PERL_constant_NOTDEF;
2052 if (memEQ(name, "EISCONN", 7)) {
2055 *iv_return = EISCONN;
2056 return PERL_constant_ISIV;
2058 return PERL_constant_NOTDEF;
2061 if (memEQ(name, "FLT_MIN", 7)) {
2064 *nv_return = FLT_MIN;
2065 return PERL_constant_ISNV;
2067 return PERL_constant_NOTDEF;
2070 if (memEQ(name, "INT_MIN", 7)) {
2073 *iv_return = INT_MIN;
2074 return PERL_constant_ISIV;
2076 return PERL_constant_NOTDEF;
2079 if (memEQ(name, "SIGTTIN", 7)) {
2082 *iv_return = SIGTTIN;
2083 return PERL_constant_ISIV;
2085 return PERL_constant_NOTDEF;
2088 if (memEQ(name, "SIG_IGN", 7)) {
2091 *iv_return = (IV)SIG_IGN;
2092 return PERL_constant_ISIV;
2094 return PERL_constant_NOTDEF;
2099 if (memEQ(name, "S_IRWXO", 7)) {
2102 *iv_return = S_IRWXO;
2103 return PERL_constant_ISIV;
2105 return PERL_constant_NOTDEF;
2110 if (memEQ(name, "SIGSTOP", 7)) {
2113 *iv_return = SIGSTOP;
2114 return PERL_constant_ISIV;
2116 return PERL_constant_NOTDEF;
2119 if (memEQ(name, "SIGTSTP", 7)) {
2122 *iv_return = SIGTSTP;
2123 return PERL_constant_ISIV;
2125 return PERL_constant_NOTDEF;
2128 if (memEQ(name, "S_IRGRP", 7)) {
2131 *iv_return = S_IRGRP;
2132 return PERL_constant_ISIV;
2134 return PERL_constant_NOTDEF;
2137 if (memEQ(name, "S_IWGRP", 7)) {
2140 *iv_return = S_IWGRP;
2141 return PERL_constant_ISIV;
2143 return PERL_constant_NOTDEF;
2146 if (memEQ(name, "S_IXGRP", 7)) {
2149 *iv_return = S_IXGRP;
2150 return PERL_constant_ISIV;
2152 return PERL_constant_NOTDEF;
2157 if (memEQ(name, "ENOTDIR", 7)) {
2160 *iv_return = ENOTDIR;
2161 return PERL_constant_ISIV;
2163 return PERL_constant_NOTDEF;
2166 if (memEQ(name, "SIG_ERR", 7)) {
2169 *iv_return = (IV)SIG_ERR;
2170 return PERL_constant_ISIV;
2172 return PERL_constant_NOTDEF;
2175 if (memEQ(name, "S_IRUSR", 7)) {
2178 *iv_return = S_IRUSR;
2179 return PERL_constant_ISIV;
2181 return PERL_constant_NOTDEF;
2184 if (memEQ(name, "S_IWUSR", 7)) {
2187 *iv_return = S_IWUSR;
2188 return PERL_constant_ISIV;
2190 return PERL_constant_NOTDEF;
2193 if (memEQ(name, "S_IXUSR", 7)) {
2196 *iv_return = S_IXUSR;
2197 return PERL_constant_ISIV;
2199 return PERL_constant_NOTDEF;
2204 if (memEQ(name, "ENOBUFS", 7)) {
2207 *iv_return = ENOBUFS;
2208 return PERL_constant_ISIV;
2210 return PERL_constant_NOTDEF;
2215 if (memEQ(name, "O_CREAT", 7)) {
2218 *iv_return = O_CREAT;
2219 return PERL_constant_ISIV;
2221 return PERL_constant_NOTDEF;
2224 if (memEQ(name, "SIGABRT", 7)) {
2227 *iv_return = SIGABRT;
2228 return PERL_constant_ISIV;
2230 return PERL_constant_NOTDEF;
2233 if (memEQ(name, "SIGCONT", 7)) {
2236 *iv_return = SIGCONT;
2237 return PERL_constant_ISIV;
2239 return PERL_constant_NOTDEF;
2242 if (memEQ(name, "SIGQUIT", 7)) {
2245 *iv_return = SIGQUIT;
2246 return PERL_constant_ISIV;
2248 return PERL_constant_NOTDEF;
2253 if (memEQ(name, "SIGTTOU", 7)) {
2256 *iv_return = SIGTTOU;
2257 return PERL_constant_ISIV;
2259 return PERL_constant_NOTDEF;
2262 if (memEQ(name, "S_IRWXU", 7)) {
2265 *iv_return = S_IRWXU;
2266 return PERL_constant_ISIV;
2268 return PERL_constant_NOTDEF;
2273 if (memEQ(name, "SIGSEGV", 7)) {
2276 *iv_return = SIGSEGV;
2277 return PERL_constant_ISIV;
2279 return PERL_constant_NOTDEF;
2284 if (memEQ(name, "TCSANOW", 7)) {
2287 *iv_return = TCSANOW;
2288 return PERL_constant_ISIV;
2290 return PERL_constant_NOTDEF;
2295 if (memEQ(name, "ARG_MAX", 7)) {
2298 *iv_return = ARG_MAX;
2299 return PERL_constant_ISIV;
2301 return PERL_constant_NOTDEF;
2304 if (memEQ(name, "DBL_MAX", 7)) {
2307 *nv_return = DBL_MAX;
2308 return PERL_constant_ISNV;
2310 return PERL_constant_NOTDEF;
2313 if (memEQ(name, "FLT_MAX", 7)) {
2316 *nv_return = FLT_MAX;
2317 return PERL_constant_ISNV;
2319 return PERL_constant_NOTDEF;
2322 if (memEQ(name, "INT_MAX", 7)) {
2325 *iv_return = INT_MAX;
2326 return PERL_constant_ISIV;
2328 return PERL_constant_NOTDEF;
2331 if (memEQ(name, "TMP_MAX", 7)) {
2334 *iv_return = TMP_MAX;
2335 return PERL_constant_ISIV;
2337 return PERL_constant_NOTDEF;
2342 if (memEQ(name, "ETXTBSY", 7)) {
2345 *iv_return = ETXTBSY;
2346 return PERL_constant_ISIV;
2348 return PERL_constant_NOTDEF;
2353 return PERL_constant_NOTFOUND;
2357 constant_8 (const char *name, IV *iv_return, NV *nv_return) {
2358 /* When generated this function returned values for the list of names given
2359 here. However, subsequent manual editing may have added or removed some.
2360 CHAR_BIT CHAR_MAX CHAR_MIN EALREADY EMSGSIZE ENETDOWN ENOTCONN ENOTSOCK
2361 EPROCLIM ERESTART F_SETLKW HUGE_VAL LC_CTYPE LDBL_DIG LDBL_MAX LDBL_MIN
2362 LINK_MAX LONG_MAX LONG_MIN L_tmpnam NAME_MAX OPEN_MAX O_APPEND O_NOCTTY
2363 O_RDONLY O_WRONLY PATH_MAX PIPE_BUF RAND_MAX SEEK_CUR SEEK_END SEEK_SET
2364 SHRT_MAX SHRT_MIN TCIFLUSH TCOFLUSH UINT_MAX */
2365 /* Offset 2 gives the best switch position. */
2368 if (memEQ(name, "CHAR_BIT", 8)) {
2371 *iv_return = CHAR_BIT;
2372 return PERL_constant_ISIV;
2374 return PERL_constant_NOTDEF;
2377 if (memEQ(name, "CHAR_MAX", 8)) {
2380 *iv_return = CHAR_MAX;
2381 return PERL_constant_ISIV;
2383 return PERL_constant_NOTDEF;
2386 if (memEQ(name, "CHAR_MIN", 8)) {
2389 *iv_return = CHAR_MIN;
2390 return PERL_constant_ISIV;
2392 return PERL_constant_NOTDEF;
2395 if (memEQ(name, "O_APPEND", 8)) {
2398 *iv_return = O_APPEND;
2399 return PERL_constant_ISIV;
2401 return PERL_constant_NOTDEF;
2406 if (memEQ(name, "LDBL_DIG", 8)) {
2409 *nv_return = LDBL_DIG;
2410 return PERL_constant_ISNV;
2412 return PERL_constant_NOTDEF;
2415 if (memEQ(name, "LDBL_MAX", 8)) {
2418 *nv_return = LDBL_MAX;
2419 return PERL_constant_ISNV;
2421 return PERL_constant_NOTDEF;
2424 if (memEQ(name, "LDBL_MIN", 8)) {
2427 *nv_return = LDBL_MIN;
2428 return PERL_constant_ISNV;
2430 return PERL_constant_NOTDEF;
2435 if (memEQ(name, "ENETDOWN", 8)) {
2438 *iv_return = ENETDOWN;
2439 return PERL_constant_ISIV;
2441 return PERL_constant_NOTDEF;
2444 if (memEQ(name, "ERESTART", 8)) {
2447 *iv_return = ERESTART;
2448 return PERL_constant_ISIV;
2450 return PERL_constant_NOTDEF;
2453 if (memEQ(name, "OPEN_MAX", 8)) {
2456 *iv_return = OPEN_MAX;
2457 return PERL_constant_ISIV;
2459 return PERL_constant_NOTDEF;
2462 if (memEQ(name, "SEEK_CUR", 8)) {
2465 *iv_return = SEEK_CUR;
2466 return PERL_constant_ISIV;
2468 return PERL_constant_NOTDEF;
2471 if (memEQ(name, "SEEK_END", 8)) {
2474 *iv_return = SEEK_END;
2475 return PERL_constant_ISIV;
2477 return PERL_constant_NOTDEF;
2480 if (memEQ(name, "SEEK_SET", 8)) {
2483 *iv_return = SEEK_SET;
2484 return PERL_constant_ISIV;
2486 return PERL_constant_NOTDEF;
2491 if (memEQ(name, "HUGE_VAL", 8)) {
2493 #if (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)) || defined(HUGE_VAL)
2494 /* HUGE_VALL is admittedly non-POSIX but if we are using long doubles
2495 * we might as well use long doubles. --jhi */
2497 #if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)
2503 return PERL_constant_ISNV;
2505 return PERL_constant_NOTDEF;
2510 if (memEQ(name, "TCIFLUSH", 8)) {
2513 *iv_return = TCIFLUSH;
2514 return PERL_constant_ISIV;
2516 return PERL_constant_NOTDEF;
2521 if (memEQ(name, "EALREADY", 8)) {
2524 *iv_return = EALREADY;
2525 return PERL_constant_ISIV;
2527 return PERL_constant_NOTDEF;
2532 if (memEQ(name, "NAME_MAX", 8)) {
2535 *iv_return = NAME_MAX;
2536 return PERL_constant_ISIV;
2538 return PERL_constant_NOTDEF;
2543 if (memEQ(name, "LINK_MAX", 8)) {
2546 *iv_return = LINK_MAX;
2547 return PERL_constant_ISIV;
2549 return PERL_constant_NOTDEF;
2552 if (memEQ(name, "LONG_MAX", 8)) {
2555 *iv_return = LONG_MAX;
2556 return PERL_constant_ISIV;
2558 return PERL_constant_NOTDEF;
2561 if (memEQ(name, "LONG_MIN", 8)) {
2564 *iv_return = LONG_MIN;
2565 return PERL_constant_ISIV;
2567 return PERL_constant_NOTDEF;
2570 if (memEQ(name, "O_NOCTTY", 8)) {
2573 *iv_return = O_NOCTTY;
2574 return PERL_constant_ISIV;
2576 return PERL_constant_NOTDEF;
2579 if (memEQ(name, "RAND_MAX", 8)) {
2582 *iv_return = RAND_MAX;
2583 return PERL_constant_ISIV;
2585 return PERL_constant_NOTDEF;
2588 if (memEQ(name, "UINT_MAX", 8)) {
2591 *iv_return = (IV) UINT_MAX;
2592 return PERL_constant_ISUV;
2594 return PERL_constant_NOTDEF;
2599 if (memEQ(name, "ENOTCONN", 8)) {
2602 *iv_return = ENOTCONN;
2603 return PERL_constant_ISIV;
2605 return PERL_constant_NOTDEF;
2608 if (memEQ(name, "ENOTSOCK", 8)) {
2611 *iv_return = ENOTSOCK;
2612 return PERL_constant_ISIV;
2614 return PERL_constant_NOTDEF;
2617 if (memEQ(name, "TCOFLUSH", 8)) {
2620 *iv_return = TCOFLUSH;
2621 return PERL_constant_ISIV;
2623 return PERL_constant_NOTDEF;
2628 if (memEQ(name, "PIPE_BUF", 8)) {
2631 *iv_return = PIPE_BUF;
2632 return PERL_constant_ISIV;
2634 return PERL_constant_NOTDEF;
2639 if (memEQ(name, "EPROCLIM", 8)) {
2642 *iv_return = EPROCLIM;
2643 return PERL_constant_ISIV;
2645 return PERL_constant_NOTDEF;
2648 if (memEQ(name, "O_RDONLY", 8)) {
2651 *iv_return = O_RDONLY;
2652 return PERL_constant_ISIV;
2654 return PERL_constant_NOTDEF;
2657 if (memEQ(name, "SHRT_MAX", 8)) {
2660 *iv_return = SHRT_MAX;
2661 return PERL_constant_ISIV;
2663 return PERL_constant_NOTDEF;
2666 if (memEQ(name, "SHRT_MIN", 8)) {
2669 *iv_return = SHRT_MIN;
2670 return PERL_constant_ISIV;
2672 return PERL_constant_NOTDEF;
2677 if (memEQ(name, "EMSGSIZE", 8)) {
2680 *iv_return = EMSGSIZE;
2681 return PERL_constant_ISIV;
2683 return PERL_constant_NOTDEF;
2686 if (memEQ(name, "F_SETLKW", 8)) {
2689 *iv_return = F_SETLKW;
2690 return PERL_constant_ISIV;
2692 return PERL_constant_NOTDEF;
2697 if (memEQ(name, "PATH_MAX", 8)) {
2700 *iv_return = PATH_MAX;
2701 return PERL_constant_ISIV;
2703 return PERL_constant_NOTDEF;
2708 if (memEQ(name, "O_WRONLY", 8)) {
2711 *iv_return = O_WRONLY;
2712 return PERL_constant_ISIV;
2714 return PERL_constant_NOTDEF;
2719 if (memEQ(name, "LC_CTYPE", 8)) {
2722 *iv_return = LC_CTYPE;
2723 return PERL_constant_ISIV;
2725 return PERL_constant_NOTDEF;
2730 if (memEQ(name, "L_tmpnam", 8)) {
2733 *iv_return = L_tmpnam;
2734 return PERL_constant_ISIV;
2736 return PERL_constant_NOTDEF;
2741 return PERL_constant_NOTFOUND;
2745 constant_9 (const char *name, IV *iv_return, NV *nv_return) {
2746 /* When generated this function returned values for the list of names given
2747 here. However, subsequent manual editing may have added or removed some.
2748 CHILD_MAX EHOSTDOWN ENETRESET ENOTEMPTY ESHUTDOWN ETIMEDOUT FLT_RADIX
2749 L_ctermid L_cuserid L_tmpname MAX_CANON MAX_INPUT O_ACCMODE SCHAR_MAX
2750 SCHAR_MIN SIG_BLOCK SSIZE_MAX TCIOFLUSH TCSADRAIN TCSAFLUSH UCHAR_MAX
2751 ULONG_MAX USHRT_MAX WUNTRACED */
2752 /* Offset 3 gives the best switch position. */
2755 if (memEQ(name, "SCHAR_MAX", 9)) {
2758 *iv_return = SCHAR_MAX;
2759 return PERL_constant_ISIV;
2761 return PERL_constant_NOTDEF;
2764 if (memEQ(name, "SCHAR_MIN", 9)) {
2767 *iv_return = SCHAR_MIN;
2768 return PERL_constant_ISIV;
2770 return PERL_constant_NOTDEF;
2773 if (memEQ(name, "TCSADRAIN", 9)) {
2776 *iv_return = TCSADRAIN;
2777 return PERL_constant_ISIV;
2779 return PERL_constant_NOTDEF;
2782 if (memEQ(name, "TCSAFLUSH", 9)) {
2785 *iv_return = TCSAFLUSH;
2786 return PERL_constant_ISIV;
2788 return PERL_constant_NOTDEF;
2791 if (memEQ(name, "UCHAR_MAX", 9)) {
2794 *iv_return = (IV) UCHAR_MAX;
2795 return PERL_constant_ISUV;
2797 return PERL_constant_NOTDEF;
2802 if (memEQ(name, "O_ACCMODE", 9)) {
2805 *iv_return = O_ACCMODE;
2806 return PERL_constant_ISIV;
2808 return PERL_constant_NOTDEF;
2813 if (memEQ(name, "CHILD_MAX", 9)) {
2816 *iv_return = CHILD_MAX;
2817 return PERL_constant_ISIV;
2819 return PERL_constant_NOTDEF;
2824 if (memEQ(name, "ETIMEDOUT", 9)) {
2827 *iv_return = ETIMEDOUT;
2828 return PERL_constant_ISIV;
2830 return PERL_constant_NOTDEF;
2835 if (memEQ(name, "ULONG_MAX", 9)) {
2838 *iv_return = (IV) ULONG_MAX;
2839 return PERL_constant_ISUV;
2841 return PERL_constant_NOTDEF;
2846 if (memEQ(name, "TCIOFLUSH", 9)) {
2849 *iv_return = TCIOFLUSH;
2850 return PERL_constant_ISIV;
2852 return PERL_constant_NOTDEF;
2857 if (memEQ(name, "USHRT_MAX", 9)) {
2860 *iv_return = (IV) USHRT_MAX;
2861 return PERL_constant_ISUV;
2863 return PERL_constant_NOTDEF;
2868 if (memEQ(name, "EHOSTDOWN", 9)) {
2871 *iv_return = EHOSTDOWN;
2872 return PERL_constant_ISIV;
2874 return PERL_constant_NOTDEF;
2879 if (memEQ(name, "ENETRESET", 9)) {
2882 *iv_return = ENETRESET;
2883 return PERL_constant_ISIV;
2885 return PERL_constant_NOTDEF;
2888 if (memEQ(name, "ENOTEMPTY", 9)) {
2891 *iv_return = ENOTEMPTY;
2892 return PERL_constant_ISIV;
2894 return PERL_constant_NOTDEF;
2897 if (memEQ(name, "WUNTRACED", 9)) {
2900 *iv_return = WUNTRACED;
2901 return PERL_constant_ISIV;
2903 return PERL_constant_NOTDEF;
2908 if (memEQ(name, "ESHUTDOWN", 9)) {
2911 *iv_return = ESHUTDOWN;
2912 return PERL_constant_ISIV;
2914 return PERL_constant_NOTDEF;
2919 if (memEQ(name, "SSIZE_MAX", 9)) {
2922 *iv_return = SSIZE_MAX;
2923 return PERL_constant_ISIV;
2925 return PERL_constant_NOTDEF;
2930 if (memEQ(name, "FLT_RADIX", 9)) {
2933 *nv_return = FLT_RADIX;
2934 return PERL_constant_ISNV;
2936 return PERL_constant_NOTDEF;
2939 if (memEQ(name, "MAX_CANON", 9)) {
2942 *iv_return = MAX_CANON;
2943 return PERL_constant_ISIV;
2945 return PERL_constant_NOTDEF;
2948 if (memEQ(name, "MAX_INPUT", 9)) {
2951 *iv_return = MAX_INPUT;
2952 return PERL_constant_ISIV;
2954 return PERL_constant_NOTDEF;
2957 if (memEQ(name, "SIG_BLOCK", 9)) {
2960 *iv_return = SIG_BLOCK;
2961 return PERL_constant_ISIV;
2963 return PERL_constant_NOTDEF;
2968 if (memEQ(name, "L_tmpname", 9)) {
2971 *iv_return = L_tmpnam;
2972 return PERL_constant_ISIV;
2974 return PERL_constant_NOTDEF;
2979 if (memEQ(name, "L_ctermid", 9)) {
2982 *iv_return = L_ctermid;
2983 return PERL_constant_ISIV;
2985 return PERL_constant_NOTDEF;
2990 if (memEQ(name, "L_cuserid", 9)) {
2993 *iv_return = L_cuserid;
2994 return PERL_constant_ISIV;
2996 return PERL_constant_NOTDEF;
3001 return PERL_constant_NOTFOUND;
3005 constant_10 (const char *name, IV *iv_return, NV *nv_return) {
3006 /* When generated this function returned values for the list of names given
3007 here. However, subsequent manual editing may have added or removed some.
3008 EADDRINUSE ECONNRESET EOPNOTSUPP EPROTOTYPE FD_CLOEXEC FLT_ROUNDS
3009 LC_COLLATE LC_NUMERIC MB_CUR_MAX MB_LEN_MAX O_NONBLOCK SA_NODEFER
3010 SA_ONSTACK SA_RESTART SA_SIGINFO STREAM_MAX TZNAME_MAX */
3011 /* Offset 5 gives the best switch position. */
3014 if (memEQ(name, "O_NONBLOCK", 10)) {
3017 *iv_return = O_NONBLOCK;
3018 return PERL_constant_ISIV;
3020 return PERL_constant_NOTDEF;
3025 if (memEQ(name, "SA_NODEFER", 10)) {
3028 *iv_return = (IV) SA_NODEFER;
3029 return PERL_constant_ISUV;
3031 return PERL_constant_NOTDEF;
3036 if (memEQ(name, "TZNAME_MAX", 10)) {
3039 *iv_return = TZNAME_MAX;
3040 return PERL_constant_ISIV;
3042 return PERL_constant_NOTDEF;
3047 if (memEQ(name, "SA_SIGINFO", 10)) {
3050 *iv_return = (IV) SA_SIGINFO;
3051 return PERL_constant_ISUV;
3053 return PERL_constant_NOTDEF;
3058 if (memEQ(name, "EADDRINUSE", 10)) {
3061 *iv_return = EADDRINUSE;
3062 return PERL_constant_ISIV;
3064 return PERL_constant_NOTDEF;
3069 if (memEQ(name, "LC_COLLATE", 10)) {
3072 *iv_return = LC_COLLATE;
3073 return PERL_constant_ISIV;
3075 return PERL_constant_NOTDEF;
3080 if (memEQ(name, "LC_NUMERIC", 10)) {
3083 *iv_return = LC_NUMERIC;
3084 return PERL_constant_ISIV;
3086 return PERL_constant_NOTDEF;
3089 if (memEQ(name, "STREAM_MAX", 10)) {
3092 *iv_return = STREAM_MAX;
3093 return PERL_constant_ISIV;
3095 return PERL_constant_NOTDEF;
3100 if (memEQ(name, "MB_LEN_MAX", 10)) {
3103 *iv_return = MB_LEN_MAX;
3104 return PERL_constant_ISIV;
3106 return PERL_constant_NOTDEF;
3111 if (memEQ(name, "EPROTOTYPE", 10)) {
3114 *iv_return = EPROTOTYPE;
3115 return PERL_constant_ISIV;
3117 return PERL_constant_NOTDEF;
3120 if (memEQ(name, "FD_CLOEXEC", 10)) {
3123 *iv_return = FD_CLOEXEC;
3124 return PERL_constant_ISIV;
3126 return PERL_constant_NOTDEF;
3129 if (memEQ(name, "FLT_ROUNDS", 10)) {
3132 *nv_return = FLT_ROUNDS;
3133 return PERL_constant_ISNV;
3135 return PERL_constant_NOTDEF;
3140 if (memEQ(name, "ECONNRESET", 10)) {
3143 *iv_return = ECONNRESET;
3144 return PERL_constant_ISIV;
3146 return PERL_constant_NOTDEF;
3149 if (memEQ(name, "MB_CUR_MAX", 10)) {
3152 *iv_return = MB_CUR_MAX;
3153 return PERL_constant_ISIV;
3155 return PERL_constant_NOTDEF;
3160 if (memEQ(name, "SA_ONSTACK", 10)) {
3163 *iv_return = (IV) SA_ONSTACK;
3164 return PERL_constant_ISUV;
3166 return PERL_constant_NOTDEF;
3169 if (memEQ(name, "SA_RESTART", 10)) {
3172 *iv_return = (IV) SA_RESTART;
3173 return PERL_constant_ISUV;
3175 return PERL_constant_NOTDEF;
3180 if (memEQ(name, "EOPNOTSUPP", 10)) {
3183 *iv_return = EOPNOTSUPP;
3184 return PERL_constant_ISIV;
3186 return PERL_constant_NOTDEF;
3191 return PERL_constant_NOTFOUND;
3195 constant_11 (const char *name, IV *iv_return, NV *nv_return) {
3196 /* When generated this function returned values for the list of names given
3197 here. However, subsequent manual editing may have added or removed some.
3198 DBL_EPSILON DBL_MAX_EXP DBL_MIN_EXP EINPROGRESS ENETUNREACH ENOPROTOOPT
3199 EWOULDBLOCK FLT_EPSILON FLT_MAX_EXP FLT_MIN_EXP LC_MESSAGES LC_MONETARY
3200 NGROUPS_MAX SIG_SETMASK SIG_UNBLOCK _SC_ARG_MAX _SC_CLK_TCK _SC_VERSION */
3201 /* Offset 5 gives the best switch position. */
3204 if (memEQ(name, "DBL_MAX_EXP", 11)) {
3207 *nv_return = DBL_MAX_EXP;
3208 return PERL_constant_ISNV;
3210 return PERL_constant_NOTDEF;
3213 if (memEQ(name, "FLT_MAX_EXP", 11)) {
3216 *nv_return = FLT_MAX_EXP;
3217 return PERL_constant_ISNV;
3219 return PERL_constant_NOTDEF;
3224 if (memEQ(name, "EWOULDBLOCK", 11)) {
3227 *iv_return = EWOULDBLOCK;
3228 return PERL_constant_ISIV;
3230 return PERL_constant_NOTDEF;
3235 if (memEQ(name, "SIG_SETMASK", 11)) {
3238 *iv_return = SIG_SETMASK;
3239 return PERL_constant_ISIV;
3241 return PERL_constant_NOTDEF;
3244 if (memEQ(name, "_SC_VERSION", 11)) {
3247 *iv_return = _SC_VERSION;
3248 return PERL_constant_ISIV;
3250 return PERL_constant_NOTDEF;
3255 if (memEQ(name, "DBL_MIN_EXP", 11)) {
3258 *nv_return = DBL_MIN_EXP;
3259 return PERL_constant_ISNV;
3261 return PERL_constant_NOTDEF;
3264 if (memEQ(name, "FLT_MIN_EXP", 11)) {
3267 *nv_return = FLT_MIN_EXP;
3268 return PERL_constant_ISNV;
3270 return PERL_constant_NOTDEF;
3275 if (memEQ(name, "_SC_CLK_TCK", 11)) {
3278 *iv_return = _SC_CLK_TCK;
3279 return PERL_constant_ISIV;
3281 return PERL_constant_NOTDEF;
3286 if (memEQ(name, "ENETUNREACH", 11)) {
3289 *iv_return = ENETUNREACH;
3290 return PERL_constant_ISIV;
3292 return PERL_constant_NOTDEF;
3295 if (memEQ(name, "LC_MONETARY", 11)) {
3298 *iv_return = LC_MONETARY;
3299 return PERL_constant_ISIV;
3301 return PERL_constant_NOTDEF;
3304 if (memEQ(name, "SIG_UNBLOCK", 11)) {
3307 *iv_return = SIG_UNBLOCK;
3308 return PERL_constant_ISIV;
3310 return PERL_constant_NOTDEF;
3315 if (memEQ(name, "EINPROGRESS", 11)) {
3318 *iv_return = EINPROGRESS;
3319 return PERL_constant_ISIV;
3321 return PERL_constant_NOTDEF;
3324 if (memEQ(name, "ENOPROTOOPT", 11)) {
3327 *iv_return = ENOPROTOOPT;
3328 return PERL_constant_ISIV;
3330 return PERL_constant_NOTDEF;
3335 if (memEQ(name, "DBL_EPSILON", 11)) {
3338 *nv_return = DBL_EPSILON;
3339 return PERL_constant_ISNV;
3341 return PERL_constant_NOTDEF;
3344 if (memEQ(name, "FLT_EPSILON", 11)) {
3347 *nv_return = FLT_EPSILON;
3348 return PERL_constant_ISNV;
3350 return PERL_constant_NOTDEF;
3353 if (memEQ(name, "NGROUPS_MAX", 11)) {
3356 *iv_return = NGROUPS_MAX;
3357 return PERL_constant_ISIV;
3359 return PERL_constant_NOTDEF;
3364 if (memEQ(name, "_SC_ARG_MAX", 11)) {
3367 *iv_return = _SC_ARG_MAX;
3368 return PERL_constant_ISIV;
3370 return PERL_constant_NOTDEF;
3375 if (memEQ(name, "LC_MESSAGES", 11)) {
3378 *iv_return = LC_MESSAGES;
3379 return PERL_constant_ISIV;
3381 return PERL_constant_NOTDEF;
3386 return PERL_constant_NOTFOUND;
3390 constant_12 (const char *name, IV *iv_return, NV *nv_return) {
3391 /* When generated this function returned values for the list of names given
3392 here. However, subsequent manual editing may have added or removed some.
3393 DBL_MANT_DIG EAFNOSUPPORT ECONNABORTED ECONNREFUSED EDESTADDRREQ
3394 EHOSTUNREACH ENAMETOOLONG EPFNOSUPPORT ETOOMANYREFS EXIT_FAILURE
3395 EXIT_SUCCESS FILENAME_MAX FLT_MANT_DIG LDBL_EPSILON LDBL_MAX_EXP
3396 LDBL_MIN_EXP SA_NOCLDSTOP SA_NOCLDWAIT SA_RESETHAND STDIN_FILENO
3397 _PC_LINK_MAX _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF
3398 _PC_VDISABLE _SC_OPEN_MAX */
3399 /* Offset 7 gives the best switch position. */
3402 if (memEQ(name, "EXIT_SUCCESS", 12)) {
3405 *iv_return = EXIT_SUCCESS;
3406 return PERL_constant_ISIV;
3409 return PERL_constant_ISIV;
3414 if (memEQ(name, "EDESTADDRREQ", 12)) {
3417 *iv_return = EDESTADDRREQ;
3418 return PERL_constant_ISIV;
3420 return PERL_constant_NOTDEF;
3423 if (memEQ(name, "SA_NOCLDSTOP", 12)) {
3426 *iv_return = (IV) SA_NOCLDSTOP;
3427 return PERL_constant_ISUV;
3429 return PERL_constant_NOTDEF;
3432 if (memEQ(name, "SA_NOCLDWAIT", 12)) {
3435 *iv_return = (IV) SA_NOCLDWAIT;
3436 return PERL_constant_ISUV;
3438 return PERL_constant_NOTDEF;
3443 if (memEQ(name, "FILENAME_MAX", 12)) {
3446 *iv_return = FILENAME_MAX;
3447 return PERL_constant_ISIV;
3449 return PERL_constant_NOTDEF;
3452 if (memEQ(name, "_PC_NAME_MAX", 12)) {
3455 *iv_return = _PC_NAME_MAX;
3456 return PERL_constant_ISIV;
3458 return PERL_constant_NOTDEF;
3461 if (memEQ(name, "_PC_PIPE_BUF", 12)) {
3464 *iv_return = _PC_PIPE_BUF;
3465 return PERL_constant_ISIV;
3467 return PERL_constant_NOTDEF;
3472 if (memEQ(name, "ECONNREFUSED", 12)) {
3475 *iv_return = ECONNREFUSED;
3476 return PERL_constant_ISIV;
3478 return PERL_constant_NOTDEF;
3483 if (memEQ(name, "_PC_PATH_MAX", 12)) {
3486 *iv_return = _PC_PATH_MAX;
3487 return PERL_constant_ISIV;
3489 return PERL_constant_NOTDEF;
3494 if (memEQ(name, "EXIT_FAILURE", 12)) {
3497 *iv_return = EXIT_FAILURE;
3498 return PERL_constant_ISIV;
3501 return PERL_constant_ISIV;
3504 if (memEQ(name, "STDIN_FILENO", 12)) {
3507 *iv_return = STDIN_FILENO;
3508 return PERL_constant_ISIV;
3510 return PERL_constant_NOTDEF;
3515 if (memEQ(name, "_PC_LINK_MAX", 12)) {
3518 *iv_return = _PC_LINK_MAX;
3519 return PERL_constant_ISIV;
3521 return PERL_constant_NOTDEF;
3526 if (memEQ(name, "LDBL_MIN_EXP", 12)) {
3529 *nv_return = LDBL_MIN_EXP;
3530 return PERL_constant_ISNV;
3532 return PERL_constant_NOTDEF;
3535 if (memEQ(name, "_SC_OPEN_MAX", 12)) {
3538 *iv_return = _SC_OPEN_MAX;
3539 return PERL_constant_ISIV;
3541 return PERL_constant_NOTDEF;
3546 if (memEQ(name, "ECONNABORTED", 12)) {
3549 *iv_return = ECONNABORTED;
3550 return PERL_constant_ISIV;
3552 return PERL_constant_NOTDEF;
3555 if (memEQ(name, "ENAMETOOLONG", 12)) {
3558 *iv_return = ENAMETOOLONG;
3559 return PERL_constant_ISIV;
3561 return PERL_constant_NOTDEF;
3566 if (memEQ(name, "EAFNOSUPPORT", 12)) {
3569 *iv_return = EAFNOSUPPORT;
3570 return PERL_constant_ISIV;
3572 return PERL_constant_NOTDEF;
3575 if (memEQ(name, "EPFNOSUPPORT", 12)) {
3578 *iv_return = EPFNOSUPPORT;
3579 return PERL_constant_ISIV;
3581 return PERL_constant_NOTDEF;
3586 if (memEQ(name, "EHOSTUNREACH", 12)) {
3589 *iv_return = EHOSTUNREACH;
3590 return PERL_constant_ISIV;
3592 return PERL_constant_NOTDEF;
3597 if (memEQ(name, "LDBL_EPSILON", 12)) {
3600 *nv_return = LDBL_EPSILON;
3601 return PERL_constant_ISNV;
3603 return PERL_constant_NOTDEF;
3606 if (memEQ(name, "_PC_VDISABLE", 12)) {
3609 *iv_return = _PC_VDISABLE;
3610 return PERL_constant_ISIV;
3612 return PERL_constant_NOTDEF;
3617 if (memEQ(name, "DBL_MANT_DIG", 12)) {
3620 *nv_return = DBL_MANT_DIG;
3621 return PERL_constant_ISNV;
3623 return PERL_constant_NOTDEF;
3626 if (memEQ(name, "FLT_MANT_DIG", 12)) {
3629 *nv_return = FLT_MANT_DIG;
3630 return PERL_constant_ISNV;
3632 return PERL_constant_NOTDEF;
3635 if (memEQ(name, "SA_RESETHAND", 12)) {
3638 *iv_return = (IV) SA_RESETHAND;
3639 return PERL_constant_ISUV;
3641 return PERL_constant_NOTDEF;
3644 if (memEQ(name, "_PC_NO_TRUNC", 12)) {
3647 *iv_return = _PC_NO_TRUNC;
3648 return PERL_constant_ISIV;
3650 return PERL_constant_NOTDEF;
3655 if (memEQ(name, "LDBL_MAX_EXP", 12)) {
3658 *nv_return = LDBL_MAX_EXP;
3659 return PERL_constant_ISNV;
3661 return PERL_constant_NOTDEF;
3666 if (memEQ(name, "ETOOMANYREFS", 12)) {
3669 *iv_return = ETOOMANYREFS;
3670 return PERL_constant_ISIV;
3672 return PERL_constant_NOTDEF;
3677 return PERL_constant_NOTFOUND;
3681 constant_13 (const char *name, IV *iv_return, NV *nv_return) {
3682 /* When generated this function returned values for the list of names given
3683 here. However, subsequent manual editing may have added or removed some.
3684 EADDRNOTAVAIL LDBL_MANT_DIG STDERR_FILENO STDOUT_FILENO _PC_MAX_CANON
3685 _PC_MAX_INPUT _SC_CHILD_MAX _SC_SAVED_IDS */
3686 /* Offset 10 gives the best switch position. */
3689 if (memEQ(name, "EADDRNOTAVAIL", 13)) {
3691 #ifdef EADDRNOTAVAIL
3692 *iv_return = EADDRNOTAVAIL;
3693 return PERL_constant_ISIV;
3695 return PERL_constant_NOTDEF;
3700 if (memEQ(name, "LDBL_MANT_DIG", 13)) {
3702 #ifdef LDBL_MANT_DIG
3703 *nv_return = LDBL_MANT_DIG;
3704 return PERL_constant_ISNV;
3706 return PERL_constant_NOTDEF;
3711 if (memEQ(name, "STDERR_FILENO", 13)) {
3713 #ifdef STDERR_FILENO
3714 *iv_return = STDERR_FILENO;
3715 return PERL_constant_ISIV;
3717 return PERL_constant_NOTDEF;
3720 if (memEQ(name, "STDOUT_FILENO", 13)) {
3722 #ifdef STDOUT_FILENO
3723 *iv_return = STDOUT_FILENO;
3724 return PERL_constant_ISIV;
3726 return PERL_constant_NOTDEF;
3731 if (memEQ(name, "_SC_SAVED_IDS", 13)) {
3733 #ifdef _SC_SAVED_IDS
3734 *iv_return = _SC_SAVED_IDS;
3735 return PERL_constant_ISIV;
3737 return PERL_constant_NOTDEF;
3742 if (memEQ(name, "_SC_CHILD_MAX", 13)) {
3744 #ifdef _SC_CHILD_MAX
3745 *iv_return = _SC_CHILD_MAX;
3746 return PERL_constant_ISIV;
3748 return PERL_constant_NOTDEF;
3753 if (memEQ(name, "_PC_MAX_CANON", 13)) {
3755 #ifdef _PC_MAX_CANON
3756 *iv_return = _PC_MAX_CANON;
3757 return PERL_constant_ISIV;
3759 return PERL_constant_NOTDEF;
3764 if (memEQ(name, "_PC_MAX_INPUT", 13)) {
3766 #ifdef _PC_MAX_INPUT
3767 *iv_return = _PC_MAX_INPUT;
3768 return PERL_constant_ISIV;
3770 return PERL_constant_NOTDEF;
3775 return PERL_constant_NOTFOUND;
3779 constant_14 (const char *name, IV *iv_return, NV *nv_return) {
3780 /* When generated this function returned values for the list of names given
3781 here. However, subsequent manual editing may have added or removed some.
3782 CLOCKS_PER_SEC DBL_MAX_10_EXP DBL_MIN_10_EXP FLT_MAX_10_EXP FLT_MIN_10_EXP
3783 _POSIX_ARG_MAX _POSIX_VERSION _SC_STREAM_MAX _SC_TZNAME_MAX */
3784 /* Offset 5 gives the best switch position. */
3787 if (memEQ(name, "DBL_MAX_10_EXP", 14)) {
3789 #ifdef DBL_MAX_10_EXP
3790 *nv_return = DBL_MAX_10_EXP;
3791 return PERL_constant_ISNV;
3793 return PERL_constant_NOTDEF;
3796 if (memEQ(name, "FLT_MAX_10_EXP", 14)) {
3798 #ifdef FLT_MAX_10_EXP
3799 *nv_return = FLT_MAX_10_EXP;
3800 return PERL_constant_ISNV;
3802 return PERL_constant_NOTDEF;
3807 if (memEQ(name, "DBL_MIN_10_EXP", 14)) {
3809 #ifdef DBL_MIN_10_EXP
3810 *nv_return = DBL_MIN_10_EXP;
3811 return PERL_constant_ISNV;
3813 return PERL_constant_NOTDEF;
3816 if (memEQ(name, "FLT_MIN_10_EXP", 14)) {
3818 #ifdef FLT_MIN_10_EXP
3819 *nv_return = FLT_MIN_10_EXP;
3820 return PERL_constant_ISNV;
3822 return PERL_constant_NOTDEF;
3827 if (memEQ(name, "CLOCKS_PER_SEC", 14)) {
3829 #ifdef CLOCKS_PER_SEC
3830 *iv_return = CLOCKS_PER_SEC;
3831 return PERL_constant_ISIV;
3833 return PERL_constant_NOTDEF;
3838 if (memEQ(name, "_SC_STREAM_MAX", 14)) {
3840 #ifdef _SC_STREAM_MAX
3841 *iv_return = _SC_STREAM_MAX;
3842 return PERL_constant_ISIV;
3844 return PERL_constant_NOTDEF;
3849 if (memEQ(name, "_POSIX_ARG_MAX", 14)) {
3851 #ifdef _POSIX_ARG_MAX
3852 *iv_return = _POSIX_ARG_MAX;
3853 return PERL_constant_ISIV;
3856 return PERL_constant_ISIV;
3859 if (memEQ(name, "_POSIX_VERSION", 14)) {
3861 #ifdef _POSIX_VERSION
3862 *iv_return = _POSIX_VERSION;
3863 return PERL_constant_ISIV;
3866 return PERL_constant_ISIV;
3871 if (memEQ(name, "_SC_TZNAME_MAX", 14)) {
3873 #ifdef _SC_TZNAME_MAX
3874 *iv_return = _SC_TZNAME_MAX;
3875 return PERL_constant_ISIV;
3877 return PERL_constant_NOTDEF;
3882 return PERL_constant_NOTFOUND;
3886 constant_15 (const char *name, IV *iv_return, NV *nv_return) {
3887 /* When generated this function returned values for the list of names given
3888 here. However, subsequent manual editing may have added or removed some.
3889 EPROTONOSUPPORT ESOCKTNOSUPPORT LDBL_MAX_10_EXP LDBL_MIN_10_EXP
3890 _POSIX_LINK_MAX _POSIX_NAME_MAX _POSIX_NO_TRUNC _POSIX_OPEN_MAX
3891 _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_VDISABLE _SC_JOB_CONTROL
3893 /* Offset 9 gives the best switch position. */
3896 if (memEQ(name, "LDBL_MAX_10_EXP", 15)) {
3898 #ifdef LDBL_MAX_10_EXP
3899 *nv_return = LDBL_MAX_10_EXP;
3900 return PERL_constant_ISNV;
3902 return PERL_constant_NOTDEF;
3905 if (memEQ(name, "LDBL_MIN_10_EXP", 15)) {
3907 #ifdef LDBL_MIN_10_EXP
3908 *nv_return = LDBL_MIN_10_EXP;
3909 return PERL_constant_ISNV;
3911 return PERL_constant_NOTDEF;
3916 if (memEQ(name, "_POSIX_OPEN_MAX", 15)) {
3918 #ifdef _POSIX_OPEN_MAX
3919 *iv_return = _POSIX_OPEN_MAX;
3920 return PERL_constant_ISIV;
3923 return PERL_constant_ISIV;
3928 if (memEQ(name, "_POSIX_VDISABLE", 15)) {
3930 #ifdef _POSIX_VDISABLE
3931 *iv_return = _POSIX_VDISABLE;
3932 return PERL_constant_ISIV;
3935 return PERL_constant_ISIV;
3940 if (memEQ(name, "_POSIX_NAME_MAX", 15)) {
3942 #ifdef _POSIX_NAME_MAX
3943 *iv_return = _POSIX_NAME_MAX;
3944 return PERL_constant_ISIV;
3947 return PERL_constant_ISIV;
3952 if (memEQ(name, "_POSIX_LINK_MAX", 15)) {
3954 #ifdef _POSIX_LINK_MAX
3955 *iv_return = _POSIX_LINK_MAX;
3956 return PERL_constant_ISIV;
3959 return PERL_constant_ISIV;
3964 if (memEQ(name, "_SC_JOB_CONTROL", 15)) {
3966 #ifdef _SC_JOB_CONTROL
3967 *iv_return = _SC_JOB_CONTROL;
3968 return PERL_constant_ISIV;
3970 return PERL_constant_NOTDEF;
3975 if (memEQ(name, "_POSIX_PIPE_BUF", 15)) {
3977 #ifdef _POSIX_PIPE_BUF
3978 *iv_return = _POSIX_PIPE_BUF;
3979 return PERL_constant_ISIV;
3982 return PERL_constant_ISIV;
3985 if (memEQ(name, "_SC_NGROUPS_MAX", 15)) {
3987 #ifdef _SC_NGROUPS_MAX
3988 *iv_return = _SC_NGROUPS_MAX;
3989 return PERL_constant_ISIV;
3991 return PERL_constant_NOTDEF;
3996 if (memEQ(name, "_POSIX_PATH_MAX", 15)) {
3998 #ifdef _POSIX_PATH_MAX
3999 *iv_return = _POSIX_PATH_MAX;
4000 return PERL_constant_ISIV;
4003 return PERL_constant_ISIV;
4008 if (memEQ(name, "EPROTONOSUPPORT", 15)) {
4010 #ifdef EPROTONOSUPPORT
4011 *iv_return = EPROTONOSUPPORT;
4012 return PERL_constant_ISIV;
4014 return PERL_constant_NOTDEF;
4017 if (memEQ(name, "ESOCKTNOSUPPORT", 15)) {
4019 #ifdef ESOCKTNOSUPPORT
4020 *iv_return = ESOCKTNOSUPPORT;
4021 return PERL_constant_ISIV;
4023 return PERL_constant_NOTDEF;
4028 if (memEQ(name, "_POSIX_NO_TRUNC", 15)) {
4030 #ifdef _POSIX_NO_TRUNC
4031 *iv_return = _POSIX_NO_TRUNC;
4032 return PERL_constant_ISIV;
4035 return PERL_constant_ISIV;
4040 return PERL_constant_NOTFOUND;
4044 constant_16 (const char *name, IV *iv_return, NV *nv_return) {
4045 /* When generated this function returned values for the list of names given
4046 here. However, subsequent manual editing may have added or removed some.
4047 _POSIX_CHILD_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_SAVED_IDS
4049 /* Offset 11 gives the best switch position. */
4052 if (memEQ(name, "_POSIX_MAX_CANON", 16)) {
4054 #ifdef _POSIX_MAX_CANON
4055 *iv_return = _POSIX_MAX_CANON;
4056 return PERL_constant_ISIV;
4059 return PERL_constant_ISIV;
4064 if (memEQ(name, "_POSIX_CHILD_MAX", 16)) {
4066 #ifdef _POSIX_CHILD_MAX
4067 *iv_return = _POSIX_CHILD_MAX;
4068 return PERL_constant_ISIV;
4071 return PERL_constant_ISIV;
4074 if (memEQ(name, "_POSIX_SAVED_IDS", 16)) {
4076 #ifdef _POSIX_SAVED_IDS
4078 return PERL_constant_ISIV;
4081 return PERL_constant_ISIV;
4086 if (memEQ(name, "_POSIX_SSIZE_MAX", 16)) {
4088 #ifdef _POSIX_SSIZE_MAX
4089 *iv_return = _POSIX_SSIZE_MAX;
4090 return PERL_constant_ISIV;
4093 return PERL_constant_ISIV;
4098 if (memEQ(name, "_POSIX_MAX_INPUT", 16)) {
4100 #ifdef _POSIX_MAX_INPUT
4101 *iv_return = _POSIX_MAX_INPUT;
4102 return PERL_constant_ISIV;
4105 return PERL_constant_ISIV;
4110 return PERL_constant_NOTFOUND;
4114 constant (const char *name, STRLEN len, IV *iv_return, NV *nv_return) {
4115 /* Initially switch on the length of the name. */
4116 /* When generated this function returned values for the list of names given
4117 in this section of perl code. Rather than manually editing these functions
4118 to add or remove constants, which would result in this comment and section
4119 of code becoming inaccurate, we recommend that you edit this section of
4120 code, and use it to regenerate a new set of constant functions which you
4121 then use to replace the originals.
4123 Regenerate these constant functions by feeding this entire source file to
4127 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
4129 my $types = {map {($_, 1)} qw(IV NV UV)};
4130 my @names = (qw(ARG_MAX B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400 B300
4131 B38400 B4800 B50 B600 B75 B9600 BRKINT BUFSIZ CHAR_BIT CHAR_MAX
4132 CHAR_MIN CHILD_MAX CLK_TCK CLOCAL CLOCKS_PER_SEC CREAD CS5 CS6
4133 CS7 CS8 CSIZE CSTOPB E2BIG EACCES EADDRINUSE EADDRNOTAVAIL
4134 EAFNOSUPPORT EAGAIN EALREADY EBADF EBUSY ECHILD ECHO ECHOE ECHOK
4135 ECHONL ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ
4136 EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
4137 EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
4138 EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE
4139 ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC
4140 ENOSYS ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO
4141 EOF EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT
4142 EPROTOTYPE ERANGE EREMOTE ERESTART EROFS ESHUTDOWN
4143 ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS
4144 ETXTBSY EUSERS EWOULDBLOCK EXDEV FD_CLOEXEC FILENAME_MAX F_DUPFD
4145 F_GETFD F_GETFL F_GETLK F_OK F_RDLCK F_SETFD F_SETFL F_SETLK
4146 F_SETLKW F_UNLCK F_WRLCK HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR
4147 IGNPAR INLCR INPCK INT_MAX INT_MIN ISIG ISTRIP IXOFF IXON LC_ALL
4148 LC_COLLATE LC_CTYPE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
4149 LINK_MAX LONG_MAX LONG_MIN L_ctermid L_cuserid L_tmpnam
4150 MAX_CANON MAX_INPUT MB_CUR_MAX MB_LEN_MAX NAME_MAX NCCS
4151 NGROUPS_MAX NOFLSH OPEN_MAX OPOST O_ACCMODE O_APPEND O_CREAT
4152 O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY
4153 PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX
4154 SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT
4155 SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL
4156 SIGPIPE SIGQUIT SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU
4157 SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX
4158 STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX S_IRGRP
4159 S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID S_IWGRP
4160 S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR TCIFLUSH TCIOFF
4161 TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH
4162 TCSANOW TMP_MAX TOSTOP TZNAME_MAX VEOF VEOL VERASE VINTR VKILL
4163 VMIN VQUIT VSTART VSTOP VSUSP VTIME WNOHANG WUNTRACED W_OK X_OK
4164 _PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT
4165 _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE
4166 _SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL
4167 _SC_NGROUPS_MAX _SC_OPEN_MAX _SC_SAVED_IDS _SC_STREAM_MAX
4168 _SC_TZNAME_MAX _SC_VERSION),
4169 {name=>"DBL_DIG", type=>"NV"},
4170 {name=>"DBL_EPSILON", type=>"NV"},
4171 {name=>"DBL_MANT_DIG", type=>"NV"},
4172 {name=>"DBL_MAX", type=>"NV"},
4173 {name=>"DBL_MAX_10_EXP", type=>"NV"},
4174 {name=>"DBL_MAX_EXP", type=>"NV"},
4175 {name=>"DBL_MIN", type=>"NV"},
4176 {name=>"DBL_MIN_10_EXP", type=>"NV"},
4177 {name=>"DBL_MIN_EXP", type=>"NV"},
4178 {name=>"EXIT_FAILURE", type=>"IV", default=>["IV", "1"]},
4179 {name=>"EXIT_SUCCESS", type=>"IV", default=>["IV", "0"]},
4180 {name=>"FLT_DIG", type=>"NV"},
4181 {name=>"FLT_EPSILON", type=>"NV"},
4182 {name=>"FLT_MANT_DIG", type=>"NV"},
4183 {name=>"FLT_MAX", type=>"NV"},
4184 {name=>"FLT_MAX_10_EXP", type=>"NV"},
4185 {name=>"FLT_MAX_EXP", type=>"NV"},
4186 {name=>"FLT_MIN", type=>"NV"},
4187 {name=>"FLT_MIN_10_EXP", type=>"NV"},
4188 {name=>"FLT_MIN_EXP", type=>"NV"},
4189 {name=>"FLT_RADIX", type=>"NV"},
4190 {name=>"FLT_ROUNDS", type=>"NV"},
4191 {name=>"HUGE_VAL", type=>"NV", macro=>["#if (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)) || defined(HUGE_VAL)\n\t/" . "* HUGE_VALL is admittedly non-POSIX but if we are using long doubles\n\t * we might as well use long doubles. --jhi *" . "/\n", "#endif\n"], value=>"\n#if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)\n HUGE_VALL\n#else\n HUGE_VAL\n#endif\n "},
4192 {name=>"LDBL_DIG", type=>"NV"},
4193 {name=>"LDBL_EPSILON", type=>"NV"},
4194 {name=>"LDBL_MANT_DIG", type=>"NV"},
4195 {name=>"LDBL_MAX", type=>"NV"},
4196 {name=>"LDBL_MAX_10_EXP", type=>"NV"},
4197 {name=>"LDBL_MAX_EXP", type=>"NV"},
4198 {name=>"LDBL_MIN", type=>"NV"},
4199 {name=>"LDBL_MIN_10_EXP", type=>"NV"},
4200 {name=>"LDBL_MIN_EXP", type=>"NV"},
4201 {name=>"L_tmpname", type=>"IV", value=>"L_tmpnam"},
4202 {name=>"NULL", type=>"IV", value=>"0"},
4203 {name=>"SA_NOCLDSTOP", type=>"UV"},
4204 {name=>"SA_NOCLDWAIT", type=>"UV"},
4205 {name=>"SA_NODEFER", type=>"UV"},
4206 {name=>"SA_ONSTACK", type=>"UV"},
4207 {name=>"SA_RESETHAND", type=>"UV"},
4208 {name=>"SA_RESTART", type=>"UV"},
4209 {name=>"SA_SIGINFO", type=>"UV"},
4210 {name=>"SIG_DFL", type=>"IV", value=>"(IV)SIG_DFL"},
4211 {name=>"SIG_ERR", type=>"IV", value=>"(IV)SIG_ERR"},
4212 {name=>"SIG_IGN", type=>"IV", value=>"(IV)SIG_IGN"},
4213 {name=>"UCHAR_MAX", type=>"UV"},
4214 {name=>"UINT_MAX", type=>"UV"},
4215 {name=>"ULONG_MAX", type=>"UV"},
4216 {name=>"USHRT_MAX", type=>"UV"},
4217 {name=>"_POSIX_ARG_MAX", type=>"IV", default=>["IV", "0"]},
4218 {name=>"_POSIX_CHILD_MAX", type=>"IV", default=>["IV", "0"]},
4219 {name=>"_POSIX_CHOWN_RESTRICTED", type=>"IV", default=>["IV", "0"]},
4220 {name=>"_POSIX_JOB_CONTROL", type=>"IV", value=>"1", default=>["IV", "0"]},
4221 {name=>"_POSIX_LINK_MAX", type=>"IV", default=>["IV", "0"]},
4222 {name=>"_POSIX_MAX_CANON", type=>"IV", default=>["IV", "0"]},
4223 {name=>"_POSIX_MAX_INPUT", type=>"IV", default=>["IV", "0"]},
4224 {name=>"_POSIX_NAME_MAX", type=>"IV", default=>["IV", "0"]},
4225 {name=>"_POSIX_NGROUPS_MAX", type=>"IV", default=>["IV", "0"]},
4226 {name=>"_POSIX_NO_TRUNC", type=>"IV", default=>["IV", "0"]},
4227 {name=>"_POSIX_OPEN_MAX", type=>"IV", default=>["IV", "0"]},
4228 {name=>"_POSIX_PATH_MAX", type=>"IV", default=>["IV", "0"]},
4229 {name=>"_POSIX_PIPE_BUF", type=>"IV", default=>["IV", "0"]},
4230 {name=>"_POSIX_SAVED_IDS", type=>"IV", value=>"1", default=>["IV", "0"]},
4231 {name=>"_POSIX_SSIZE_MAX", type=>"IV", default=>["IV", "0"]},
4232 {name=>"_POSIX_STREAM_MAX", type=>"IV", default=>["IV", "0"]},
4233 {name=>"_POSIX_TZNAME_MAX", type=>"IV", default=>["IV", "0"]},
4234 {name=>"_POSIX_VDISABLE", type=>"IV", default=>["IV", "0"]},
4235 {name=>"_POSIX_VERSION", type=>"IV", default=>["IV", "0"]});
4237 print constant_types(); # macro defs
4238 foreach (C_constant ("POSIX", 'constant', 'IV', $types, undef, 3, @names) ) {
4239 print $_, "\n"; # C constant subs
4241 print "#### XS Section:\n";
4242 print XS_constant ("POSIX", $types);
4248 if (memEQ(name, "B0", 2)) {
4251 return PERL_constant_ISIV;
4253 return PERL_constant_NOTDEF;
4258 return constant_3 (name, iv_return, nv_return);
4261 return constant_4 (name, iv_return, nv_return);
4264 return constant_5 (name, iv_return, nv_return);
4267 return constant_6 (name, iv_return, nv_return);
4270 return constant_7 (name, iv_return, nv_return);
4273 return constant_8 (name, iv_return, nv_return);
4276 return constant_9 (name, iv_return, nv_return);
4279 return constant_10 (name, iv_return, nv_return);
4282 return constant_11 (name, iv_return, nv_return);
4285 return constant_12 (name, iv_return, nv_return);
4288 return constant_13 (name, iv_return, nv_return);
4291 return constant_14 (name, iv_return, nv_return);
4294 return constant_15 (name, iv_return, nv_return);
4297 return constant_16 (name, iv_return, nv_return);
4300 /* Names all of length 17. */
4301 /* _POSIX_STREAM_MAX _POSIX_TZNAME_MAX */
4302 /* Offset 7 gives the best switch position. */
4305 if (memEQ(name, "_POSIX_STREAM_MAX", 17)) {
4307 #ifdef _POSIX_STREAM_MAX
4308 *iv_return = _POSIX_STREAM_MAX;
4309 return PERL_constant_ISIV;
4312 return PERL_constant_ISIV;
4317 if (memEQ(name, "_POSIX_TZNAME_MAX", 17)) {
4319 #ifdef _POSIX_TZNAME_MAX
4320 *iv_return = _POSIX_TZNAME_MAX;
4321 return PERL_constant_ISIV;
4324 return PERL_constant_ISIV;
4331 /* Names all of length 18. */
4332 /* _POSIX_JOB_CONTROL _POSIX_NGROUPS_MAX */
4333 /* Offset 12 gives the best switch position. */
4336 if (memEQ(name, "_POSIX_JOB_CONTROL", 18)) {
4338 #ifdef _POSIX_JOB_CONTROL
4340 return PERL_constant_ISIV;
4343 return PERL_constant_ISIV;
4348 if (memEQ(name, "_POSIX_NGROUPS_MAX", 18)) {
4350 #ifdef _POSIX_NGROUPS_MAX
4351 *iv_return = _POSIX_NGROUPS_MAX;
4352 return PERL_constant_ISIV;
4355 return PERL_constant_ISIV;
4362 if (memEQ(name, "_PC_CHOWN_RESTRICTED", 20)) {
4363 #ifdef _PC_CHOWN_RESTRICTED
4364 *iv_return = _PC_CHOWN_RESTRICTED;
4365 return PERL_constant_ISIV;
4367 return PERL_constant_NOTDEF;
4372 if (memEQ(name, "_POSIX_CHOWN_RESTRICTED", 23)) {
4373 #ifdef _POSIX_CHOWN_RESTRICTED
4374 *iv_return = _POSIX_CHOWN_RESTRICTED;
4375 return PERL_constant_ISIV;
4378 return PERL_constant_ISIV;
4383 return PERL_constant_NOTFOUND;
4387 restore_sigmask(sigset_t *ossetp)
4389 /* Fortunately, restoring the signal mask can't fail, because
4390 * there's nothing we can do about it if it does -- we're not
4391 * supposed to return -1 from sigaction unless the disposition
4394 (void)sigprocmask(SIG_SETMASK, ossetp, (sigset_t *)0);
4397 MODULE = SigSet PACKAGE = POSIX::SigSet PREFIX = sig
4400 new(packname = "POSIX::SigSet", ...)
4405 New(0, RETVAL, 1, sigset_t);
4406 sigemptyset(RETVAL);
4407 for (i = 1; i < items; i++)
4408 sigaddset(RETVAL, SvIV(ST(i)));
4415 POSIX::SigSet sigset
4420 sigaddset(sigset, sig)
4421 POSIX::SigSet sigset
4425 sigdelset(sigset, sig)
4426 POSIX::SigSet sigset
4431 POSIX::SigSet sigset
4435 POSIX::SigSet sigset
4438 sigismember(sigset, sig)
4439 POSIX::SigSet sigset
4443 MODULE = Termios PACKAGE = POSIX::Termios PREFIX = cf
4446 new(packname = "POSIX::Termios", ...)
4451 New(0, RETVAL, 1, struct termios);
4453 not_here("termios");
4461 DESTROY(termios_ref)
4462 POSIX::Termios termios_ref
4465 Safefree(termios_ref);
4467 not_here("termios");
4471 getattr(termios_ref, fd = 0)
4472 POSIX::Termios termios_ref
4475 RETVAL = tcgetattr(fd, termios_ref);
4480 setattr(termios_ref, fd = 0, optional_actions = 0)
4481 POSIX::Termios termios_ref
4483 int optional_actions
4485 RETVAL = tcsetattr(fd, optional_actions, termios_ref);
4490 cfgetispeed(termios_ref)
4491 POSIX::Termios termios_ref
4494 cfgetospeed(termios_ref)
4495 POSIX::Termios termios_ref
4498 getiflag(termios_ref)
4499 POSIX::Termios termios_ref
4501 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4502 RETVAL = termios_ref->c_iflag;
4504 not_here("getiflag");
4511 getoflag(termios_ref)
4512 POSIX::Termios termios_ref
4514 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4515 RETVAL = termios_ref->c_oflag;
4517 not_here("getoflag");
4524 getcflag(termios_ref)
4525 POSIX::Termios termios_ref
4527 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4528 RETVAL = termios_ref->c_cflag;
4530 not_here("getcflag");
4537 getlflag(termios_ref)
4538 POSIX::Termios termios_ref
4540 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4541 RETVAL = termios_ref->c_lflag;
4543 not_here("getlflag");
4550 getcc(termios_ref, ccix)
4551 POSIX::Termios termios_ref
4554 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4556 croak("Bad getcc subscript");
4557 RETVAL = termios_ref->c_cc[ccix];
4566 cfsetispeed(termios_ref, speed)
4567 POSIX::Termios termios_ref
4571 cfsetospeed(termios_ref, speed)
4572 POSIX::Termios termios_ref
4576 setiflag(termios_ref, iflag)
4577 POSIX::Termios termios_ref
4580 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4581 termios_ref->c_iflag = iflag;
4583 not_here("setiflag");
4587 setoflag(termios_ref, oflag)
4588 POSIX::Termios termios_ref
4591 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4592 termios_ref->c_oflag = oflag;
4594 not_here("setoflag");
4598 setcflag(termios_ref, cflag)
4599 POSIX::Termios termios_ref
4602 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4603 termios_ref->c_cflag = cflag;
4605 not_here("setcflag");
4609 setlflag(termios_ref, lflag)
4610 POSIX::Termios termios_ref
4613 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4614 termios_ref->c_lflag = lflag;
4616 not_here("setlflag");
4620 setcc(termios_ref, ccix, cc)
4621 POSIX::Termios termios_ref
4625 #ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
4627 croak("Bad setcc subscript");
4628 termios_ref->c_cc[ccix] = cc;
4634 MODULE = POSIX PACKAGE = POSIX
4644 /* const char *pv; Uncomment this if you need to return PVs */
4647 const char * s = SvPV(sv, len);
4649 type = constant(s, len, &iv, &nv);
4650 /* Return 1 or 2 items. First is error message, or undef if no error.
4651 Second, if present, is found value */
4653 case PERL_constant_NOTFOUND:
4654 sv = sv_2mortal(newSVpvf("%s is not a valid POSIX macro", s));
4657 case PERL_constant_NOTDEF:
4658 sv = sv_2mortal(newSVpvf(
4659 "Your vendor has not defined POSIX macro %s, used", s));
4662 case PERL_constant_ISIV:
4664 PUSHs(&PL_sv_undef);
4667 /* Uncomment this if you need to return NOs
4668 case PERL_constant_ISNO:
4670 PUSHs(&PL_sv_undef);
4673 case PERL_constant_ISNV:
4675 PUSHs(&PL_sv_undef);
4678 /* Uncomment this if you need to return UNDEFs
4679 case PERL_constant_ISUNDEF:
4681 case PERL_constant_ISUV:
4683 PUSHs(&PL_sv_undef);
4686 /* Uncomment this if you need to return YESs
4687 case PERL_constant_ISYES:
4689 PUSHs(&PL_sv_undef);
4693 sv = sv_2mortal(newSVpvf(
4694 "Unexpected return type %d while processing POSIX macro %s, used",
4700 int_macro_int(sv, iv)
4707 const char * s = SvPV(sv, len);
4710 /* Change this to int_macro_int(s, len, &iv, &nv);
4711 if you need to return both NVs and IVs */
4712 type = int_macro_int(s, len, &iv);
4713 /* Return 1 or 2 items. First is error message, or undef if no error.
4714 Second, if present, is found value */
4716 case PERL_constant_NOTFOUND:
4717 sv = sv_2mortal(newSVpvf("%s is not a valid POSIX macro", s));
4719 PUSHs(&PL_sv_undef);
4722 case PERL_constant_NOTDEF:
4723 sv = sv_2mortal(newSVpvf(
4724 "Your vendor has not defined POSIX macro %s, used", s));
4726 PUSHs(&PL_sv_undef);
4729 case PERL_constant_ISIV:
4733 sv = sv_2mortal(newSVpvf(
4734 "Unexpected return type %d while processing POSIX macro %s, used",
4737 PUSHs(&PL_sv_undef);
4743 unsigned char * charstring
4745 unsigned char *s = charstring;
4746 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4747 for (RETVAL = 1; RETVAL && s < e; s++)
4755 unsigned char * charstring
4757 unsigned char *s = charstring;
4758 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4759 for (RETVAL = 1; RETVAL && s < e; s++)
4767 unsigned char * charstring
4769 unsigned char *s = charstring;
4770 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4771 for (RETVAL = 1; RETVAL && s < e; s++)
4779 unsigned char * charstring
4781 unsigned char *s = charstring;
4782 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4783 for (RETVAL = 1; RETVAL && s < e; s++)
4791 unsigned char * charstring
4793 unsigned char *s = charstring;
4794 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4795 for (RETVAL = 1; RETVAL && s < e; s++)
4803 unsigned char * charstring
4805 unsigned char *s = charstring;
4806 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4807 for (RETVAL = 1; RETVAL && s < e; s++)
4815 unsigned char * charstring
4817 unsigned char *s = charstring;
4818 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4819 for (RETVAL = 1; RETVAL && s < e; s++)
4827 unsigned char * charstring
4829 unsigned char *s = charstring;
4830 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4831 for (RETVAL = 1; RETVAL && s < e; s++)
4839 unsigned char * charstring
4841 unsigned char *s = charstring;
4842 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4843 for (RETVAL = 1; RETVAL && s < e; s++)
4851 unsigned char * charstring
4853 unsigned char *s = charstring;
4854 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4855 for (RETVAL = 1; RETVAL && s < e; s++)
4862 isxdigit(charstring)
4863 unsigned char * charstring
4865 unsigned char *s = charstring;
4866 unsigned char *e = s + PL_na; /* "PL_na" set by typemap side effect */
4867 for (RETVAL = 1; RETVAL && s < e; s++)
4874 open(filename, flags = O_RDONLY, mode = 0666)
4879 if (flags & (O_APPEND|O_CREAT|O_TRUNC|O_RDWR|O_WRONLY|O_EXCL))
4880 TAINT_PROPER("open");
4881 RETVAL = open(filename, flags, mode);
4889 #ifdef HAS_LOCALECONV
4890 struct lconv *lcbuf;
4892 if ((lcbuf = localeconv())) {
4894 if (lcbuf->decimal_point && *lcbuf->decimal_point)
4895 hv_store(RETVAL, "decimal_point", 13,
4896 newSVpv(lcbuf->decimal_point, 0), 0);
4897 if (lcbuf->thousands_sep && *lcbuf->thousands_sep)
4898 hv_store(RETVAL, "thousands_sep", 13,
4899 newSVpv(lcbuf->thousands_sep, 0), 0);
4900 #ifndef NO_LOCALECONV_GROUPING
4901 if (lcbuf->grouping && *lcbuf->grouping)
4902 hv_store(RETVAL, "grouping", 8,
4903 newSVpv(lcbuf->grouping, 0), 0);
4905 if (lcbuf->int_curr_symbol && *lcbuf->int_curr_symbol)
4906 hv_store(RETVAL, "int_curr_symbol", 15,
4907 newSVpv(lcbuf->int_curr_symbol, 0), 0);
4908 if (lcbuf->currency_symbol && *lcbuf->currency_symbol)
4909 hv_store(RETVAL, "currency_symbol", 15,
4910 newSVpv(lcbuf->currency_symbol, 0), 0);
4911 if (lcbuf->mon_decimal_point && *lcbuf->mon_decimal_point)
4912 hv_store(RETVAL, "mon_decimal_point", 17,
4913 newSVpv(lcbuf->mon_decimal_point, 0), 0);
4914 #ifndef NO_LOCALECONV_MON_THOUSANDS_SEP
4915 if (lcbuf->mon_thousands_sep && *lcbuf->mon_thousands_sep)
4916 hv_store(RETVAL, "mon_thousands_sep", 17,
4917 newSVpv(lcbuf->mon_thousands_sep, 0), 0);
4919 #ifndef NO_LOCALECONV_MON_GROUPING
4920 if (lcbuf->mon_grouping && *lcbuf->mon_grouping)
4921 hv_store(RETVAL, "mon_grouping", 12,
4922 newSVpv(lcbuf->mon_grouping, 0), 0);
4924 if (lcbuf->positive_sign && *lcbuf->positive_sign)
4925 hv_store(RETVAL, "positive_sign", 13,
4926 newSVpv(lcbuf->positive_sign, 0), 0);
4927 if (lcbuf->negative_sign && *lcbuf->negative_sign)
4928 hv_store(RETVAL, "negative_sign", 13,
4929 newSVpv(lcbuf->negative_sign, 0), 0);
4931 if (lcbuf->int_frac_digits != CHAR_MAX)
4932 hv_store(RETVAL, "int_frac_digits", 15,
4933 newSViv(lcbuf->int_frac_digits), 0);
4934 if (lcbuf->frac_digits != CHAR_MAX)
4935 hv_store(RETVAL, "frac_digits", 11,
4936 newSViv(lcbuf->frac_digits), 0);
4937 if (lcbuf->p_cs_precedes != CHAR_MAX)
4938 hv_store(RETVAL, "p_cs_precedes", 13,
4939 newSViv(lcbuf->p_cs_precedes), 0);
4940 if (lcbuf->p_sep_by_space != CHAR_MAX)
4941 hv_store(RETVAL, "p_sep_by_space", 14,
4942 newSViv(lcbuf->p_sep_by_space), 0);
4943 if (lcbuf->n_cs_precedes != CHAR_MAX)
4944 hv_store(RETVAL, "n_cs_precedes", 13,
4945 newSViv(lcbuf->n_cs_precedes), 0);
4946 if (lcbuf->n_sep_by_space != CHAR_MAX)
4947 hv_store(RETVAL, "n_sep_by_space", 14,
4948 newSViv(lcbuf->n_sep_by_space), 0);
4949 if (lcbuf->p_sign_posn != CHAR_MAX)
4950 hv_store(RETVAL, "p_sign_posn", 11,
4951 newSViv(lcbuf->p_sign_posn), 0);
4952 if (lcbuf->n_sign_posn != CHAR_MAX)
4953 hv_store(RETVAL, "n_sign_posn", 11,
4954 newSViv(lcbuf->n_sign_posn), 0);
4957 localeconv(); /* A stub to call not_here(). */
4963 setlocale(category, locale = 0)
4967 RETVAL = setlocale(category, locale);
4969 #ifdef USE_LOCALE_CTYPE
4970 if (category == LC_CTYPE
4972 || category == LC_ALL
4978 if (category == LC_ALL)
4979 newctype = setlocale(LC_CTYPE, NULL);
4983 new_ctype(newctype);
4985 #endif /* USE_LOCALE_CTYPE */
4986 #ifdef USE_LOCALE_COLLATE
4987 if (category == LC_COLLATE
4989 || category == LC_ALL
4995 if (category == LC_ALL)
4996 newcoll = setlocale(LC_COLLATE, NULL);
5000 new_collate(newcoll);
5002 #endif /* USE_LOCALE_COLLATE */
5003 #ifdef USE_LOCALE_NUMERIC
5004 if (category == LC_NUMERIC
5006 || category == LC_ALL
5012 if (category == LC_ALL)
5013 newnum = setlocale(LC_NUMERIC, NULL);
5017 new_numeric(newnum);
5019 #endif /* USE_LOCALE_NUMERIC */
5059 /* (We already know stack is long enough.) */
5060 PUSHs(sv_2mortal(newSVnv(frexp(x,&expvar))));
5061 PUSHs(sv_2mortal(newSViv(expvar)));
5077 /* (We already know stack is long enough.) */
5078 PUSHs(sv_2mortal(newSVnv(Perl_modf(x,&intvar))));
5079 PUSHs(sv_2mortal(newSVnv(intvar)));
5094 sigaction(sig, optaction, oldaction = 0)
5097 POSIX::SigAction oldaction
5100 RETVAL = not_here("sigaction");
5102 # This code is really grody because we're trying to make the signal
5103 # interface look beautiful, which is hard.
5106 POSIX__SigAction action;
5107 GV *siggv = gv_fetchpv("SIG", TRUE, SVt_PVHV);
5108 struct sigaction act;
5109 struct sigaction oact;
5112 POSIX__SigSet sigset;
5114 SV** sigsvp = hv_fetch(GvHVn(siggv),
5116 strlen(PL_sig_name[sig]),
5119 /* Check optaction and set action */
5120 if(SvTRUE(optaction)) {
5121 if(sv_isa(optaction, "POSIX::SigAction"))
5122 action = (HV*)SvRV(optaction);
5124 croak("action is not of type POSIX::SigAction");
5130 /* sigaction() is supposed to look atomic. In particular, any
5131 * signal handler invoked during a sigaction() call should
5132 * see either the old or the new disposition, and not something
5133 * in between. We use sigprocmask() to make it so.
5136 RETVAL=sigprocmask(SIG_BLOCK, &sset, &osset);
5140 /* Restore signal mask no matter how we exit this block. */
5141 SAVEDESTRUCTOR(restore_sigmask, &osset);
5143 RETVAL=-1; /* In case both oldaction and action are 0. */
5145 /* Remember old disposition if desired. */
5147 svp = hv_fetch(oldaction, "HANDLER", 7, TRUE);
5149 croak("Can't supply an oldaction without a HANDLER");
5150 if(SvTRUE(*sigsvp)) { /* TBD: what if "0"? */
5151 sv_setsv(*svp, *sigsvp);
5154 sv_setpv(*svp, "DEFAULT");
5156 RETVAL = sigaction(sig, (struct sigaction *)0, & oact);
5159 /* Get back the mask. */
5160 svp = hv_fetch(oldaction, "MASK", 4, TRUE);
5161 if (sv_isa(*svp, "POSIX::SigSet")) {
5162 IV tmp = SvIV((SV*)SvRV(*svp));
5163 sigset = INT2PTR(sigset_t*, tmp);
5166 New(0, sigset, 1, sigset_t);
5167 sv_setptrobj(*svp, sigset, "POSIX::SigSet");
5169 *sigset = oact.sa_mask;
5171 /* Get back the flags. */
5172 svp = hv_fetch(oldaction, "FLAGS", 5, TRUE);
5173 sv_setiv(*svp, oact.sa_flags);
5177 /* Vector new handler through %SIG. (We always use sighandler
5178 for the C signal handler, which reads %SIG to dispatch.) */
5179 svp = hv_fetch(action, "HANDLER", 7, FALSE);
5181 croak("Can't supply an action without a HANDLER");
5182 sv_setsv(*sigsvp, *svp);
5183 mg_set(*sigsvp); /* handles DEFAULT and IGNORE */
5185 char *s=SvPVX(*svp);
5186 if(strEQ(s,"IGNORE")) {
5187 act.sa_handler = SIG_IGN;
5189 else if(strEQ(s,"DEFAULT")) {
5190 act.sa_handler = SIG_DFL;
5193 act.sa_handler = PL_sighandlerp;
5197 act.sa_handler = PL_sighandlerp;
5200 /* Set up any desired mask. */
5201 svp = hv_fetch(action, "MASK", 4, FALSE);
5202 if (svp && sv_isa(*svp, "POSIX::SigSet")) {
5203 IV tmp = SvIV((SV*)SvRV(*svp));
5204 sigset = INT2PTR(sigset_t*, tmp);
5205 act.sa_mask = *sigset;
5208 sigemptyset(& act.sa_mask);
5210 /* Set up any desired flags. */
5211 svp = hv_fetch(action, "FLAGS", 5, FALSE);
5212 act.sa_flags = svp ? SvIV(*svp) : 0;
5214 /* Don't worry about cleaning up *sigsvp if this fails,
5215 * because that means we tried to disposition a
5216 * nonblockable signal, in which case *sigsvp is
5217 * essentially meaningless anyway.
5219 RETVAL = sigaction(sig, & act, (struct sigaction *)0);
5230 POSIX::SigSet sigset
5233 sigprocmask(how, sigset, oldsigset = 0)
5235 POSIX::SigSet sigset
5236 POSIX::SigSet oldsigset = NO_INIT
5241 else if (sv_derived_from(ST(2), "POSIX::SigSet")) {
5242 IV tmp = SvIV((SV*)SvRV(ST(2)));
5243 oldsigset = INT2PTR(POSIX__SigSet,tmp);
5246 New(0, oldsigset, 1, sigset_t);
5247 sigemptyset(oldsigset);
5248 sv_setref_pv(ST(2), "POSIX::SigSet", (void*)oldsigset);
5252 sigsuspend(signal_mask)
5253 POSIX::SigSet signal_mask
5273 lseek(fd, offset, whence)
5286 if (pipe(fds) != -1) {
5288 PUSHs(sv_2mortal(newSViv(fds[0])));
5289 PUSHs(sv_2mortal(newSViv(fds[1])));
5293 read(fd, buffer, nbytes)
5295 SV *sv_buffer = SvROK(ST(1)) ? SvRV(ST(1)) : ST(1);
5299 char * buffer = sv_grow( sv_buffer, nbytes+1 );
5302 SvCUR(sv_buffer) = RETVAL;
5303 SvPOK_only(sv_buffer);
5304 *SvEND(sv_buffer) = '\0';
5305 SvTAINTED_on(sv_buffer);
5321 tcsetpgrp(fd, pgrp_id)
5330 if (uname(&buf) >= 0) {
5332 PUSHs(sv_2mortal(newSVpv(buf.sysname, 0)));
5333 PUSHs(sv_2mortal(newSVpv(buf.nodename, 0)));
5334 PUSHs(sv_2mortal(newSVpv(buf.release, 0)));
5335 PUSHs(sv_2mortal(newSVpv(buf.version, 0)));
5336 PUSHs(sv_2mortal(newSVpv(buf.machine, 0)));
5339 uname((char *) 0); /* A stub to call not_here(). */
5343 write(fd, buffer, nbytes)
5354 RETVAL = newSVpvn("", 0);
5355 SvGROW(RETVAL, L_tmpnam);
5356 len = strlen(tmpnam(SvPV(RETVAL, i)));
5357 SvCUR_set(RETVAL, len);
5370 mbstowcs(s, pwcs, n)
5382 wcstombs(s, pwcs, n)
5404 SET_NUMERIC_LOCAL();
5405 num = strtod(str, &unparsed);
5406 PUSHs(sv_2mortal(newSVnv(num)));
5407 if (GIMME == G_ARRAY) {
5410 PUSHs(sv_2mortal(newSViv(strlen(unparsed))));
5412 PUSHs(&PL_sv_undef);
5416 strtol(str, base = 0)
5423 num = strtol(str, &unparsed, base);
5424 #if IVSIZE <= LONGSIZE
5425 if (num < IV_MIN || num > IV_MAX)
5426 PUSHs(sv_2mortal(newSVnv((double)num)));
5429 PUSHs(sv_2mortal(newSViv((IV)num)));
5430 if (GIMME == G_ARRAY) {
5433 PUSHs(sv_2mortal(newSViv(strlen(unparsed))));
5435 PUSHs(&PL_sv_undef);
5439 strtoul(str, base = 0)
5446 num = strtoul(str, &unparsed, base);
5448 PUSHs(sv_2mortal(newSViv((IV)num)));
5450 PUSHs(sv_2mortal(newSVnv((double)num)));
5451 if (GIMME == G_ARRAY) {
5454 PUSHs(sv_2mortal(newSViv(strlen(unparsed))));
5456 PUSHs(&PL_sv_undef);
5466 char *p = SvPV(src,srclen);
5468 ST(0) = sv_2mortal(NEWSV(800,srclen));
5469 dstlen = strxfrm(SvPVX(ST(0)), p, (size_t)srclen);
5470 if (dstlen > srclen) {
5472 SvGROW(ST(0), dstlen);
5473 strxfrm(SvPVX(ST(0)), p, (size_t)dstlen);
5476 SvCUR(ST(0)) = dstlen;
5481 mkfifo(filename, mode)
5485 TAINT_PROPER("mkfifo");
5486 RETVAL = mkfifo(filename, mode);
5502 tcflush(fd, queue_selector)
5507 tcsendbreak(fd, duration)
5512 asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
5525 init_tm(&mytm); /* XXX workaround - see init_tm() above */
5528 mytm.tm_hour = hour;
5529 mytm.tm_mday = mday;
5531 mytm.tm_year = year;
5532 mytm.tm_wday = wday;
5533 mytm.tm_yday = yday;
5534 mytm.tm_isdst = isdst;
5535 RETVAL = asctime(&mytm);
5552 realtime = times( &tms );
5554 PUSHs( sv_2mortal( newSViv( (IV) realtime ) ) );
5555 PUSHs( sv_2mortal( newSViv( (IV) tms.tms_utime ) ) );
5556 PUSHs( sv_2mortal( newSViv( (IV) tms.tms_stime ) ) );
5557 PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cutime ) ) );
5558 PUSHs( sv_2mortal( newSViv( (IV) tms.tms_cstime ) ) );
5561 difftime(time1, time2)
5566 mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
5579 init_tm(&mytm); /* XXX workaround - see init_tm() above */
5582 mytm.tm_hour = hour;
5583 mytm.tm_mday = mday;
5585 mytm.tm_year = year;
5586 mytm.tm_wday = wday;
5587 mytm.tm_yday = yday;
5588 mytm.tm_isdst = isdst;
5589 RETVAL = mktime(&mytm);
5594 #XXX: if $xsubpp::WantOptimize is always the default
5595 # sv_setpv(TARG, ...) could be used rather than
5596 # ST(0) = sv_2mortal(newSVpv(...))
5598 strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
5611 char *buf = my_strftime(fmt, sec, min, hour, mday, mon, year, wday, yday, isdst);
5613 ST(0) = sv_2mortal(newSVpv(buf, 0));
5625 PUSHs(sv_2mortal(newSVpvn(tzname[0],strlen(tzname[0]))));
5626 PUSHs(sv_2mortal(newSVpvn(tzname[1],strlen(tzname[1]))));
5629 access(filename, mode)
5647 pathconf(filename, name)
5670 #XXX: use sv_getcwd()
5678 New(0, buf, buflen, char);
5679 /* Many getcwd()s know how to automatically allocate memory
5680 * for the directory if the buffer argument is NULL but...
5681 * (1) we cannot assume all getcwd()s do that
5682 * (2) this may interfere with Perl's malloc
5683 * So let's not. --jhi */
5684 while ((getcwd(buf, buflen) == NULL) && errno == ERANGE) {
5686 if (buflen > MAXPATHLEN) {
5691 Renew(buf, buflen, char);
5694 PUSHs(sv_2mortal(newSVpv(buf, 0)));
5698 PUSHs(&PL_sv_undef);
5700 require_pv("Cwd.pm");
5701 /* Module require may have grown the stack */
5705 XSRETURN(call_pv("Cwd::cwd", GIMME_V));