-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.h.PL
125 lines (105 loc) · 2.61 KB
/
config.h.PL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
use strict;
eval { require warnings; };
use Config;
open(OUT, ">config.h") or die "Failed to open config.h for output";
print OUT <<"EOH";
/* This file has been autogenerated by config.h.PL. Any changes
* made to this file will be lost. Edit config.h.PL instead. */
#ifndef __TCPP_CONFIG_H__
#define __TCPP_CONFIG_H__
/* These control system.h */
EOH
print OUT "#define HAVE_FCNTL_H 1\n" if $Config{i_fcntl};
print OUT "#define HAVE_LIMITS_H 1\n" if $Config{i_limits};
print OUT "#define HAVE_MALLOC_H 1\n" if $Config{i_malloc};
print OUT "#define HAVE_STDDEF_H 1\n" if $Config{i_stddef};
print OUT "#define HAVE_STDLIB_H 1\n" if $Config{i_stdlib};
print OUT "#define HAVE_STRING_H 1\n" if $Config{i_string};
print OUT "#define HAVE_SYS_FILE_H 1\n" if $Config{i_sysfile};
print OUT "#define HAVE_SYS_PARAM_H 1\n" if $Config{i_sysparam};
print OUT "#define HAVE_SYS_STAT_H 1\n" if $Config{i_sysstat};
print OUT "#define HAVE_SYS_WAIT_H 1\n" if $Config{i_syswait};
print OUT "#define HAVE_UNISTD_H 1\n" if $Config{i_unistd};
if ($Config{i_systime} && $Config{i_time}) {
print OUT "#define TIME_WITH_SYS_TIME 1\n";
}
print OUT "#define HAVE_TIME_H 1\n" if $Config{i_time};
print OUT "#define HAVE_SYS_TIME_H 1\n" if $Config{i_systime};
# print OUT "#define HAVE_STRSIGNAL 1\n" if $Config{i_foo} eq 'define';
print OUT <<"EOF"
/* HAVE_DOS_BASED_FILE_SYSTEM */
#$Config{d_volatile} HAVE_VOLATILE
#include "global.h"
#endif
EOF
__END__
#if 0
HAVE__BOOL
HAVE_DECL_ABORT
HAVE_DECL_ATOF
HAVE_DECL_ATOL
HAVE_DECL_CALLOC
HAVE_DECL_ERRNO
HAVE_DECL_FPRINTF_UNLOCKED
HAVE_DECL_FPUTS_UNLOCKED
HAVE_DECL_FREE
HAVE_DECL_FWRITE_UNLOCKED
HAVE_DECL_GETCWD
HAVE_DECL_GETENV
HAVE_DECL_GETOPT
HAVE_DECL_GETRLIMIT
HAVE_DECL_GETWD
HAVE_DECL_MALLOC
HAVE_DECL_PUTC_UNLOCKED
HAVE_DECL_REALLOC
HAVE_DECL_SBRK
HAVE_DECL_SETRLIMIT
HAVE_DECL_STRSTR
HAVE_DESIGNATED_INITIALIZERS
HAVE_DOS_BASED_FILE_SYSTEM
HAVE_FCNTL_H
HAVE_FPRINTF_UNLOCKED
HAVE_FPUTC_UNLOCKED
HAVE_FPUTS_UNLOCKED
HAVE_FWRITE_UNLOCKED
HAVE_GETRLIMIT
HAVE_LIMITS_H
HAVE_MALLOC_H
HAVE_PRINTF_PTR
HAVE_PUTC_UNLOCKED
HAVE_SETRLIMIT
HAVE_STDBOOL_H
HAVE_STDDEF_H
HAVE_STDLIB_H
HAVE_STRING_H
HAVE_STRINGS_H
HAVE_STRSIGNAL
HAVE_SYS_FILE_H
HAVE_SYS_PARAM_H
HAVE_SYS_STAT_H
HAVE_SYS_TIME_H
HAVE_SYS_WAIT_H
HAVE_TIME_H
HAVE_UNISTD_H
HAVE_VOLATILE
#endif
# These have not been dealt with.
HAVE__BOOL
HAVE_DECL_ABORT
HAVE_DECL_ATOF
HAVE_DECL_ATOL
HAVE_DECL_CALLOC
HAVE_DECL_ERRNO
HAVE_DECL_FREE
HAVE_DECL_GETCWD
HAVE_DECL_GETENV
HAVE_DECL_GETOPT
HAVE_DECL_GETRLIMIT
HAVE_DECL_GETWD
HAVE_DECL_MALLOC
HAVE_DECL_REALLOC
HAVE_DECL_SBRK
HAVE_DECL_SETRLIMIT
HAVE_DECL_STRSTR
# Not provided by Perl
#$Config{i_strings} HAVE_STRINGS_H 1