Commit | Line | Data |
170888cf |
1 | # Explicitly avoid including '.' in @INC; autoloader gets confused since it |
2 | # can find POSIX.pm, but can't find autosplit.ix. |
3 | BEGIN { @INC = '../../lib';} |
4 | # |
42793c05 |
5 | use ExtUtils::MakeMaker; |
1cb0fb50 |
6 | use ExtUtils::Constant 0.11 'WriteConstants'; |
514114c1 |
7 | use Config; |
8 | my @libs; |
9 | if ($^O ne 'MSWin32') { |
2834bd71 |
10 | @libs = ('LIBS' => ["-lm -lposix -lcposix"]); |
514114c1 |
11 | } |
4ad3186e |
12 | WriteMakefile( |
1adb159c |
13 | NAME => 'POSIX', |
514114c1 |
14 | @libs, |
3609ea0d |
15 | MAN3PODS => {}, # Pods will be built by installman. |
16 | XSPROTOARG => '-noprototypes', # XXX remove later? |
ece2ffd9 |
17 | VERSION_FROM => 'POSIX.pm', |
3609ea0d |
18 | realclean => {FILES=> 'const-c.inc const-xs.inc'}, |
4ad3186e |
19 | ); |
0552bf3a |
20 | |
21 | my @names = |
22 | ( |
23 | qw(ARG_MAX B0 B110 B1200 B134 B150 B1800 B19200 B200 B2400 B300 B38400 B4800 |
24 | B50 B600 B75 B9600 BRKINT BUFSIZ CHAR_BIT CHAR_MAX CHAR_MIN CHILD_MAX |
ae052913 |
25 | CLOCAL CLOCKS_PER_SEC CREAD CS5 CS6 CS7 CS8 CSIZE CSTOPB E2BIG |
0552bf3a |
26 | EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF |
27 | EBUSY ECHILD ECHO ECHOE ECHOK ECHONL ECONNABORTED ECONNREFUSED |
28 | ECONNRESET EDEADLK EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG |
29 | EHOSTDOWN EHOSTUNREACH EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR |
30 | ELOOP EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET |
31 | ENETUNREACH ENFILE ENOBUFS ENODEV ENOENT ENOEXEC ENOLCK ENOMEM |
32 | ENOPROTOOPT ENOSPC ENOSYS ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK |
33 | ENOTTY ENXIO EOF EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE EPROCLIM |
34 | EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART EROFS ESHUTDOWN |
35 | ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT ETOOMANYREFS ETXTBSY |
36 | EUSERS EWOULDBLOCK EXDEV FD_CLOEXEC FILENAME_MAX F_DUPFD F_GETFD |
37 | F_GETFL F_GETLK F_OK F_RDLCK F_SETFD F_SETFL F_SETLK F_SETLKW F_UNLCK |
38 | F_WRLCK HUPCL ICANON ICRNL IEXTEN IGNBRK IGNCR IGNPAR INLCR INPCK |
39 | INT_MAX INT_MIN ISIG ISTRIP IXOFF IXON LC_ALL LC_COLLATE LC_CTYPE |
40 | LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LINK_MAX LONG_MAX LONG_MIN |
64bb7586 |
41 | L_ctermid L_cuserid L_tmpnam MAX_CANON MAX_INPUT MB_LEN_MAX |
0552bf3a |
42 | NAME_MAX NCCS NGROUPS_MAX NOFLSH OPEN_MAX OPOST O_ACCMODE O_APPEND |
43 | O_CREAT O_EXCL O_NOCTTY O_NONBLOCK O_RDONLY O_RDWR O_TRUNC O_WRONLY |
44 | PARENB PARMRK PARODD PATH_MAX PIPE_BUF RAND_MAX R_OK SCHAR_MAX |
45 | SCHAR_MIN SEEK_CUR SEEK_END SEEK_SET SHRT_MAX SHRT_MIN SIGABRT SIGALRM |
46 | SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT |
6800c0cf |
47 | SIGSEGV SIGSTOP SIGTERM SIGTSTP SIGTTIN SIGTTOU |
3609ea0d |
48 | SIGUSR1 SIGUSR2 SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SSIZE_MAX |
49 | STDERR_FILENO STDIN_FILENO STDOUT_FILENO STREAM_MAX |
50 | S_IRGRP S_IROTH S_IRUSR S_IRWXG S_IRWXO S_IRWXU S_ISGID S_ISUID |
51 | S_IWGRP S_IWOTH S_IWUSR S_IXGRP S_IXOTH S_IXUSR TCIFLUSH TCIOFF |
52 | TCIOFLUSH TCION TCOFLUSH TCOOFF TCOON TCSADRAIN TCSAFLUSH TCSANOW |
53 | TMP_MAX TOSTOP TZNAME_MAX VEOF VEOL VERASE VINTR VKILL VMIN VQUIT |
54 | VSTART VSTOP VSUSP VTIME WNOHANG WUNTRACED W_OK X_OK |
55 | _PC_CHOWN_RESTRICTED _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT |
0552bf3a |
56 | _PC_NAME_MAX _PC_NO_TRUNC _PC_PATH_MAX _PC_PIPE_BUF _PC_VDISABLE |
57 | _SC_ARG_MAX _SC_CHILD_MAX _SC_CLK_TCK _SC_JOB_CONTROL _SC_NGROUPS_MAX |
d61b6859 |
58 | _SC_OPEN_MAX _SC_PAGESIZE _SC_SAVED_IDS _SC_STREAM_MAX _SC_TZNAME_MAX |
59 | _SC_VERSION), |
ae052913 |
60 | {name=>"CLK_TCK", not_constant=>1}, |
64bb7586 |
61 | {name=>"MB_CUR_MAX", not_constant=>1}, |
6800c0cf |
62 | {name=>"SIGRTMAX", not_constant=>1}, |
63 | {name=>"SIGRTMIN", not_constant=>1}, |
0552bf3a |
64 | {name=>"EXIT_FAILURE", default=>["IV", "1"]}, |
65 | {name=>"EXIT_SUCCESS", default=>["IV", "0"]}, |
66 | {name=>"SIG_DFL", value=>"(IV)SIG_DFL"}, |
67 | {name=>"SIG_ERR", value=>"(IV)SIG_ERR"}, |
68 | {name=>"SIG_IGN", value=>"(IV)SIG_IGN"}, |
69 | # L_tmpnam[e] was a typo--retained for compatibility |
70 | {name=>"L_tmpname", value=>"L_tmpnam"}, |
71 | {name=>"NULL", value=>"0"}, |
72 | {name=>"_POSIX_JOB_CONTROL", type=>"YES", default=>["IV", "0"]}, |
73 | {name=>"_POSIX_SAVED_IDS", type=>"YES", default=>["IV", "0"]}, |
64bb7586 |
74 | {name=>'FLT_ROUNDS', type=>"NV", not_constant=>1}, |
6800c0cf |
75 | {name=>"HUGE_VAL", type=>"NV", not_constant=>1, |
0552bf3a |
76 | macro=>[<<'END', "#endif\n"], |
77 | #if (defined(USE_LONG_DOUBLE) && defined(HUGE_VALL)) || defined(HUGE_VAL) |
78 | /* HUGE_VALL is admittedly non-POSIX but if we are using long doubles |
79 | * we might as well use long doubles. --jhi */ |
80 | END |
81 | value=>' |
82 | #if defined(USE_LONG_DOUBLE) && defined(HUGE_VALL) |
83 | HUGE_VALL |
84 | #else |
85 | HUGE_VAL |
86 | #endif |
87 | '}); |
88 | |
89 | push @names, {name=>$_, type=>"UV"} |
90 | foreach (qw(SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK SA_RESETHAND |
91 | SA_RESTART SA_SIGINFO UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX)); |
6800c0cf |
92 | push @names, {name=>$_, type=>"NV", not_constant=>1} |
93 | foreach (qw(LDBL_MAX LDBL_MIN LDBL_EPSILON)); |
94 | |
0552bf3a |
95 | push @names, {name=>$_, type=>"NV"} |
96 | foreach (qw(DBL_DIG DBL_EPSILON DBL_MANT_DIG DBL_MAX DBL_MAX_10_EXP |
97 | DBL_MAX_EXP DBL_MIN DBL_MIN_10_EXP DBL_MIN_EXP |
98 | FLT_DIG FLT_EPSILON FLT_MANT_DIG FLT_MAX FLT_MAX_10_EXP |
99 | FLT_MAX_EXP FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX |
6800c0cf |
100 | LDBL_DIG LDBL_MANT_DIG LDBL_MAX_10_EXP |
101 | LDBL_MAX_EXP LDBL_MIN_10_EXP LDBL_MIN_EXP)); |
0552bf3a |
102 | |
103 | push @names, {name=>$_, type=>"IV", default=>["IV", "0"]} |
104 | foreach (qw(_POSIX_ARG_MAX _POSIX_CHILD_MAX _POSIX_CHOWN_RESTRICTED |
105 | _POSIX_LINK_MAX _POSIX_MAX_CANON _POSIX_MAX_INPUT _POSIX_NAME_MAX |
106 | _POSIX_NGROUPS_MAX _POSIX_NO_TRUNC _POSIX_OPEN_MAX |
107 | _POSIX_PATH_MAX _POSIX_PIPE_BUF _POSIX_SSIZE_MAX |
108 | _POSIX_STREAM_MAX _POSIX_TZNAME_MAX _POSIX_VDISABLE _POSIX_VERSION |
109 | )); |
110 | |
111 | WriteConstants( |
64bb7586 |
112 | PROXYSUBS => 1, |
0552bf3a |
113 | NAME => 'POSIX', |
114 | NAMES => \@names, |
115 | ); |