annotate fixincludes/inclhack.def @ 116:367f9f4f266e

fix gimple.h
author mir3636
date Tue, 28 Nov 2017 20:22:01 +0900 (2017-11-28)
parents 04ced10e8804
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 /* -*- Mode: C -*- */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 autogen definitions fixincl;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 /* Define all the fixes we know about for repairing damaged headers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 Please see the README before adding or changing entries in this file.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 This is the sort command:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 blocksort output=inclhack.sorted \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 pattern='^/\*$' \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 trailer='^/\*EOF\*[/]' \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 input=inclhack.def \
111
kono
parents: 67
diff changeset
14 key=$'hackname[ \t]*=[ \t]*(.*);'
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 Set up a debug test so we can make the templates emit special
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 code while debugging these fixes: */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 #ifdef DEBUG
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 FIXINC_DEBUG = yes;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 /* On AIX when _LARGE_FILES is defined stdio.h defines fopen to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 * fopen64 etc. and this causes problems when building with g++
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 * because cstdio udefs everything from stdio.h, leaving us with
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 * ::fopen has not been declared errors. This fixes stdio.h to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 * undef those defines and use __asm__ to alias the symbols if
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 * building with g++ and -D_LARGE_FILES
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 hackname = AAB_aix_stdio;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 select = "define fopen fopen64";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 mach = "*-*-aix*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 test-text = ''; /* no way to test */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 c_fix = wrap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 c_fix_arg = "";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 c_fix_arg = <<- _EOArg_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 #if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 #define __need__aix_stdio_h_fix
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 #ifdef __need__aix_stdio_h_fix
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 #undef fseeko
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 #undef ftello
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 #undef fgetpos
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 #undef fsetpos
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 #undef fopen
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #undef freopen
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 /* Alias the symbols using asm */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 extern "C" {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 extern int fgetpos(FILE *, fpos64_t *) __asm__("fgetpos64");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 extern FILE *fopen(const char *, const char *) __asm__("fopen64");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 extern FILE *freopen(const char *, const char *, FILE *) __asm__("freopen64");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 extern int fseeko(FILE *, off64_t, int) __asm__("fseeko64");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 extern int fsetpos(FILE *, const fpos64_t *) __asm__("fsetpos64");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 extern off64_t ftello(FILE *) __asm__("ftello64");
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 _EOArg_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66
111
kono
parents: 67
diff changeset
67 /* On AIX when _LARGE_FILES is defined fcntl.h defines open to
kono
parents: 67
diff changeset
68 * open64 and creat to creat64. This fixes fcntl.h to
kono
parents: 67
diff changeset
69 * undef those defines and use __asm__ to alias the symbols if
kono
parents: 67
diff changeset
70 * building with g++ and -D_LARGE_FILES
kono
parents: 67
diff changeset
71 */
kono
parents: 67
diff changeset
72 fix = {
kono
parents: 67
diff changeset
73 hackname = AAB_aix_fcntl;
kono
parents: 67
diff changeset
74 files = fcntl.h;
kono
parents: 67
diff changeset
75 select = "define open[ \t]open64";
kono
parents: 67
diff changeset
76 mach = "*-*-aix*";
kono
parents: 67
diff changeset
77 test-text = ''; /* no way to test */
kono
parents: 67
diff changeset
78
kono
parents: 67
diff changeset
79 c_fix = wrap;
kono
parents: 67
diff changeset
80
kono
parents: 67
diff changeset
81 c_fix_arg = "";
kono
parents: 67
diff changeset
82
kono
parents: 67
diff changeset
83 c_fix_arg = <<- _EOArg_
kono
parents: 67
diff changeset
84
kono
parents: 67
diff changeset
85 #if defined __GNUG__ && defined _LARGE_FILES && defined __cplusplus
kono
parents: 67
diff changeset
86 #define __need__aix_fcntl_h_fix
kono
parents: 67
diff changeset
87 #ifdef __need__aix_fcntl_h_fix
kono
parents: 67
diff changeset
88 #undef open
kono
parents: 67
diff changeset
89 #undef creat
kono
parents: 67
diff changeset
90 #undef openat
kono
parents: 67
diff changeset
91 /* Alias the symbols using asm */
kono
parents: 67
diff changeset
92 extern "C" {
kono
parents: 67
diff changeset
93 extern int open(const char *, int, ...) __asm__("open64");
kono
parents: 67
diff changeset
94 extern int creat(const char *, mode_t) __asm__("creat64");
kono
parents: 67
diff changeset
95 #if (_XOPEN_SOURCE >= 700)
kono
parents: 67
diff changeset
96 extern int openat(int, const char *, int, ...) __asm__("open64at");
kono
parents: 67
diff changeset
97 #endif
kono
parents: 67
diff changeset
98 }
kono
parents: 67
diff changeset
99 #endif
kono
parents: 67
diff changeset
100 #endif
kono
parents: 67
diff changeset
101
kono
parents: 67
diff changeset
102 _EOArg_;
kono
parents: 67
diff changeset
103 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 * On Mac OS 10.3.9, the 'long double' functions are available in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 * libSystem, but are not prototyped in math.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 hackname = AAB_darwin7_9_long_double_funcs;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 mach = "*-*-darwin7.9*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 files = architecture/ppc/math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 bypass = "powl";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 replace = <<- _EndOfHeader_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 /* This file prototypes the long double functions available on Mac OS
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 10.3.9. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 #ifndef __MATH__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 # undef __APPLE_CC__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 # define __APPLE_CC__ 1345
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 # include_next <architecture/ppc/math.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 # undef __APPLE_CC__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 # define __APPLE_CC__ 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 # ifndef __LIBMLDBL_COMPAT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 # ifdef __LONG_DOUBLE_128__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 # define __LIBMLDBL_COMPAT(sym) __asm("_" #sym "$LDBL128")
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 # else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 # define __LIBMLDBL_COMPAT(sym)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 # endif /* __LONG_DOUBLE_128__ */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 # endif /* __LIBMLDBL_COMPAT */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 # ifdef __cplusplus
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 extern "C" {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 # endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 extern long double acosl( long double ) __LIBMLDBL_COMPAT(acosl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 extern long double asinl( long double ) __LIBMLDBL_COMPAT(asinl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 extern long double atanl( long double ) __LIBMLDBL_COMPAT(atanl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 extern long double atan2l( long double, long double ) __LIBMLDBL_COMPAT(atan2l);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 extern long double cosl( long double ) __LIBMLDBL_COMPAT(cosl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 extern long double sinl( long double ) __LIBMLDBL_COMPAT(sinl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 extern long double tanl( long double ) __LIBMLDBL_COMPAT(tanl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 extern long double acoshl( long double ) __LIBMLDBL_COMPAT(acoshl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 extern long double asinhl( long double ) __LIBMLDBL_COMPAT(asinhl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 extern long double atanhl( long double ) __LIBMLDBL_COMPAT(atanhl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 extern long double coshl( long double ) __LIBMLDBL_COMPAT(coshl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 extern long double sinhl( long double ) __LIBMLDBL_COMPAT(sinhl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 extern long double tanhl( long double ) __LIBMLDBL_COMPAT(tanhl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 extern long double expl( long double ) __LIBMLDBL_COMPAT(expl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 extern long double exp2l( long double ) __LIBMLDBL_COMPAT(exp2l);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 extern long double expm1l( long double ) __LIBMLDBL_COMPAT(expm1l);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 extern long double logl( long double ) __LIBMLDBL_COMPAT(logl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 extern long double log10l( long double ) __LIBMLDBL_COMPAT(log10l);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 extern long double log2l( long double ) __LIBMLDBL_COMPAT(log2l);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 extern long double log1pl( long double ) __LIBMLDBL_COMPAT(log1pl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 extern long double logbl( long double ) __LIBMLDBL_COMPAT(logbl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 extern long double modfl( long double, long double * ) __LIBMLDBL_COMPAT(modfl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 extern long double ldexpl( long double, int ) __LIBMLDBL_COMPAT(ldexpl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
156 extern long double frexpl( long double, int * ) __LIBMLDBL_COMPAT(frexpl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 extern int ilogbl( long double ) __LIBMLDBL_COMPAT(ilogbl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 extern long double scalbnl( long double, int ) __LIBMLDBL_COMPAT(scalbnl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 extern long double scalblnl( long double, long int ) __LIBMLDBL_COMPAT(scalblnl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 extern long double fabsl( long double ) __LIBMLDBL_COMPAT(fabsl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 extern long double cbrtl( long double ) __LIBMLDBL_COMPAT(cbrtl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 extern long double hypotl( long double, long double ) __LIBMLDBL_COMPAT(hypotl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 extern long double powl( long double, long double ) __LIBMLDBL_COMPAT(powl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 extern long double sqrtl( long double ) __LIBMLDBL_COMPAT(sqrtl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 extern long double erfl( long double ) __LIBMLDBL_COMPAT(erfl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 extern long double erfcl( long double ) __LIBMLDBL_COMPAT(erfcl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 extern long double lgammal( long double ) __LIBMLDBL_COMPAT(lgammal);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 extern long double tgammal( long double ) __LIBMLDBL_COMPAT(tgammal);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 extern long double ceill( long double ) __LIBMLDBL_COMPAT(ceill);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 extern long double floorl( long double ) __LIBMLDBL_COMPAT(floorl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 extern long double nearbyintl( long double ) __LIBMLDBL_COMPAT(nearbyintl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 extern long double rintl( long double ) __LIBMLDBL_COMPAT(rintl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 extern long int lrintl( long double ) __LIBMLDBL_COMPAT(lrintl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 extern long long int llrintl( long double ) __LIBMLDBL_COMPAT(llrintl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 extern long double roundl( long double ) __LIBMLDBL_COMPAT(roundl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 extern long int lroundl( long double ) __LIBMLDBL_COMPAT(lroundl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 extern long long int llroundl( long double ) __LIBMLDBL_COMPAT(llroundl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 extern long double truncl( long double ) __LIBMLDBL_COMPAT(truncl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 extern long double fmodl( long double, long double) __LIBMLDBL_COMPAT(fmodl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 extern long double remainderl( long double, long double ) __LIBMLDBL_COMPAT(remainderl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 extern long double remquol( long double, long double, int * ) __LIBMLDBL_COMPAT(remquol);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
182 extern long double copysignl( long double, long double ) __LIBMLDBL_COMPAT(copysignl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 extern long double nanl( const char * ) __LIBMLDBL_COMPAT(nanl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 extern long double nextafterl( long double, long double ) __LIBMLDBL_COMPAT(nextafterl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 extern long double nexttowardl( long double, long double ) __LIBMLDBL_COMPAT(nexttowardl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 extern long double fdiml( long double, long double ) __LIBMLDBL_COMPAT(fdiml);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 extern long double fmaxl( long double, long double ) __LIBMLDBL_COMPAT(fmaxl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 extern long double fminl( long double, long double ) __LIBMLDBL_COMPAT(fminl);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 extern long double fmal( long double, long double, long double ) __LIBMLDBL_COMPAT(fmal);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 # ifdef __cplusplus
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 # endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 #endif /* __MATH__ */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
194 _EndOfHeader_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
196
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
198 * This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 hackname = AAB_fd_zero_asm_posix_types_h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 files = asm/posix_types.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 mach = 'i[34567]86-*-linux*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 bypass = '} while';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 bypass = 'x86_64';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
206 bypass = 'posix_types_64';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
207
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 * Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 * the start, so that if #include_next gets another instance of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 * the wrapper, this will follow the #include_next chain until
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
212 * we arrive at the real <asm/posix_types.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 replace = <<- _EndOfHeader_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
215 /* This file fixes a bug in the __FD_ZERO macro
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
216 for older versions of the Linux kernel. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 #ifndef _POSIX_TYPES_H_WRAPPER
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 #include <features.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
219 #include_next <asm/posix_types.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
220
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 #if defined(__FD_ZERO) && !defined(__GLIBC__)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 #undef __FD_ZERO
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 #define __FD_ZERO(fdsetp) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 int __d0, __d1; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 __asm__ __volatile__("cld ; rep ; stosl" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 : "=&c" (__d0), "=&D" (__d1) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 : "a" (0), "0" (__FDSET_LONGS), \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 "1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
232
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 #define _POSIX_TYPES_H_WRAPPER
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 #endif /* _POSIX_TYPES_H_WRAPPER */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 _EndOfHeader_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
237
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 * This fixes __FD_ZERO bug for glibc-1.x
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
240 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
241 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
242 hackname = AAB_fd_zero_gnu_types_h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
243 files = gnu/types.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
244 mach = 'i[34567]86-*-linux*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
245
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
246 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
247 * Define _TYPES_H_WRAPPER at the end of the wrapper, not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
248 * the start, so that if #include_next gets another instance of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
249 * the wrapper, this will follow the #include_next chain until
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
250 * we arrive at the real <gnu/types.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
251 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252 replace = <<- _EndOfHeader_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
253 /* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
254 #ifndef _TYPES_H_WRAPPER
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
255 #include <features.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
256 #include_next <gnu/types.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
257
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
258 #if defined(__FD_ZERO) && !defined(__GLIBC__)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
259 #undef __FD_ZERO
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
260 # define __FD_ZERO(fdsetp) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
261 do { \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
262 int __d0, __d1; \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
263 __asm__ __volatile__("cld ; rep ; stosl" \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
264 : "=&c" (__d0), "=&D" (__d1) \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
265 : "a" (0), "0" (__FDSET_LONGS), \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266 "1" ((__fd_set *) (fdsetp)) :"memory"); \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
269
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 #define _TYPES_H_WRAPPER
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 #endif /* _TYPES_H_WRAPPER */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
272 _EndOfHeader_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276 * This fixes __FD_ZERO bug for glibc-2.0.x
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 hackname = AAB_fd_zero_selectbits_h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 files = selectbits.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 mach = 'i[34567]86-*-linux*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 * Define _SELECTBITS_H_WRAPPER at the end of the wrapper, not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 * the start, so that if #include_next gets another instance of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
286 * the wrapper, this will follow the #include_next chain until
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 * we arrive at the real <selectbits.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 replace = <<- _EndOfHeader_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 /* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 #ifndef _SELECTBITS_H_WRAPPER
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 #include <features.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 #include_next <selectbits.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
294
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
295 #if defined(__FD_ZERO) && defined(__GLIBC__) \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
296 && defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
297 && __GLIBC_MINOR__ == 0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 #undef __FD_ZERO
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
299 #define __FD_ZERO(fdsetp) \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
300 do { \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
301 int __d0, __d1; \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 __asm__ __volatile__ ("cld; rep; stosl" \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303 : "=&c" (__d0), "=&D" (__d1) \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 : "a" (0), "0" (sizeof (__fd_set) \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 / sizeof (__fd_mask)), \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
306 "1" ((__fd_mask *) (fdsetp)) \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
307 : "memory"); \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
308 } while (0)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
310
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
311 #define _SELECTBITS_H_WRAPPER
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
312 #endif /* _SELECTBITS_H_WRAPPER */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
313 _EndOfHeader_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
314 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
315
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
316 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
317 * Solaris <sys/varargs.h> is a DDK (aka kernel-land) header providing
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
318 * the same interface as <stdarg.h>. No idea why they couldn't have just
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
319 * used the standard header.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
320 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
321 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
322 hackname = AAB_solaris_sys_varargs_h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
323 files = "sys/varargs.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
324 mach = '*-*-solaris*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
325 replace = <<- _EndOfHeader_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
326 #ifdef __STDC__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
327 #include <stdarg.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
328 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
329 #include <varargs.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
330 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
331 _EndOfHeader_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
332 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
333
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
334 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
335 * Fix non-ANSI memcpy declaration that conflicts with gcc's builtin
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
336 * declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
337 * many other systems have similar text but correct versions of the file.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
338 * To ensure only Sun's is fixed, we grep for a likely unique string.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
339 * Fix also on sysV68 R3V7.1 (head/memory.h\t50.1\t )
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
340 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
341 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
342 hackname = AAB_sun_memcpy;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
343 files = memory.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
344 select = "/\\*\t@\\(#\\)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
345 "(head/memory.h\t50.1\t "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
346 "|memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2\t)\\*/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
347
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
348 replace = <<- _EndOfHeader_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
349 /* This file was generated by fixincludes */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
350 #ifndef __memory_h__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
351 #define __memory_h__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
352
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
353 #ifdef __STDC__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
354 extern void *memccpy();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
355 extern void *memchr();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
356 extern void *memcpy();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
357 extern void *memset();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
358 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
359 extern char *memccpy();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
360 extern char *memchr();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
361 extern char *memcpy();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
362 extern char *memset();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
363 #endif /* __STDC__ */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
364
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
365 extern int memcmp();
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
366
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
367 #endif /* __memory_h__ */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
368 _EndOfHeader_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
369 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
370
111
kono
parents: 67
diff changeset
371 /*
kono
parents: 67
diff changeset
372 * Fix assert.h on VxWorks:
kono
parents: 67
diff changeset
373 */
kono
parents: 67
diff changeset
374 fix = {
kono
parents: 67
diff changeset
375 hackname = AAB_vxworks_assert;
kono
parents: 67
diff changeset
376 files = assert.h;
kono
parents: 67
diff changeset
377 mach = "*-*-vxworks*";
kono
parents: 67
diff changeset
378
kono
parents: 67
diff changeset
379 replace = <<- _EndOfHeader_
kono
parents: 67
diff changeset
380 #ifndef _ASSERT_H
kono
parents: 67
diff changeset
381 #define _ASSERT_H
kono
parents: 67
diff changeset
382
kono
parents: 67
diff changeset
383 #ifdef assert
kono
parents: 67
diff changeset
384 #undef assert
kono
parents: 67
diff changeset
385 #endif
kono
parents: 67
diff changeset
386
kono
parents: 67
diff changeset
387 #if defined(__STDC__) || defined(__cplusplus)
kono
parents: 67
diff changeset
388 extern void __assert (const char*);
kono
parents: 67
diff changeset
389 #else
kono
parents: 67
diff changeset
390 extern void __assert ();
kono
parents: 67
diff changeset
391 #endif
kono
parents: 67
diff changeset
392
kono
parents: 67
diff changeset
393 #ifdef NDEBUG
kono
parents: 67
diff changeset
394 #define assert(ign) ((void)0)
kono
parents: 67
diff changeset
395 #else
kono
parents: 67
diff changeset
396
kono
parents: 67
diff changeset
397 #define ASSERT_STRINGIFY(str) ASSERT_STRINGIFY_HELPER(str)
kono
parents: 67
diff changeset
398 #define ASSERT_STRINGIFY_HELPER(str) #str
kono
parents: 67
diff changeset
399
kono
parents: 67
diff changeset
400 #define assert(test) ((void) \
kono
parents: 67
diff changeset
401 ((test) ? ((void)0) : \
kono
parents: 67
diff changeset
402 __assert("Assertion failed: " ASSERT_STRINGIFY(test) ", file " \
kono
parents: 67
diff changeset
403 __FILE__ ", line " ASSERT_STRINGIFY(__LINE__) "\n")))
kono
parents: 67
diff changeset
404
kono
parents: 67
diff changeset
405 #endif
kono
parents: 67
diff changeset
406
kono
parents: 67
diff changeset
407 #endif
kono
parents: 67
diff changeset
408 _EndOfHeader_;
kono
parents: 67
diff changeset
409 };
kono
parents: 67
diff changeset
410
kono
parents: 67
diff changeset
411 /*
kono
parents: 67
diff changeset
412 * Add needed include to regs.h (NOT the gcc header) on VxWorks
kono
parents: 67
diff changeset
413 */
kono
parents: 67
diff changeset
414
kono
parents: 67
diff changeset
415 fix = {
kono
parents: 67
diff changeset
416 hackname = AAB_vxworks_regs_vxtypes;
kono
parents: 67
diff changeset
417 files = regs.h;
kono
parents: 67
diff changeset
418 mach = "*-*-vxworks*";
kono
parents: 67
diff changeset
419
kono
parents: 67
diff changeset
420 replace = <<- _EndOfHeader_
kono
parents: 67
diff changeset
421 #ifndef _REGS_H
kono
parents: 67
diff changeset
422 #define _REGS_H
kono
parents: 67
diff changeset
423 #include <types/vxTypesOld.h>
kono
parents: 67
diff changeset
424 #include_next <arch/../regs.h>
kono
parents: 67
diff changeset
425 #endif
kono
parents: 67
diff changeset
426 _EndOfHeader_;
kono
parents: 67
diff changeset
427 };
kono
parents: 67
diff changeset
428
kono
parents: 67
diff changeset
429 /*
kono
parents: 67
diff changeset
430 * This hack makes makes unistd.h more POSIX-compliant on VxWorks
kono
parents: 67
diff changeset
431 */
kono
parents: 67
diff changeset
432 fix = {
kono
parents: 67
diff changeset
433 hackname = AAB_vxworks_unistd;
kono
parents: 67
diff changeset
434 files = unistd.h;
kono
parents: 67
diff changeset
435 mach = "*-*-vxworks*";
kono
parents: 67
diff changeset
436
kono
parents: 67
diff changeset
437 replace = <<- _EndOfHeader_
kono
parents: 67
diff changeset
438 #ifndef _UNISTD_H
kono
parents: 67
diff changeset
439 #define _UNISTD_H
kono
parents: 67
diff changeset
440 #include_next <unistd.h>
kono
parents: 67
diff changeset
441 #include <ioLib.h>
kono
parents: 67
diff changeset
442 #ifndef STDIN_FILENO
kono
parents: 67
diff changeset
443 #define STDIN_FILENO 0
kono
parents: 67
diff changeset
444 #endif
kono
parents: 67
diff changeset
445 #ifndef STDOUT_FILENO
kono
parents: 67
diff changeset
446 #define STDOUT_FILENO 1
kono
parents: 67
diff changeset
447 #endif
kono
parents: 67
diff changeset
448 #ifndef STDERR_FILENO
kono
parents: 67
diff changeset
449 #define STDERR_FILENO 2
kono
parents: 67
diff changeset
450 #endif
kono
parents: 67
diff changeset
451 #endif /* _UNISTD_H */
kono
parents: 67
diff changeset
452 _EndOfHeader_;
kono
parents: 67
diff changeset
453 };
kono
parents: 67
diff changeset
454
kono
parents: 67
diff changeset
455 /*
kono
parents: 67
diff changeset
456 * assert.h on AIX 7 redefines static_assert as _Static_assert without
kono
parents: 67
diff changeset
457 * protecting C++.
kono
parents: 67
diff changeset
458 */
kono
parents: 67
diff changeset
459 fix = {
kono
parents: 67
diff changeset
460 hackname = aix_assert;
kono
parents: 67
diff changeset
461 mach = "*-*-aix*";
kono
parents: 67
diff changeset
462 files = assert.h;
kono
parents: 67
diff changeset
463 select = "#define[ \t]static_assert[ \t]_Static_assert";
kono
parents: 67
diff changeset
464 c_fix = format;
kono
parents: 67
diff changeset
465 c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
kono
parents: 67
diff changeset
466 test_text = "#define static_assert _Static_assert";
kono
parents: 67
diff changeset
467 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
468
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
469 /*
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
470 * complex.h on AIX 5 and AIX 6 define _Complex_I and I in terms of __I,
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
471 * which only is provided by AIX xlc C99.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
472 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
473 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
474 hackname = aix_complex;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
475 mach = "*-*-aix*";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
476 files = complex.h;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
477 select = "#define[ \t]_Complex_I[ \t]__I";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
478 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
479 c_fix_arg = "#define _Complex_I (__extension__ 1.0iF)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
480 test_text = "#define _Complex_I __I\n";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
481 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
482
111
kono
parents: 67
diff changeset
483 /*
kono
parents: 67
diff changeset
484 * On AIX some headers are not properly guarded by 'extern "C"'.
kono
parents: 67
diff changeset
485 */
kono
parents: 67
diff changeset
486 fix = {
kono
parents: 67
diff changeset
487 hackname = aix_externc;
kono
parents: 67
diff changeset
488 mach = "*-*-aix*";
kono
parents: 67
diff changeset
489 files = ctype.h;
kono
parents: 67
diff changeset
490 files = fcntl.h;
kono
parents: 67
diff changeset
491 files = langinfo.h;
kono
parents: 67
diff changeset
492 files = ldfcn.h;
kono
parents: 67
diff changeset
493 files = sys/localedef.h;
kono
parents: 67
diff changeset
494 files = sys/times.h;
kono
parents: 67
diff changeset
495 bypass = "extern \"C\"";
kono
parents: 67
diff changeset
496 c_fix = wrap;
kono
parents: 67
diff changeset
497 c_fix_arg = "#ifdef __cplusplus\n"
kono
parents: 67
diff changeset
498 "extern \"C\" {\n"
kono
parents: 67
diff changeset
499 "#endif\n";
kono
parents: 67
diff changeset
500 c_fix_arg = "#ifdef __cplusplus\n"
kono
parents: 67
diff changeset
501 "}\n"
kono
parents: 67
diff changeset
502 "#endif\n";
kono
parents: 67
diff changeset
503 test_text = "extern int __n_pthreads;\n";
kono
parents: 67
diff changeset
504 };
kono
parents: 67
diff changeset
505
kono
parents: 67
diff changeset
506 /*
kono
parents: 67
diff changeset
507 * On AIX sys/socket.h assumes C++.
kono
parents: 67
diff changeset
508 */
kono
parents: 67
diff changeset
509 fix = {
kono
parents: 67
diff changeset
510 hackname = aix_externcpp1;
kono
parents: 67
diff changeset
511 mach = "*-*-aix*";
kono
parents: 67
diff changeset
512 files = "sys/socket.h";
kono
parents: 67
diff changeset
513 select = "#ifdef __cplusplus";
kono
parents: 67
diff changeset
514 c_fix = format;
kono
parents: 67
diff changeset
515 c_fix_arg = "#ifdef __cplusplus\n"
kono
parents: 67
diff changeset
516 "extern \"C++\" {";
kono
parents: 67
diff changeset
517 test_text = "#ifdef __cplusplus";
kono
parents: 67
diff changeset
518
kono
parents: 67
diff changeset
519 };
kono
parents: 67
diff changeset
520
kono
parents: 67
diff changeset
521 fix = {
kono
parents: 67
diff changeset
522 hackname = aix_externcpp2;
kono
parents: 67
diff changeset
523 mach = "*-*-aix*";
kono
parents: 67
diff changeset
524 files = "sys/socket.h";
kono
parents: 67
diff changeset
525 select = "#else /\\* __cplusplus \\*/";
kono
parents: 67
diff changeset
526 c_fix = format;
kono
parents: 67
diff changeset
527 c_fix_arg = "} /* extern \"C++\" */\n"
kono
parents: 67
diff changeset
528 "#else /* __cplusplus */";
kono
parents: 67
diff changeset
529 test_text = "#else /* __cplusplus */";
kono
parents: 67
diff changeset
530
kono
parents: 67
diff changeset
531 };
kono
parents: 67
diff changeset
532
kono
parents: 67
diff changeset
533 /*
kono
parents: 67
diff changeset
534 * malloc.h on AIX6 uses XLC++ specific builtin syntax
kono
parents: 67
diff changeset
535 */
kono
parents: 67
diff changeset
536 fix = {
kono
parents: 67
diff changeset
537 hackname = aix_malloc;
kono
parents: 67
diff changeset
538 mach = "*-*-aix*";
kono
parents: 67
diff changeset
539 files = "malloc.h";
kono
parents: 67
diff changeset
540 select = "#ifdef __cplusplus";
kono
parents: 67
diff changeset
541 c_fix = format;
kono
parents: 67
diff changeset
542 c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))";
kono
parents: 67
diff changeset
543 test_text = "#ifdef __cplusplus";
kono
parents: 67
diff changeset
544 };
kono
parents: 67
diff changeset
545
kono
parents: 67
diff changeset
546 /*
kono
parents: 67
diff changeset
547 * net/if_arp.h defines a variable fc_softc instead of adding a
kono
parents: 67
diff changeset
548 * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1
kono
parents: 67
diff changeset
549 */
kono
parents: 67
diff changeset
550 fix = {
kono
parents: 67
diff changeset
551 hackname = aix_net_if_arp;
kono
parents: 67
diff changeset
552 mach = "*-*-aix*";
kono
parents: 67
diff changeset
553 files = "net/if_arp.h";
kono
parents: 67
diff changeset
554 select = "^struct fc_softc \\{";
kono
parents: 67
diff changeset
555 c_fix = format;
kono
parents: 67
diff changeset
556 c_fix_arg = "typedef struct _fc_softc {";
kono
parents: 67
diff changeset
557 test_text = "struct fc_softc {\n int a;\n};";
kono
parents: 67
diff changeset
558 };
kono
parents: 67
diff changeset
559
kono
parents: 67
diff changeset
560 /*
kono
parents: 67
diff changeset
561 * Fix AIX definition of NULL for G++.
kono
parents: 67
diff changeset
562 */
kono
parents: 67
diff changeset
563 fix = {
kono
parents: 67
diff changeset
564 hackname = aix_null;
kono
parents: 67
diff changeset
565 mach = "*-*-aix*";
kono
parents: 67
diff changeset
566 files = curses.h, dbm.h, locale.h, stdio.h, stdlib.h, string.h,
kono
parents: 67
diff changeset
567 time.h, unistd.h, wchar.h, sys/dir.h, sys/param.h, sys/types.h;
kono
parents: 67
diff changeset
568 bypass = __null;
kono
parents: 67
diff changeset
569 select = "#define[ \t]+NULL[ \t]+\\(*0L*\\)*";
kono
parents: 67
diff changeset
570 c_fix = format;
kono
parents: 67
diff changeset
571 c_fix_arg = <<- _EOFix_
kono
parents: 67
diff changeset
572 #ifndef NULL
kono
parents: 67
diff changeset
573 #ifdef __cplusplus
kono
parents: 67
diff changeset
574 #ifdef __GNUG__
kono
parents: 67
diff changeset
575 #define NULL __null
kono
parents: 67
diff changeset
576 #else /* ! __GNUG__ */
kono
parents: 67
diff changeset
577 #define NULL 0L
kono
parents: 67
diff changeset
578 #endif /* __GNUG__ */
kono
parents: 67
diff changeset
579 #else /* ! __cplusplus */
kono
parents: 67
diff changeset
580 #define NULL ((void *)0)
kono
parents: 67
diff changeset
581 #endif /* __cplusplus */
kono
parents: 67
diff changeset
582 #endif /* !NULL */
kono
parents: 67
diff changeset
583 _EOFix_;
kono
parents: 67
diff changeset
584 test_text = "# define\tNULL \t(0L) /* typed NULL */";
kono
parents: 67
diff changeset
585 };
kono
parents: 67
diff changeset
586
kono
parents: 67
diff changeset
587 /*
kono
parents: 67
diff changeset
588 * pthread.h on AIX defines PTHREAD_ONCE_INIT, PTHREAD_MUTEX_INITIALIZER,
kono
parents: 67
diff changeset
589 * PTHREAD_COND_INITIALIZER and PTHREAD_RWLOCK_INITIALIZER without enough
kono
parents: 67
diff changeset
590 * braces.
kono
parents: 67
diff changeset
591 */
kono
parents: 67
diff changeset
592 fix = {
kono
parents: 67
diff changeset
593 hackname = aix_once_init_1;
kono
parents: 67
diff changeset
594 mach = "*-*-aix*";
kono
parents: 67
diff changeset
595 files = "pthread.h";
kono
parents: 67
diff changeset
596 select = "#define[ \t]PTHREAD_ONCE_INIT \\\\\n"
kono
parents: 67
diff changeset
597 "\\{ \\\\\n";
kono
parents: 67
diff changeset
598 c_fix = format;
kono
parents: 67
diff changeset
599 c_fix_arg = "#define PTHREAD_ONCE_INIT \\\n"
kono
parents: 67
diff changeset
600 "{{ \\\n";
kono
parents: 67
diff changeset
601 test_text = "#define PTHREAD_ONCE_INIT \\\\\n"
kono
parents: 67
diff changeset
602 "{ \\\\\n";
kono
parents: 67
diff changeset
603 };
kono
parents: 67
diff changeset
604
kono
parents: 67
diff changeset
605 fix = {
kono
parents: 67
diff changeset
606 hackname = aix_once_init_2;
kono
parents: 67
diff changeset
607 mach = "*-*-aix*";
kono
parents: 67
diff changeset
608 files = "pthread.h";
kono
parents: 67
diff changeset
609 select = "[ \t]0 \\\\\n"
kono
parents: 67
diff changeset
610 "\\}\n";
kono
parents: 67
diff changeset
611 c_fix = format;
kono
parents: 67
diff changeset
612 c_fix_arg = " 0 \\\n"
kono
parents: 67
diff changeset
613 "}}\n";
kono
parents: 67
diff changeset
614 test_text = " 0 \\\\\n"
kono
parents: 67
diff changeset
615 "}\n";
kono
parents: 67
diff changeset
616 };
kono
parents: 67
diff changeset
617
kono
parents: 67
diff changeset
618 fix = {
kono
parents: 67
diff changeset
619 hackname = aix_mutex_initializer_1;
kono
parents: 67
diff changeset
620 mach = "*-*-aix*";
kono
parents: 67
diff changeset
621 files = "pthread.h";
kono
parents: 67
diff changeset
622 select = "#define[ \t]PTHREAD_MUTEX_INITIALIZER \\\\\n"
kono
parents: 67
diff changeset
623 "\\{ \\\\\n";
kono
parents: 67
diff changeset
624 c_fix = format;
kono
parents: 67
diff changeset
625 c_fix_arg = "#define PTHREAD_MUTEX_INITIALIZER \\\n"
kono
parents: 67
diff changeset
626 "{{ \\\n";
kono
parents: 67
diff changeset
627 test_text = "#define PTHREAD_MUTEX_INITIALIZER \\\\\n"
kono
parents: 67
diff changeset
628 "{ \\\\\n";
kono
parents: 67
diff changeset
629 };
kono
parents: 67
diff changeset
630
kono
parents: 67
diff changeset
631 fix = {
kono
parents: 67
diff changeset
632 hackname = aix_cond_initializer_1;
kono
parents: 67
diff changeset
633 mach = "*-*-aix*";
kono
parents: 67
diff changeset
634 files = "pthread.h";
kono
parents: 67
diff changeset
635 select = "#define[ \t]PTHREAD_COND_INITIALIZER \\\\\n"
kono
parents: 67
diff changeset
636 "\\{ \\\\\n";
kono
parents: 67
diff changeset
637 c_fix = format;
kono
parents: 67
diff changeset
638 c_fix_arg = "#define PTHREAD_COND_INITIALIZER \\\n"
kono
parents: 67
diff changeset
639 "{{ \\\n";
kono
parents: 67
diff changeset
640 test_text = "#define PTHREAD_COND_INITIALIZER \\\\\n"
kono
parents: 67
diff changeset
641 "{ \\\\\n";
kono
parents: 67
diff changeset
642 };
kono
parents: 67
diff changeset
643
kono
parents: 67
diff changeset
644 fix = {
kono
parents: 67
diff changeset
645 hackname = aix_rwlock_initializer_1;
kono
parents: 67
diff changeset
646 mach = "*-*-aix*";
kono
parents: 67
diff changeset
647 files = "pthread.h";
kono
parents: 67
diff changeset
648 select = "#define[ \t]PTHREAD_RWLOCK_INITIALIZER \\\\\n"
kono
parents: 67
diff changeset
649 "\\{ \\\\\n";
kono
parents: 67
diff changeset
650 c_fix = format;
kono
parents: 67
diff changeset
651 c_fix_arg = "#define PTHREAD_RWLOCK_INITIALIZER \\\n"
kono
parents: 67
diff changeset
652 "{{ \\\n";
kono
parents: 67
diff changeset
653 test_text = "#define PTHREAD_RWLOCK_INITIALIZER \\\\\n"
kono
parents: 67
diff changeset
654 "{ \\\\\n";
kono
parents: 67
diff changeset
655 };
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
656
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
657 /*
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
658 * pthread.h on AIX 4.3.3 tries to define a macro without whitspace
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
659 * which violates a requirement of ISO C.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
660 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
661 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
662 hackname = aix_pthread;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
663 files = "pthread.h";
111
kono
parents: 67
diff changeset
664 select = "(#define[\t ][A-Za-z_0-9]+)(\\\\\n[^A-Za-z_0-9 \t\n(])";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
665 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
666 c_fix_arg = "%1 %2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
667 test_text = "#define PTHREAD_MUTEX_INITIALIZER\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
668 "{...init stuff...}";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
669 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
670
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
671 /*
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
672 * AIX stdint.h fixes.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
673 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
674 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
675 hackname = aix_stdint_1;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
676 mach = "*-*-aix*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
677 files = stdint-aix.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
678 select = "#define[ \t]UINT8_MAX[ \t]\\(255U\\)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
679 "#define[ \t]UINT16_MAX[ \t]\\(65535U\\)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
680 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
681 c_fix_arg = "#define UINT8_MAX (255)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
682 "#define UINT16_MAX (65535)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
683 test_text = "#define UINT8_MAX (255U)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
684 "#define UINT16_MAX (65535U)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
685 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
686
111
kono
parents: 67
diff changeset
687 /*
kono
parents: 67
diff changeset
688 * aix_stdint_2
kono
parents: 67
diff changeset
689 */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
690 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
691 hackname = aix_stdint_2;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
692 mach = "*-*-aix*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
693 files = stdint-aix.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
694 select = "#define[ \t]INTPTR_MIN[ \t]INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
695 "#define[ \t]INTPTR_MAX[ \t]INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
696 "#define[ \t]UINTPTR_MAX[ \t]UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
697 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
698 "#define[ \t]INTPTR_MIN[ \t]INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
699 "#define[ \t]INTPTR_MAX[ \t]INT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
700 "#define[ \t]UINTPTR_MAX[ \t]UINT32_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
701 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
702 c_fix_arg = "#define INTPTR_MIN (-INTPTR_MAX-1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
703 "#define INTPTR_MAX 9223372036854775807L\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
704 "#define UINTPTR_MAX 18446744073709551615UL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
705 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
706 "#define INTPTR_MIN (-INTPTR_MAX-1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
707 "#define INTPTR_MAX 2147483647L\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
708 "#define UINTPTR_MAX 4294967295UL";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
709 test_text = "#define INTPTR_MIN INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
710 "#define INTPTR_MAX INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
711 "#define UINTPTR_MAX UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
712 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
713 "#define INTPTR_MIN INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
714 "#define INTPTR_MAX INT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
715 "#define UINTPTR_MAX UINT32_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
716 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
717
111
kono
parents: 67
diff changeset
718 /*
kono
parents: 67
diff changeset
719 * aix_stdint_3
kono
parents: 67
diff changeset
720 */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
721 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
722 hackname = aix_stdint_3;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
723 mach = "*-*-aix*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
724 files = stdint-aix.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
725 select = "#define[ \t]PTRDIFF_MIN[ \t]INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
726 "#define[ \t]PTRDIFF_MAX[ \t]INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
727 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
728 "#define[ \t]PTRDIFF_MIN[ \t]*INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
729 "#define[ \t]PTRDIFF_MAX[ \t]*INT32_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
730 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
731 c_fix_arg = "#define PTRDIFF_MIN (-9223372036854775807L - 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
732 "#define PTRDIFF_MAX 9223372036854775807L\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
733 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
734 "#define PTRDIFF_MIN (-2147483647L - 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
735 "#define PTRDIFF_MAX 2147483647L";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
736 test_text = "#define PTRDIFF_MIN INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
737 "#define PTRDIFF_MAX INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
738 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
739 "#define PTRDIFF_MIN INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
740 "#define PTRDIFF_MAX INT32_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
741 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
742
111
kono
parents: 67
diff changeset
743 /*
kono
parents: 67
diff changeset
744 * aix_stdint_4
kono
parents: 67
diff changeset
745 */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
746 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
747 hackname = aix_stdint_4;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
748 mach = "*-*-aix*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
749 files = stdint-aix.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
750 select = "#define[ \t]SIZE_MAX[ \t]UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
751 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
752 "#define[ \t]SIZE_MAX[ \t]*UINT32_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
753 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
754 c_fix_arg = "#define SIZE_MAX 18446744073709551615UL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
755 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
756 "#define SIZE_MAX 4294967295UL";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
757 test_text = "#define SIZE_MAX UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
758 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
759 "#define SIZE_MAX UINT32_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
760 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
761
111
kono
parents: 67
diff changeset
762 /*
kono
parents: 67
diff changeset
763 * aix_stdint_5
kono
parents: 67
diff changeset
764 */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
765 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
766 hackname = aix_stdint_5;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
767 mach = "*-*-aix*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
768 files = stdint-aix.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
769 select = "#define[ \t]UINT8_C\\(c\\)[ \t]__CONCAT__\\(c,U\\)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
770 "#define[ \t]UINT16_C\\(c\\)[ \t]__CONCAT__\\(c,U\\)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
771 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
772 c_fix_arg = "#define UINT8_C(c) c\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
773 "#define UINT16_C(c) c";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
774 test_text = "#define UINT8_C(c) __CONCAT__(c,U)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
775 "#define UINT16_C(c) __CONCAT__(c,U)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
776 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
777
111
kono
parents: 67
diff changeset
778 /*
kono
parents: 67
diff changeset
779 * stdio.h on AIX defines ferror, clearerr and feof as C++ inline, which
kono
parents: 67
diff changeset
780 produces wrong code with G++.
kono
parents: 67
diff changeset
781 */
kono
parents: 67
diff changeset
782 fix = {
kono
parents: 67
diff changeset
783 hackname = aix_stdio_inline;
kono
parents: 67
diff changeset
784 mach = "*-*-aix*";
kono
parents: 67
diff changeset
785 files = stdio.h;
kono
parents: 67
diff changeset
786 select = "#ifdef __cplusplus\\\n"
kono
parents: 67
diff changeset
787 "}\\\n\\\n"
kono
parents: 67
diff changeset
788 "#ifdef ferror\\\n";
kono
parents: 67
diff changeset
789 c_fix = format;
kono
parents: 67
diff changeset
790 c_fix_arg = "#ifdef __cplusplus\n"
kono
parents: 67
diff changeset
791 "}\n"
kono
parents: 67
diff changeset
792 "#endif\n\n"
kono
parents: 67
diff changeset
793 "#if (defined(__cplusplus) && defined(__IBMCPP__))\n"
kono
parents: 67
diff changeset
794 "#ifdef ferror\n";
kono
parents: 67
diff changeset
795 test_text = "#ifdef __cplusplus\n}\n\n#ifdef ferror";
kono
parents: 67
diff changeset
796 };
kono
parents: 67
diff changeset
797
kono
parents: 67
diff changeset
798 /*
kono
parents: 67
diff changeset
799 * stdlib.h on AIX uses #define on malloc and friends.
kono
parents: 67
diff changeset
800 */
kono
parents: 67
diff changeset
801 fix = {
kono
parents: 67
diff changeset
802 hackname = aix_stdlib_malloc;
kono
parents: 67
diff changeset
803 mach = "*-*-aix*";
kono
parents: 67
diff changeset
804 files = stdlib.h;
kono
parents: 67
diff changeset
805 select = "#define[ \t]+malloc[ \t]+__linux_malloc";
kono
parents: 67
diff changeset
806 c_fix = format;
kono
parents: 67
diff changeset
807 c_fix_arg = "extern void *malloc(size_t) __asm__(\"__linux_malloc\");";
kono
parents: 67
diff changeset
808 test_text = "#define malloc __linux_malloc";
kono
parents: 67
diff changeset
809 };
kono
parents: 67
diff changeset
810
kono
parents: 67
diff changeset
811 fix = {
kono
parents: 67
diff changeset
812 hackname = aix_stdlib_realloc;
kono
parents: 67
diff changeset
813 mach = "*-*-aix*";
kono
parents: 67
diff changeset
814 files = stdlib.h;
kono
parents: 67
diff changeset
815 select = "#define[ \t]+realloc[ \t]+__linux_realloc";
kono
parents: 67
diff changeset
816 c_fix = format;
kono
parents: 67
diff changeset
817 c_fix_arg = "extern void *realloc(void *, size_t) __asm__(\"__linux_realloc\");";
kono
parents: 67
diff changeset
818 test_text = "#define realloc __linux_realloc";
kono
parents: 67
diff changeset
819 };
kono
parents: 67
diff changeset
820
kono
parents: 67
diff changeset
821 fix = {
kono
parents: 67
diff changeset
822 hackname = aix_stdlib_calloc;
kono
parents: 67
diff changeset
823 mach = "*-*-aix*";
kono
parents: 67
diff changeset
824 files = stdlib.h;
kono
parents: 67
diff changeset
825 select = "#define[ \t]+calloc[ \t]+__linux_calloc";
kono
parents: 67
diff changeset
826 c_fix = format;
kono
parents: 67
diff changeset
827 c_fix_arg = "extern void *calloc(size_t, size_t) __asm__(\"__linux_calloc\");";
kono
parents: 67
diff changeset
828 test_text = "#define calloc __linux_calloc";
kono
parents: 67
diff changeset
829 };
kono
parents: 67
diff changeset
830
kono
parents: 67
diff changeset
831 fix = {
kono
parents: 67
diff changeset
832 hackname = aix_stdlib_valloc;
kono
parents: 67
diff changeset
833 mach = "*-*-aix*";
kono
parents: 67
diff changeset
834 files = stdlib.h;
kono
parents: 67
diff changeset
835 select = "#define[ \t]+valloc[ \t]+__linux_valloc";
kono
parents: 67
diff changeset
836 c_fix = format;
kono
parents: 67
diff changeset
837 c_fix_arg = "extern void *valloc(size_t) __asm__(\"__linux_valloc\");";
kono
parents: 67
diff changeset
838 test_text = "#define valloc __linux_valloc";
kono
parents: 67
diff changeset
839 };
kono
parents: 67
diff changeset
840
kono
parents: 67
diff changeset
841 /*
kono
parents: 67
diff changeset
842 * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
kono
parents: 67
diff changeset
843 */
kono
parents: 67
diff changeset
844 fix = {
kono
parents: 67
diff changeset
845 hackname = aix_strtof_const;
kono
parents: 67
diff changeset
846 mach = "*-*-aix*";
kono
parents: 67
diff changeset
847 files = stdlib.h;
kono
parents: 67
diff changeset
848 select = "((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\);";
kono
parents: 67
diff changeset
849 c_fix = format;
kono
parents: 67
diff changeset
850 c_fix_arg = "%1(const char *, char **);";
kono
parents: 67
diff changeset
851 test_text = "extern float strtof(char *, char **);";
kono
parents: 67
diff changeset
852 };
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
853
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
854 /*
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
855 * sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
856 * in an otherwise harmless (and #ifed out) macro definition
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
857 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
858 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
859 hackname = aix_sysmachine;
111
kono
parents: 67
diff changeset
860 mach = "*-*-aix*";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
861 files = sys/machine.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
862 select = "\\\\ +\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
863 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
864 c_fix_arg = "\\\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
865 test_text = "#define FOO \\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
866 " bar \\ \n baz \\ \n bat";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
867 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
868
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
869 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
870 * sys/wait.h on AIX 5.2 defines macros that have both signed and
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
871 * unsigned types in conditional expressions.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
872 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
873 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
874 hackname = aix_syswait_2;
111
kono
parents: 67
diff changeset
875 mach = "*-*-aix*";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
876 files = sys/wait.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
877 select = '\? (\(\(\(\(unsigned[^)]*\)[^)]*\) >> [^)]*\) \& 0xff\) : -1)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
878 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
879 c_fix_arg = "? (int)%1";
111
kono
parents: 67
diff changeset
880 test_text = "#define WSTOPSIG(__x) "
kono
parents: 67
diff changeset
881 "(int)(WIFSTOPPED(__x) ? ((((unsigned int)__x) >> 8) & 0xff) : -1)";
kono
parents: 67
diff changeset
882 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
883
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
884 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
885 * sys/signal.h on some versions of AIX uses volatile in the typedef of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
886 * sig_atomic_t, which causes gcc to generate a warning about duplicate
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
887 * volatile when a sig_atomic_t variable is declared volatile, as
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
888 * required by ANSI C.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
889 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
890 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
891 hackname = aix_volatile;
111
kono
parents: 67
diff changeset
892 mach = "*-*-aix*";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
893 files = sys/signal.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
894 select = "typedef volatile int sig_atomic_t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
895 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
896 c_fix_arg = "typedef int sig_atomic_t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
897 test_text = "typedef volatile int sig_atomic_t;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
898 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
899
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
900 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
901 * Fix __assert declaration in assert.h on Alpha OSF/1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
902 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
903 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
904 hackname = alpha___assert;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
905 files = "assert.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
906 select = '__assert\(char \*, char \*, int\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
907 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
908 c_fix_arg = "__assert(const char *, const char *, int)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
909 test_text = 'extern void __assert(char *, char *, int);';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
910 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
911
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
912 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
913 * Fix assert macro in assert.h on Alpha OSF/1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
914 * The superfluous int cast breaks C++.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
915 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
916 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
917 hackname = alpha_assert;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
918 files = "assert.h";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
919 select = "(#[ \t]*" 'define assert\(EX\).*)\(\(int\) \(EX\)\)';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
920 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
921 c_fix_arg = "%1(EX)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
922 test_text = '#define assert(EX) (((int) (EX)) ? (void)0 '
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
923 ': __assert(#EX, __FILE__, __LINE__))';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
924 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
925
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
926 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
927 * Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
928 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
929 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
930 hackname = alpha_getopt;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
931 files = "stdio.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
932 files = "stdlib.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
933 select = 'getopt\(int, char \*\[\], *char \*\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
934 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
935 c_fix_arg = "getopt(int, char *const[], const char *)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
936 test_text = 'extern int getopt(int, char *[], char *);';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
937 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
938
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
939 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
940 * Fix missing semicolon on Alpha OSF/4 in <net/if.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
941 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
942 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
943 hackname = alpha_if_semicolon;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
944 files = net/if.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
945 select = "struct[ \t]+sockaddr[ \t]+vmif_paddr[ \t]+/\\*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
946 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
947 c_fix_arg = "struct sockaddr vmif_paddr;\t/*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
948 test_text = ' struct sockaddr vmif_paddr /* protocol address */';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
949 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
950
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
951 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
952 * Remove erroneous parentheses in sym.h on Alpha OSF/1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
953 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
954 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
955 hackname = alpha_parens;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
956 files = sym.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
957 select = '#ifndef\(__mips64\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
958 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
959 c_fix_arg = "#ifndef __mips64";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
960 test_text = "#ifndef(__mips64) /* bogus */\nextern int foo;\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
961 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
962
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
963 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
964 * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
965 * And OpenBSD.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
966 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
967 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
968 hackname = alpha_sbrk;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
969 files = unistd.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
970 select = "char[ \t]*\\*[\t ]*sbrk[ \t]*\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
971 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
972 c_fix_arg = "void *sbrk(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
973 test_text = "extern char* sbrk(ptrdiff_t increment);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
974 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
975
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
976 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
977 * For C++, avoid any typedef or macro definition of bool,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
978 * and use the built in type instead.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
979 * HP/UX 10.20 also has it in curses_colr/curses.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
980 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
981 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
982 hackname = avoid_bool_define;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
983 files = curses.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
984 files = curses_colr/curses.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
985 files = term.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
986 files = tinfo.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
987
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
988 select = "#[ \t]*define[ \t]+bool[ \t]";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
989 bypass = "__cplusplus";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
990
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
991 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
992 c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
993 c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+bool[ \t].*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
994
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
995 test_text = "# define bool\t char \n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
996 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
997
111
kono
parents: 67
diff changeset
998 /*
kono
parents: 67
diff changeset
999 * avoid_bool_type
kono
parents: 67
diff changeset
1000 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1001 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1002 hackname = avoid_bool_type;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1003 files = curses.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1004 files = curses_colr/curses.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1005 files = term.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1006 files = tinfo.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1007
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1008 select = "^[ \t]*typedef[ \t].*[ \t]bool[ \t]*;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1009 bypass = "__cplusplus";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1010
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1011 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1012 c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1013
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1014 test_text = "typedef unsigned int\tbool \t; /* bool\n type */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1015 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1016
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1017 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1018 * For C++, avoid any typedef definition of wchar_t,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1019 * and use the built in type instead.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1020 * Don't do this for headers that are smart enough to do the right
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1021 * thing (recent [n]curses.h and Xlib.h).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1022 * Don't do it for <linux/nls.h> which is never used from C++ anyway,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1023 * and will be broken by the edit.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1024 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1025
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1026 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1027 hackname = avoid_wchar_t_type;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1028
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1029 select = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1030 bypass = "__cplusplus";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1031 bypass = "_LINUX_NLS_H";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1032 bypass = "XFree86: xc/lib/X11/Xlib\\.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1033
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1034 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1035 c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1036
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1037 test_text = "typedef unsigned short\twchar_t \t; /* wchar_t\n type */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1038 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1039
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1040 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1041 * Fix `typedef struct term;' on hppa1.1-hp-hpux9.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1042 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1043 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1044 hackname = bad_struct_term;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1045 files = curses.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1046 select = "^[ \t]*typedef[ \t]+struct[ \t]+term[ \t]*;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1047 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1048 c_fix_arg = "struct term;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1049
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1050 test_text = 'typedef struct term;';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1051 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1052
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1053 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1054 * Fix one other error in this file:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1055 * a mismatched quote not inside a C comment.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1056 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1057 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1058 hackname = badquote;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1059 files = sundev/vuid_event.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1060 select = "doesn't";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1061 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1062 c_fix_arg = "does not";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1063
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1064 test_text = "/* doesn't have matched single quotes */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1065 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1066
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1067 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1068 * check for broken assert.h that needs stdio.h
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1069 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1070 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1071 hackname = broken_assert_stdio;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1072 files = assert.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1073 select = stderr;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1074 bypass = "include.*stdio\\.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1075 c_fix = wrap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1076 c_fix_arg = "#include <stdio.h>\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1077 test_text = "extern FILE* stderr;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1078 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1079
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1080 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1081 * check for broken assert.h that needs stdlib.h
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1082 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1083 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1084 hackname = broken_assert_stdlib;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1085 files = assert.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1086 select = 'exit *\(|abort *\(';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1087 bypass = "include.*stdlib\\.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1088 c_fix = wrap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1089 c_fix_arg = "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1090 "#include <stdlib.h>\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1091 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1092 test_text = "extern void exit ( int );";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1093 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1094
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1095 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1096 * Remove `extern double cabs' declarations from math.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1097 * This conflicts with C99. Discovered on AIX.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1098 * Darwin hides its broken cabs in architecture-specific subdirs.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1099 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1100 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1101 hackname = broken_cabs;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1102 files = math.h, "architecture/*/math.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1103 select = "^extern[ \t]+double[ \t]+cabs";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1104
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1105 sed = "s/^extern[ \t]*double[ \t]*cabs[ \t]*\([^\\\)]*\);//";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1106 sed = "s/^extern[ \t]*long[ \t]*double[ \t]*cabsl[ \t]*\([^\\\)]*\);//";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1107
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1108 test_text = "#ifdef __STDC__\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1109 "extern double cabs(struct dbl_hypot);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1110 "#else\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1111 "extern double cabs();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1112 "#endif\n"
111
kono
parents: 67
diff changeset
1113 "extern double cabs ( _Complex z );";
kono
parents: 67
diff changeset
1114 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1115
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1116 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1117 * Fixup Darwin's broken check for __builtin_nanf.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1118 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1119 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1120 hackname = broken_nan;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1121 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1122 * It is tempting to omit the first "files" entry. Do not.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1123 * The testing machinery will take the first "files" entry as the name
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1124 * of a test file to play with. It would be a nuisance to have a directory
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1125 * with the name "*".
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1126 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1127 files = "architecture/ppc/math.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1128 files = "architecture/*/math.h";
111
kono
parents: 67
diff changeset
1129 select = '#if defined\(__APPLE_CC__\) && \(__APPLE_CC__ >= 1345\)';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1130 bypass = "powl";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1131 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1132 c_fix_arg = "#if 1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1133 test_text = "#if defined(__APPLE_CC__) && (__APPLE_CC__ >= 1345)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1134 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1135
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1136 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1137 * Various systems derived from BSD4.4 contain a macro definition
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1138 * for vfscanf that interacts badly with requirements of builtin-attrs.def.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1139 * Known to be fixed in FreeBSD 5 system headers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1140 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1141 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1142 hackname = bsd_stdio_attrs_conflict;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1143 mach = "*-*-*bsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1144 mach = "*-*-*darwin*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1145 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1146 select = "^#define[ \t]*vfscanf[ \t]*__svfscanf[ \t]*$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1147 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1148 c_fix_arg = '#define _BSD_STRING(_BSD_X) _BSD_STRINGX(_BSD_X)' "\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1149 '#define _BSD_STRINGX(_BSD_X) #_BSD_X' "\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1150 'int vfscanf(FILE *, const char *, __builtin_va_list) '
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1151 '__asm__ (_BSD_STRING(__USER_LABEL_PREFIX__) "__svfscanf");';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1152 test_text = '#define vfscanf __svfscanf';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1153 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1154
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1155 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1156 * Fix various macros used to define ioctl numbers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1157 * The traditional syntax was:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1158 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1159 * #define _CTRL(n, x) (('n'<<8)+x)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1160 * #define TCTRLCFOO _CTRL(T, 1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1161 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1162 * but this does not work with the C standard, which disallows macro
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1163 * expansion inside strings. We have to rewrite it thus:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1164 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1165 * #define _CTRL(n, x) ((n<<8)+x)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1166 * #define TCTRLCFOO _CTRL('T', 1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1167 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1168 * The select expressions match too much, but the c_fix code is cautious.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1169 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1170 * CTRL might be: CTRL _CTRL ISCTRL BSD43_CTRL ...
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1171 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1172 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1173 hackname = ctrl_quotes_def;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1174 select = "define[ \t]+[A-Z0-9_]+CTRL\\([a-zA-Z][,)]";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1175 c_fix = char_macro_def;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1176 c_fix_arg = "CTRL";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1177
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1178 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1179 * This is two tests in order to ensure that the "CTRL(c)" can
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1180 * be selected in isolation from the multi-arg format
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1181 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1182 test_text = "#define BSD43_CTRL(n, x) (('n'<<8)+x)\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1183 test_text = "#define _CTRL(c) ('c'&037)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1184 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1185
111
kono
parents: 67
diff changeset
1186 /*
kono
parents: 67
diff changeset
1187 * Fix various macros used to define ioctl numbers.
kono
parents: 67
diff changeset
1188 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1189 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1190 hackname = ctrl_quotes_use;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1191 select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1192 c_fix = char_macro_use;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1193 c_fix_arg = "CTRL";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1194 test_text = "#define TCTRLFOO BSD43_CTRL(T, 1)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1195 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1196
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1197 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1198 * sys/mman.h on HP/UX is not C++ ready,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1199 * even though NO_IMPLICIT_EXTERN_C is defined on HP/UX.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1200 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1201 * rpc/types.h on OSF1/2.0 is not C++ ready,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1202 * even though NO_IMPLICIT_EXTERN_C is defined for the alpha.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1203 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1204 * The problem is the declaration of malloc.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1205 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1206 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1207 hackname = cxx_unready;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1208 files = sys/mman.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1209 files = rpc/types.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1210 select = '[^#]+malloc.*;'; /* Catch any form of declaration
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1211 not within a macro. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1212 bypass = '"C"|__BEGIN_DECLS';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1213
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1214 c_fix = wrap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1215 c_fix_arg = "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1216 "extern \"C\" {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1217 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1218 c_fix_arg = "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1219 "}\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1220 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1221 test_text = "extern void* malloc( size_t );";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1222 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1223
111
kono
parents: 67
diff changeset
1224 /*
kono
parents: 67
diff changeset
1225 * macOS 10.12 <AvailabilityInternal.h> uses __attribute__((availability))
kono
parents: 67
diff changeset
1226 * unconditionally.
kono
parents: 67
diff changeset
1227 */
kono
parents: 67
diff changeset
1228 fix = {
kono
parents: 67
diff changeset
1229 hackname = darwin_availabilityinternal;
kono
parents: 67
diff changeset
1230 mach = "*-*-darwin*";
kono
parents: 67
diff changeset
1231 files = AvailabilityInternal.h;
kono
parents: 67
diff changeset
1232 select = "#define[ \t]+(__API_[ADU]\\([^)]*\\)).*";
kono
parents: 67
diff changeset
1233 c_fix = format;
kono
parents: 67
diff changeset
1234 c_fix_arg = <<- _EOFix_
kono
parents: 67
diff changeset
1235 #if defined(__has_attribute)
kono
parents: 67
diff changeset
1236 #if __has_attribute(availability)
kono
parents: 67
diff changeset
1237 %0
kono
parents: 67
diff changeset
1238 #else
kono
parents: 67
diff changeset
1239 #define %1
kono
parents: 67
diff changeset
1240 #endif
kono
parents: 67
diff changeset
1241 #else
kono
parents: 67
diff changeset
1242 #define %1
kono
parents: 67
diff changeset
1243 #endif
kono
parents: 67
diff changeset
1244 _EOFix_;
kono
parents: 67
diff changeset
1245
kono
parents: 67
diff changeset
1246 test_text = "#define __API_A(x) __attribute__((availability(__API_AVAILABLE_PLATFORM_##x)))\n"
kono
parents: 67
diff changeset
1247 "#define __API_D(msg,x) __attribute__((availability(__API_DEPRECATED_PLATFORM_##x,message=msg)))";
kono
parents: 67
diff changeset
1248 };
kono
parents: 67
diff changeset
1249
kono
parents: 67
diff changeset
1250 /*
kono
parents: 67
diff changeset
1251 * For the AAB_darwin7_9_long_double_funcs fix to be useful,
kono
parents: 67
diff changeset
1252 * you have to not use "" includes.
kono
parents: 67
diff changeset
1253 */
kono
parents: 67
diff changeset
1254 fix = {
kono
parents: 67
diff changeset
1255 hackname = darwin_9_long_double_funcs_2;
kono
parents: 67
diff changeset
1256 mach = "*-*-darwin7.9*";
kono
parents: 67
diff changeset
1257 files = math.h;
kono
parents: 67
diff changeset
1258 select = '#include[ \t]+\"';
kono
parents: 67
diff changeset
1259 c_fix = format;
kono
parents: 67
diff changeset
1260 c_fix_arg = "%1<%2.h>";
kono
parents: 67
diff changeset
1261
kono
parents: 67
diff changeset
1262 c_fix_arg = '([ \t]*#[ \t]*include[ \t]+)"([a-z0-9/]+)\.h"';
kono
parents: 67
diff changeset
1263
kono
parents: 67
diff changeset
1264 test_text = '#include "architecture/ppc/math.h"';
kono
parents: 67
diff changeset
1265 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1266
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1267 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1268 * On darwin8 and earlier, mach-o/swap.h isn't properly guarded
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1269 * by 'extern "C"'. On darwin7 some mach/ headers aren't properly guarded.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1270 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1271 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1272 hackname = darwin_externc;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1273 mach = "*-*-darwin*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1274 files = mach-o/swap.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1275 files = mach/mach_time.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1276 files = mach/mach_traps.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1277 files = mach/message.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1278 files = mach/mig.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1279 files = mach/semaphore.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1280 bypass = "extern \"C\"";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1281 bypass = "__BEGIN_DECLS";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1282 c_fix = wrap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1283 c_fix_arg = "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1284 "extern \"C\" {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1285 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1286 c_fix_arg = "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1287 "}\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1288 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1289 test_text = "extern void swap_fat_header();\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1290 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1291
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1292 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1293 * AvailabilityMacros.h on Darwin breaks with GCC 4.0, because of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1294 * bad __GNUC__ tests.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1295 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1296 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1297 hackname = darwin_gcc4_breakage;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1298 mach = "*-*-darwin*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1299 files = AvailabilityMacros.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1300 select = "\\(__GNUC__ >= 3\\) && \\(__GNUC_MINOR__ >= 1\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1301 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1302 c_fix_arg = "((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1303 test_text = "#if defined(__GNUC__) && (__GNUC__ >= 3) && "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1304 "(__GNUC_MINOR__ >= 1)\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1305 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1306
111
kono
parents: 67
diff changeset
1307 /*
kono
parents: 67
diff changeset
1308 * Before Mac OS X 10.8 <i386/setjmp.h> doesn't mark longjump noreturn.
kono
parents: 67
diff changeset
1309 */
kono
parents: 67
diff changeset
1310 fix = {
kono
parents: 67
diff changeset
1311 hackname = darwin_longjmp_noreturn;
kono
parents: 67
diff changeset
1312 mach = "*-*-darwin*";
kono
parents: 67
diff changeset
1313 files = "i386/setjmp.h";
kono
parents: 67
diff changeset
1314 bypass = "__dead2";
kono
parents: 67
diff changeset
1315 select = "(.*longjmp\\(.*jmp_buf.*[^)]+\\));";
kono
parents: 67
diff changeset
1316 c_fix = format;
kono
parents: 67
diff changeset
1317 c_fix_arg = "%1 __attribute__ ((__noreturn__));";
kono
parents: 67
diff changeset
1318
kono
parents: 67
diff changeset
1319 test_text = "void siglongjmp(sigjmp_buf, int);";
kono
parents: 67
diff changeset
1320 };
kono
parents: 67
diff changeset
1321
kono
parents: 67
diff changeset
1322 /*
kono
parents: 67
diff changeset
1323 * Mac OS X 10.11 <os/trace.h> uses attribute on function definition.
kono
parents: 67
diff changeset
1324 */
kono
parents: 67
diff changeset
1325 fix = {
kono
parents: 67
diff changeset
1326 hackname = darwin_os_trace_1;
kono
parents: 67
diff changeset
1327 mach = "*-*-darwin*";
kono
parents: 67
diff changeset
1328 files = os/trace.h;
kono
parents: 67
diff changeset
1329 select = "^(_os_trace_verify_printf.*) (__attribute__.*)";
kono
parents: 67
diff changeset
1330 c_fix = format;
kono
parents: 67
diff changeset
1331 c_fix_arg = "%1";
kono
parents: 67
diff changeset
1332 test_text = "_os_trace_verify_printf(const char *msg, ...) __attribute__((format(printf, 1, 2)))";
kono
parents: 67
diff changeset
1333 };
kono
parents: 67
diff changeset
1334
kono
parents: 67
diff changeset
1335 /*
kono
parents: 67
diff changeset
1336 * Mac OS X 10.1[012] <os/trace.h> os_trace_payload_t typedef uses Blocks
kono
parents: 67
diff changeset
1337 * extension without guard.
kono
parents: 67
diff changeset
1338 */
kono
parents: 67
diff changeset
1339 fix = {
kono
parents: 67
diff changeset
1340 hackname = darwin_os_trace_2;
kono
parents: 67
diff changeset
1341 mach = "*-*-darwin*";
kono
parents: 67
diff changeset
1342 files = os/trace.h;
kono
parents: 67
diff changeset
1343 select = "typedef.*\\^os_trace_payload_t.*";
kono
parents: 67
diff changeset
1344 c_fix = format;
kono
parents: 67
diff changeset
1345 c_fix_arg = "#if __BLOCKS__\n%0\n#endif";
kono
parents: 67
diff changeset
1346 test_text = "typedef void (^os_trace_payload_t)(xpc_object_t xdict);";
kono
parents: 67
diff changeset
1347 };
kono
parents: 67
diff changeset
1348
kono
parents: 67
diff changeset
1349 /*
kono
parents: 67
diff changeset
1350 * In Mac OS X 10.1[012] <os/trace.h>, need to guard users of
kono
parents: 67
diff changeset
1351 * os_trace_payload_t typedef, too.
kono
parents: 67
diff changeset
1352 */
kono
parents: 67
diff changeset
1353 fix = {
kono
parents: 67
diff changeset
1354 hackname = darwin_os_trace_3;
kono
parents: 67
diff changeset
1355 mach = "*-*-darwin*";
kono
parents: 67
diff changeset
1356 files = os/trace.h;
kono
parents: 67
diff changeset
1357 select = <<- _EOSelect_
kono
parents: 67
diff changeset
1358 __(API|OSX)_.*
kono
parents: 67
diff changeset
1359 OS_EXPORT.*
kono
parents: 67
diff changeset
1360 .*
kono
parents: 67
diff changeset
1361 _os_trace.*os_trace_payload_t payload);
kono
parents: 67
diff changeset
1362 _EOSelect_;
kono
parents: 67
diff changeset
1363 c_fix = format;
kono
parents: 67
diff changeset
1364 c_fix_arg = "#if __BLOCKS__\n%0\n#endif";
kono
parents: 67
diff changeset
1365 test_text = <<- _EOText_
kono
parents: 67
diff changeset
1366 __API_AVAILABLE(macosx(10.10), ios(8.0), watchos(2.0), tvos(8.0))
kono
parents: 67
diff changeset
1367 OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED
kono
parents: 67
diff changeset
1368 void
kono
parents: 67
diff changeset
1369 _os_trace_with_buffer(void *dso, const char *message, uint8_t type, const void *buffer, size_t buffer_size, os_trace_payload_t payload);
kono
parents: 67
diff changeset
1370
kono
parents: 67
diff changeset
1371 __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_10_0)
kono
parents: 67
diff changeset
1372 OS_EXPORT OS_NOTHROW
kono
parents: 67
diff changeset
1373 void
kono
parents: 67
diff changeset
1374 _os_trace_internal(void *dso, uint8_t type, const char *format, const uint8_t *buf, size_t buf_size, os_trace_payload_t payload);
kono
parents: 67
diff changeset
1375 _EOText_;
kono
parents: 67
diff changeset
1376 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1377
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1378 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1379 * __private_extern__ doesn't exist in FSF GCC. Even if it did,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1380 * why would you ever put it in a system header file?
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1381 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1382 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1383 hackname = darwin_private_extern;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1384 mach = "*-*-darwin*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1385 files = mach-o/dyld.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1386 select = "__private_extern__ [a-z_]+ _dyld_";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1387 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1388 c_fix_arg = "extern";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1389 c_fix_arg = "__private_extern__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1390 test_text = "__private_extern__ int _dyld_func_lookup(\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1391 "const char *dyld_func_name,\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1392 "unsigned long *address);\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1393 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1394
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1395 /*
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1396 * Darwin headers have a stdint.h that defines UINT8_C and UINT16_C to
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1397 * unsigned constants.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1398 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1399 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1400 hackname = darwin_stdint_1;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1401 mach = "*-*-darwin*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1402 files = stdint-darwin.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1403 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1404 c_fix_arg = "#define UINT8_C(v)\tv\n#define UINT16_C(v)\tv";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1405 select = "#define UINT8_C\\(v\\)[ \t]+\\(v ## U\\)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1406 "#define UINT16_C\\(v\\)[ \t]+\\(v ## U\\)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1407 test_text = "#define UINT8_C(v) (v ## U)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1408 "#define UINT16_C(v) (v ## U)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1409 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1410
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1411 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1412 * Darwin headers have a stdint.h that defines INTPTR_MIN and INTPTR_MAX
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1413 * with wrong types.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1414 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1415 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1416 hackname = darwin_stdint_2;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1417 mach = "*-*-darwin*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1418 files = stdint-darwin.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1419 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1420 c_fix_arg = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1421 "#define INTPTR_MAX 9223372036854775807L\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1422 "#define INTPTR_MIN (-INTPTR_MAX-1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1423 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1424 "#define INTPTR_MAX 2147483647L\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1425 "#define INTPTR_MIN (-INTPTR_MAX-1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1426 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1427 select = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1428 "#define INTPTR_MIN[ \t]+INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1429 "#define INTPTR_MAX[ \t]+INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1430 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1431 "#define INTPTR_MIN[ \t]+INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1432 "#define INTPTR_MAX[ \t]+INT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1433 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1434 test_text = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1435 "#define INTPTR_MIN INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1436 "#define INTPTR_MAX INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1437 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1438 "#define INTPTR_MIN INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1439 "#define INTPTR_MAX INT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1440 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1441 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1442
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1443 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1444 * Darwin headers have a stdint.h that defines UINTPTR_MAX with a wrong type.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1445 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1446 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1447 hackname = darwin_stdint_3;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1448 mach = "*-*-darwin*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1449 files = stdint-darwin.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1450 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1451 c_fix_arg = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1452 "#define UINTPTR_MAX 18446744073709551615UL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1453 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1454 "#define UINTPTR_MAX 4294967295UL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1455 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1456 select = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1457 "#define UINTPTR_MAX[ \t]+UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1458 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1459 "#define UINTPTR_MAX[ \t]+UINT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1460 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1461 test_text = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1462 "#define UINTPTR_MAX UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1463 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1464 "#define UINTPTR_MAX UINT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1465 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1466 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1467
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1468 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1469 * Darwin headers have a stdint.h that defines SIZE_MAX with a wrong type.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1470 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1471 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1472 hackname = darwin_stdint_4;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1473 mach = "*-*-darwin*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1474 files = stdint-darwin.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1475 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1476 c_fix_arg = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1477 "#define SIZE_MAX 18446744073709551615UL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1478 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1479 "#define SIZE_MAX 4294967295UL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1480 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1481 select = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1482 "#define SIZE_MAX[ \t]+UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1483 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1484 "#define SIZE_MAX[ \t]+UINT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1485 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1486 test_text = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1487 "#define SIZE_MAX UINT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1488 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1489 "#define SIZE_MAX UINT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1490 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1491 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1492
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1493 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1494 * Darwin headers have a stdint.h that defines {U,}INTMAX_{MIN,MAX}
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1495 * with a wrong type.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1496 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1497 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1498 hackname = darwin_stdint_5;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1499 mach = "*-*-darwin*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1500 files = stdint-darwin.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1501 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1502 c_fix_arg = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1503 "#define INTMAX_MIN (-9223372036854775807L - 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1504 "#define INTMAX_MAX 9223372036854775807L\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1505 "#define UINTMAX_MAX 18446744073709551615UL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1506 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1507 "#define INTMAX_MIN (-9223372036854775807LL - 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1508 "#define INTMAX_MAX 9223372036854775807LL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1509 "#define UINTMAX_MAX 18446744073709551615ULL\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1510 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1511 select = "#define INTMAX_MIN[ \t]+INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1512 "#define INTMAX_MAX[ \t]+INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1513 "\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1514 "#define UINTMAX_MAX[ \t]+UINT64_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1515 test_text = "#define INTMAX_MIN INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1516 "#define INTMAX_MAX INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1517 "\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1518 "#define UINTMAX_MAX UINT64_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1519 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1520
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1521 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1522 * Darwin headers have a stdint.h that defines {U,}INTMAX_C
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1523 * with a wrong type.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1524 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1525 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1526 hackname = darwin_stdint_6;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1527 mach = "*-*-darwin*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1528 files = stdint-darwin.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1529 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1530 c_fix_arg = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1531 "#define PTRDIFF_MIN (-9223372036854775807L - 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1532 "#define PTRDIFF_MAX 9223372036854775807L\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1533 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1534 "#define PTRDIFF_MIN (-2147483647 - 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1535 "#define PTRDIFF_MAX 2147483647\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1536 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1537 select = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1538 "#define PTRDIFF_MIN[ \t]+INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1539 "#define PTRDIFF_MAX[ \t]+INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1540 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1541 "#define PTRDIFF_MIN[ \t]+INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1542 "#define PTRDIFF_MAX[ \t]+INT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1543 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1544 test_text = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1545 "#define PTRDIFF_MIN INT64_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1546 "#define PTRDIFF_MAX INT64_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1547 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1548 "#define PTRDIFF_MIN INT32_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1549 "#define PTRDIFF_MAX INT32_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1550 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1551 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1552
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1553 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1554 * Darwin headers have a stdint.h that defines {U,}INTMAX_C
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1555 * with a wrong type.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1556 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1557 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1558 hackname = darwin_stdint_7;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1559 mach = "*-*-darwin*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1560 files = stdint-darwin.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1561 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1562 c_fix_arg = "#if __WORDSIZE == 64\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1563 "#define INTMAX_C(v) (v ## L)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1564 "#define UINTMAX_C(v) (v ## UL)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1565 "#else\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1566 "#define INTMAX_C(v) (v ## LL)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1567 "#define UINTMAX_C(v) (v ## ULL)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1568 "#endif";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1569 select = "#define INTMAX_C\\(v\\)[ \t]+\\(v ## LL\\)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1570 "#define UINTMAX_C\\(v\\)[ \t]+\\(v ## ULL\\)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1571 test_text = "#define INTMAX_C(v) (v ## LL)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1572 "#define UINTMAX_C(v) (v ## ULL)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1573 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1574
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1575 /*
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1576 * Fix <c_asm.h> on Digital UNIX V4.0:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1577 * It contains a prototype for a DEC C internal asm() function,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1578 * clashing with gcc's asm keyword. So protect this with __DECC.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1579 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1580 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1581 hackname = dec_intern_asm;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1582 files = c_asm.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1583 sed = "/^[ \t]*float[ \t]*fasm/i\\\n#ifdef __DECC\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1584 sed = "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1585 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1586 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1587 "float fasm {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1588 " ... asm stuff ...\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1589 "};\n#pragma intrinsic( dasm )\n/* END ASM TEST*/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1590 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1591
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1592 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1593 * Fix typo in <wchar.h> on DJGPP 2.03.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1594 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1595 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1596 hackname = djgpp_wchar_h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1597 file = wchar.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1598 select = "__DJ_wint_t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1599 bypass = "sys/djtypes.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1600 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1601 c_fix_arg = "%0\n#include <sys/djtypes.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1602 c_fix_arg = "#include <stddef.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1603 test_text = "#include <stddef.h>\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1604 "extern __DJ_wint_t x;\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1605 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1606
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1607 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1608 * Fix these Sun OS files to avoid an invalid identifier in an #ifdef.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1609 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1610 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1611 hackname = ecd_cursor;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1612 files = "sunwindow/win_lock.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1613 files = "sunwindow/win_cursor.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1614 select = 'ecd\.cursor';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1615 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1616 c_fix_arg = 'ecd_cursor';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1617
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1618 test_text = "#ifdef ecd.cursor\n#error bogus\n#endif /* ecd+cursor */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1619 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1620
111
kono
parents: 67
diff changeset
1621 /*
kono
parents: 67
diff changeset
1622 * Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64
kono
parents: 67
diff changeset
1623 * that fails when compiling for SSE-less 32-bit x86.
kono
parents: 67
diff changeset
1624 */
kono
parents: 67
diff changeset
1625 fix = {
kono
parents: 67
diff changeset
1626 hackname = feraiseexcept_nosse_divbyzero;
kono
parents: 67
diff changeset
1627 mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*';
kono
parents: 67
diff changeset
1628 files = bits/fenv.h, '*/bits/fenv.h';
kono
parents: 67
diff changeset
1629 select = "^([\t ]*)__asm__ __volatile__ \\(\"divss %1, %0 *\" : "
kono
parents: 67
diff changeset
1630 ": \"x\" \\(__f\\), \"x\" \\(__g\\)\\);$";
kono
parents: 67
diff changeset
1631 bypass = "\"fdivp .*; fwait\"";
kono
parents: 67
diff changeset
1632
kono
parents: 67
diff changeset
1633 c_fix = format;
kono
parents: 67
diff changeset
1634 c_fix_arg = <<- _EOText_
kono
parents: 67
diff changeset
1635 # ifdef __SSE_MATH__
kono
parents: 67
diff changeset
1636 %0
kono
parents: 67
diff changeset
1637 # else
kono
parents: 67
diff changeset
1638 %1__asm__ __volatile__ ("fdivp %%%%st, %%%%st(1); fwait"
kono
parents: 67
diff changeset
1639 %1 : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
kono
parents: 67
diff changeset
1640 # endif
kono
parents: 67
diff changeset
1641 _EOText_;
kono
parents: 67
diff changeset
1642
kono
parents: 67
diff changeset
1643 test_text = <<- _EOText_
kono
parents: 67
diff changeset
1644 __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
kono
parents: 67
diff changeset
1645 _EOText_;
kono
parents: 67
diff changeset
1646 };
kono
parents: 67
diff changeset
1647
kono
parents: 67
diff changeset
1648 /*
kono
parents: 67
diff changeset
1649 * Incorrect feraiseexcept extern inline in bits/fenv.h on x86_64
kono
parents: 67
diff changeset
1650 * that fails when compiling for SSE-less 32-bit x86.
kono
parents: 67
diff changeset
1651 */
kono
parents: 67
diff changeset
1652 fix = {
kono
parents: 67
diff changeset
1653 hackname = feraiseexcept_nosse_invalid;
kono
parents: 67
diff changeset
1654 mach = 'i[34567]86-*-linux*', 'x86*-linux*', 'amd64-*-linux*';
kono
parents: 67
diff changeset
1655 files = bits/fenv.h, '*/bits/fenv.h';
kono
parents: 67
diff changeset
1656 select = "^([\t ]*)__asm__ __volatile__ \\(\"divss %0, %0 *\" : "
kono
parents: 67
diff changeset
1657 ": \"x\" \\(__f\\)\\);$";
kono
parents: 67
diff changeset
1658 bypass = "\"fdiv .*; fwait\"";
kono
parents: 67
diff changeset
1659
kono
parents: 67
diff changeset
1660 c_fix = format;
kono
parents: 67
diff changeset
1661 c_fix_arg = <<- _EOText_
kono
parents: 67
diff changeset
1662 # ifdef __SSE_MATH__
kono
parents: 67
diff changeset
1663 %0
kono
parents: 67
diff changeset
1664 # else
kono
parents: 67
diff changeset
1665 %1__asm__ __volatile__ ("fdiv %%%%st, %%%%st(0); fwait"
kono
parents: 67
diff changeset
1666 %1 : "=t" (__f) : "0" (__f));
kono
parents: 67
diff changeset
1667 # endif
kono
parents: 67
diff changeset
1668 _EOText_;
kono
parents: 67
diff changeset
1669
kono
parents: 67
diff changeset
1670 test_text = <<- _EOText_
kono
parents: 67
diff changeset
1671 __asm__ __volatile__ ("divss %0, %0" : : "x" (__f));
kono
parents: 67
diff changeset
1672 _EOText_;
kono
parents: 67
diff changeset
1673 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1674
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1675 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1676 * Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1677 * neither the existence of GCC 3 nor its exact feature set yet break
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1678 * (by design?) when __GNUC__ is set beyond 2.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1679 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1680 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1681 hackname = freebsd_gcc3_breakage;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1682 mach = "*-*-freebsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1683 files = sys/cdefs.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1684 select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1685 bypass = '__GNUC__[ \t]*([>=]=[ \t]*[3-9]|>[ \t]*2)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1686 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1687 c_fix_arg = '%0 || __GNUC__ >= 3';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1688 test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1689 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1690
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1691 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1692 * Some releases of FreeBSD 4 and FreeBSD 5.0 and 5.1 system headers presume
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1693 * neither the existence of GCC 4 nor its exact feature set yet break
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1694 * (by design?) when __GNUC__ is set beyond 3.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1695 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1696 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1697 hackname = freebsd_gcc4_breakage;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1698 mach = "*-*-freebsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1699 files = sys/cdefs.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1700 select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 \|\| __GNUC__ == 3$';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1701 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1702 c_fix_arg = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ >= 3';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1703 test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 || __GNUC__ == 3';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1704 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1705
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1706 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1707 * Some versions of glibc don't expect the C99 inline semantics.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1708 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1709 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1710 hackname = glibc_c99_inline_1;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1711 files = features.h, '*/features.h';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1712 select = "^ *&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1713 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1714 c_fix_arg = "%0 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1715 test_text = <<-EOT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1716 #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1717 && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1718 # define __USE_EXTERN_INLINES 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1719 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1720 EOT;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1721 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1722
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1723 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1724 * Similar, but a version that didn't have __NO_INLINE__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1725 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1726 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1727 hackname = glibc_c99_inline_1a;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1728 files = features.h, '*/features.h';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1729 select = "(\\) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1730 "(#[ \t]*define[ \t]*__USE_EXTERN_INLINES[ \t]*1)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1731 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1732 c_fix_arg = "%1 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)\n%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1733 test_text = <<-EOT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1734 #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1735 # define __USE_EXTERN_INLINES 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1736 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1737 EOT;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1738 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1739
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1740 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1741 * The glibc_c99_inline_1 fix should have fixed everything. Unfortunately
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1742 * there are many glibc headers which do not respect __USE_EXTERN_INLINES.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1743 * The remaining glibc_c99_inline_* fixes deal with some of those headers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1744 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1745 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1746 hackname = glibc_c99_inline_2;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1747 files = sys/stat.h, '*/sys/stat.h';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1748 select = "extern __inline__ int";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1749 sed = "s/extern int \\(stat\\)/"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1750 "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1751 "__inline__ int \\1/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1752 sed = "s/extern int \\([lf]stat\\)/"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1753 "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1754 "__inline__ int \\1/";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1755 sed = "s/extern int \\(mknod\\)/"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1756 "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1757 "__inline__ int \\1/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1758 sed = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\(stat\\)/"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1759 "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1760 "__inline__ int __REDIRECT\\1 (\\2/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1761 sed = "s/extern int __REDIRECT\\(_NTH\\)\\{0,1\\} (\\([lf]stat\\)/"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1762 "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1763 "__inline__ int __REDIRECT\\1 (\\2/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1764 sed = "s/^extern __inline__ int/"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1765 "#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1766 "__inline__ int/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1767 test_text = <<-EOT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1768 extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1769 extern __inline__ int
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1770 __NTH (fstat64 (int __fd, struct stat64 *__statbuf))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1771 {}
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1772 EOT;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1773 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1774
111
kono
parents: 67
diff changeset
1775 /*
kono
parents: 67
diff changeset
1776 * glibc_c99_inline_3
kono
parents: 67
diff changeset
1777 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1778 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1779 hackname = glibc_c99_inline_3;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1780 files = bits/string2.h, '*/bits/string2.h';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1781 select = "extern __inline";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1782 bypass = "__extern_inline|__GNU_STDC_INLINE__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1783 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1784 c_fix_arg = "# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1785 c_fix_arg = "^# ifdef __cplusplus$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1786 test_text = <<-EOT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1787 # ifdef __cplusplus
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1788 # define __STRING_INLINE inline
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1789 # else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1790 # define __STRING_INLINE extern __inline
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1791 # endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1792 EOT;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1793 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1794
111
kono
parents: 67
diff changeset
1795 /*
kono
parents: 67
diff changeset
1796 * glibc_c99_inline_4
kono
parents: 67
diff changeset
1797 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1798 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1799 hackname = glibc_c99_inline_4;
111
kono
parents: 67
diff changeset
1800 files = sys/sysmacros.h, '*/sys/sysmacros.h', wchar.h, '*/wchar.h',
kono
parents: 67
diff changeset
1801 pthread.h, '*/pthread.h';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1802 bypass = "__extern_inline|__gnu_inline__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1803 select = "(^| )extern __inline";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1804 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1805 c_fix_arg = "%0 __attribute__ ((__gnu_inline__))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1806 test_text = <<-EOT
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1807 __extension__ extern __inline unsigned int
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1808 extern __inline unsigned int
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1809 EOT;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1810 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1811
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1812 /* glibc-2.3.5 defines pthread mutex initializers incorrectly,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1813 * so we replace them with versions that correspond to the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1814 * definition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1815 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1816 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1817 hackname = glibc_mutex_init;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1818 files = pthread.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1819 select = '\{ *\{ *0, *\} *\}';
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1820 sed = "/define[ \t]\\{1,\\}PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1821 "N\ns/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n}";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1822 sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1823 "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0 }/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1824 sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1825 "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0 }/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1826 sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1827 "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1828 sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1829 "\\(RECURSIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1830 sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1831 "\\(ERRORCHECK\\)_NP\\) }/{ \\1, 0, 0 }/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1832 sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1833 "\\(ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1834 sed = "/define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1835 "N;s/^[ \t]*#[ \t]*"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1836 "\\(define[ \t]\\{1,\\}PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1837 "[ \t]*{ { 0, } }/# if __WORDSIZE == 64\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1838 "# \\1\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1839 " { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1840 "# else\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1841 "# \\1\\\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1842 " { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\\n"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1843 "# endif/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1844 sed = "s/{ \\(0, 0, 0, 0, 0, 0, "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1845 "PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1846 sed = "/define[ \t]\\{1,\\}PTHREAD_COND_INITIALIZER/"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1847 "s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1848
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1849 test_text = <<- _EOText_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1850 #define PTHREAD_MUTEX_INITIALIZER \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1851 { { 0, } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1852 #ifdef __USE_GNU
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1853 # if __WORDSIZE == 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1854 # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1855 { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1856 # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1857 { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1858 # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1859 { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1860 # else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1861 # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1862 { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1863 # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1864 { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1865 # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1866 { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1867 # endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1868 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1869 # define PTHREAD_RWLOCK_INITIALIZER \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1870 { { 0, } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1871 # ifdef __USE_GNU
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1872 # if __WORDSIZE == 64
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1873 # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1874 { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1875 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1876 # else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1877 # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \\
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1878 { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1879 # endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1880 # endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1881 #define PTHREAD_COND_INITIALIZER { { 0, } }
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1882 _EOText_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1883 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1884
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1885 /* glibc versions before 2.5 have a version of stdint.h that defines
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1886 UINT8_C and UINT16_C to produce unsigned constants, as do uClibc
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1887 versions with stdint.h based on those glibc versions. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1888 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1889 hackname = glibc_stdint;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1890 files = stdint.h;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1891 select = "GNU C Library";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1892 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1893 c_fix_arg = "# define UINT8_C(c)\tc\n# define UINT16_C(c)\tc";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1894 c_fix_arg = "# define UINT8_C\\(c\\)\tc ## U\n# define UINT16_C\\(c\\)\tc ## U";
111
kono
parents: 67
diff changeset
1895 test_text = "/* This file is part of the GNU C Library. */\n"
kono
parents: 67
diff changeset
1896 "# define UINT8_C(c)\tc ## U\n"
kono
parents: 67
diff changeset
1897 "# define UINT16_C(c)\tc ## U";
kono
parents: 67
diff changeset
1898 };
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1899
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1900 /* Some versions of glibc have a version of bits/string2.h that
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1901 produces "value computed is not used" warnings from strncpy; fix
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1902 this definition by using __builtin_strncpy instead as in newer
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1903 versions. */
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1904 fix = {
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1905 hackname = glibc_strncpy;
111
kono
parents: 67
diff changeset
1906 files = bits/string2.h, '*/bits/string2.h';
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1907 bypass = "__builtin_strncpy";
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1908 c_fix = format;
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1909 c_fix_arg = "# define strncpy(dest, src, n) __builtin_strncpy (dest, src, n)";
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1910 c_fix_arg = "# define strncpy([^\n]*\\\\\n)*[^\n]*";
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1911 test_text = <<-EOT
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1912 # define strncpy(dest, src, n) \
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1913 (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \\
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1914 ? (strlen (src) + 1 >= ((size_t) (n)) \\
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1915 ? (char *) memcpy (dest, src, n) \\
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1916 : strncpy (dest, src, n)) \\
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1917 : strncpy (dest, src, n)))
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1918 EOT;
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1919
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1920 };
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
1921
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1922 /* glibc's tgmath.h relies on an expression that is not an integer
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1923 constant expression being treated as it was by GCC 4.4 and
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1924 earlier. */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1925 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1926 hackname = glibc_tgmath;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1927 files = tgmath.h;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1928 select = '\(\(\(type\) 0.25\) && \(\(type\) 0.25 - 1\)\)';
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1929 bypass = "__floating_type\\(type\\) \\\\\n.*__builtin_classify_type";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1930 c_fix = format;
111
kono
parents: 67
diff changeset
1931 c_fix_arg = "(__builtin_classify_type ((type) 0) == 8 || "
kono
parents: 67
diff changeset
1932 "(__builtin_classify_type ((type) 0) == 9 && "
kono
parents: 67
diff changeset
1933 "__builtin_classify_type (__real__ ((type) 0)) == 8))";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1934 test_text = "# define __floating_type(type) (((type) 0.25) && ((type) 0.25 - 1))";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1935 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
1936
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1937 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1938 * Fix these files to use the types we think they should for
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1939 * ptrdiff_t, size_t, and wchar_t.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1940 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1941 * This defines the types in terms of macros predefined by our 'cpp'.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1942 * This is supposedly necessary for glibc's handling of these types.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1943 * It's probably not necessary for anyone else, but it doesn't hurt.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1944 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1945 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1946 hackname = gnu_types;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1947 files = "sys/types.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1948 files = "stdlib.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1949 files = "sys/stdtypes.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1950 files = "stddef.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1951 files = "memory.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1952 files = "unistd.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1953 bypass = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1954 select = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1955 c_fix = gnu_type;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1956 /* The Solaris 10 headers already define these types correctly. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1957 mach = '*-*-solaris2.1[0-9]*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1958 not_machine = true;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1959
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1960 test_text = "typedef long int ptrdiff_t; /* long int */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1961 "typedef uint_t size_t; /* uint_t */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1962 "typedef ushort_t wchar_t; /* ushort_t */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1963 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1964
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1965 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1966 * Fix HP & Sony's use of "../machine/xxx.h"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1967 * to refer to: <machine/xxx.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1968 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1969 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1970 hackname = hp_inline;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1971 files = sys/spinlock.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1972 files = machine/machparam.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1973 select = "[ \t]*#[ \t]*include[ \t]+" '"\.\./machine/';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1974
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1975 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1976 c_fix_arg = "%1<machine/%2.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1977
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1978 c_fix_arg = "([ \t]*#[ \t]*include[ \t]+)" '"\.\./machine/'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1979 '([a-z]+)\.h"';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1980
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1981 test_text = ' # include "../machine/mumble.h"';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1982 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1983
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1984 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1985 * Check for (...) in C++ code in HP/UX sys/file.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1986 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1987 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1988 hackname = hp_sysfile;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1989 files = sys/file.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1990 select = "HPUX_SOURCE";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1991
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1992 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1993 c_fix_arg = "(struct file *, ...)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1994 c_fix_arg = '\(\.\.\.\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1995
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1996 test_text = "extern void foo(...); /* HPUX_SOURCE - bad varargs */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1997 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1998
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1999 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2000 * Un-Hide a series of five FP defines from post-1999 compliance GCC:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2001 * FP_NORMAL, FP_ZERO, FP_INFINITE, FP_SUBNORMAL and FP_NAN
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2002 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2003 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2004 hackname = hppa_hpux_fp_macros;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2005 mach = "hppa*-hp-hpux11*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2006 files = math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2007 select = "#[ \t]*define[ \t]*FP_NORMAL.*\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2008 "#[ \t]*define[ \t]*FP_ZERO.*\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2009 "#[ \t]*define[ \t]*FP_INFINITE.*\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2010 "#[ \t]*define[ \t]*FP_SUBNORMAL.*\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2011 "#[ \t]*define[ \t]*FP_NAN.*\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2012 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2013 c_fix_arg = <<- _EOFix_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2014 #endif /* _INCLUDE_HPUX_SOURCE */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2015
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2016 #if defined(_INCLUDE_HPUX_SOURCE) || \
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2017 (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2018 %0#endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2019
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2020 #ifdef _INCLUDE_HPUX_SOURCE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2021
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2022 _EOFix_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2023
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2024 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2025 "# define FP_NORMAL 0\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2026 "# define FP_ZERO 1\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2027 "# define FP_INFINITE 2\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2028 "# define FP_SUBNORMAL 3\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2029 "# define FP_NAN 4\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2030 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2031
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2032 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2033 * Delete C++ double pow (double, int) inline function from HP-UX 10 & 11
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2034 * math.h to prevent clash with define in c_std/bits/std_cmath.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2035 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2036 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2037 hackname = hpux10_cpp_pow_inline;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2038 files = fixinc-test-limits.h, math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2039 select = <<- END_POW_INLINE
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2040 ^# +ifdef +__cplusplus
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2041 +\}
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2042 +inline +double +pow\(double +__d,int +__expon\) +\{
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2043 [ ]+return +pow\(__d,\(double\)__expon\);
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2044 +\}
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2045 +extern +"C" +\{
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2046 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2047 # +endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2048 END_POW_INLINE;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2049
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2050 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2051 c_fix_arg = "";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2052
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2053 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2054 "# ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2055 " }\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2056 " inline double pow(double __d,int __expon) {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2057 "\t return pow(__d,(double)__expon);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2058 " }\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2059 ' extern "C"' " {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2060 "#else\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2061 "# endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2062 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2063
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2064 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2065 hackname = hpux11_cpp_pow_inline;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2066 files = math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2067 select = " +inline double pow\\(double d,int expon\\) \\{\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2068 " +return pow\\(d, \\(double\\)expon\\);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2069 " +\\}\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2070 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2071 c_fix_arg = "";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2072
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2073 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2074 " inline double pow(double d,int expon) {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2075 " return pow(d, (double)expon);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2076 " }\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2077 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2078
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2079 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2080 * Fix hpux 10.X missing ctype declarations 1
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2081 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2082 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2083 hackname = hpux10_ctype_declarations1;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2084 files = ctype.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2085 select = "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2086 bypass = "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2087 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2088 c_fix_arg = "#ifdef _PROTOTYPES\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2089 "extern int __tolower(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2090 "extern int __toupper(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2091 "#else /* NOT _PROTOTYPES */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2092 "extern int __tolower();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2093 "extern int __toupper();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2094 "#endif /* _PROTOTYPES */\n\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2095 "%0\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2096
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2097 test_text = "# define _toupper(__c) __toupper(__c)\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2098 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2099
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2100 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2101 * Fix hpux 10.X missing ctype declarations 2
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2102 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2103 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2104 hackname = hpux10_ctype_declarations2;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2105 files = ctype.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2106 select = "^# if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2107 bypass = "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2108 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2109 c_fix_arg = "%0\n\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2110 "#ifdef _PROTOTYPES\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2111 " extern int _isalnum(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2112 " extern int _isalpha(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2113 " extern int _iscntrl(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2114 " extern int _isdigit(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2115 " extern int _isgraph(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2116 " extern int _islower(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2117 " extern int _isprint(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2118 " extern int _ispunct(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2119 " extern int _isspace(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2120 " extern int _isupper(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2121 " extern int _isxdigit(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2122 "# else /* not _PROTOTYPES */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2123 " extern int _isalnum();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2124 " extern int _isalpha();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2125 " extern int _iscntrl();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2126 " extern int _isdigit();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2127 " extern int _isgraph();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2128 " extern int _islower();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2129 " extern int _isprint();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2130 " extern int _ispunct();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2131 " extern int _isspace();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2132 " extern int _isupper();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2133 " extern int _isxdigit();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2134 "#endif /* _PROTOTYPES */\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2135
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2136 test_text = "# if defined(_SB_CTYPE_MACROS) && !defined(__lint)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2137 " extern unsigned int *__SB_masks;\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2138 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2139
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2140 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2141 * Fix hpux 10.X missing stdio declarations
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2142 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2143 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2144 hackname = hpux10_stdio_declarations;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2145 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2146 select = "^#[ \t]*define _iob[ \t]*__iob";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2147 bypass = "^[ \t]*extern[ \t]*int[ \t]*vsnprintf[ \t]*\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2148 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2149 c_fix_arg = "%0\n\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2150 "# if defined(__STDC__) || defined(__cplusplus)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2151 " extern int snprintf(char *, size_t, const char *, ...);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2152 " extern int vsnprintf(char *, size_t, const char *, __va_list);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2153 "# else /* not __STDC__) || __cplusplus */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2154 " extern int snprintf();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2155 " extern int vsnprintf();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2156 "# endif /* __STDC__) || __cplusplus */\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2157
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2158 test_text = "# define _iob __iob\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2159 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2160
111
kono
parents: 67
diff changeset
2161 /*
kono
parents: 67
diff changeset
2162 * The HP-UX stddef.h is replaced by gcc's. It doesn't include sys/stdsyms.h.
kono
parents: 67
diff changeset
2163 * As a result, we need to include sys/stdsyms.h in alloca.h.
kono
parents: 67
diff changeset
2164 */
kono
parents: 67
diff changeset
2165 fix = {
kono
parents: 67
diff changeset
2166 hackname = hppa_hpux11_alloca;
kono
parents: 67
diff changeset
2167 mach = "hppa*-*-hpux11*";
kono
parents: 67
diff changeset
2168 files = alloca.h;
kono
parents: 67
diff changeset
2169 select = "#ifndef _STDDEF_INCLUDED";
kono
parents: 67
diff changeset
2170 c_fix = format;
kono
parents: 67
diff changeset
2171 c_fix_arg = "#ifndef _SYS_STDSYMS_INCLUDED\n"
kono
parents: 67
diff changeset
2172 "# include <sys/stdsyms.h>\n"
kono
parents: 67
diff changeset
2173 "#endif /* _SYS_STDSYMS_INCLUDED */\n\n"
kono
parents: 67
diff changeset
2174 "%0";
kono
parents: 67
diff changeset
2175
kono
parents: 67
diff changeset
2176 test_text = "#ifndef _STDDEF_INCLUDED";
kono
parents: 67
diff changeset
2177 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2178
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2179 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2180 * Make sure hpux defines abs in header.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2181 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2182 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2183 hackname = hpux11_abs;
111
kono
parents: 67
diff changeset
2184 mach = "*-hp-hpux11*";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2185 files = stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2186 select = "ifndef _MATH_INCLUDED";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2187 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2188 c_fix_arg = "if !defined(_MATH_INCLUDED) || defined(__GNUG__)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2189 test_text = "#ifndef _MATH_INCLUDED";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2190 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2191
111
kono
parents: 67
diff changeset
2192 /*
kono
parents: 67
diff changeset
2193 * Fix hpux11 __LWP_RWLOCK_VALID define
kono
parents: 67
diff changeset
2194 */
kono
parents: 67
diff changeset
2195 fix = {
kono
parents: 67
diff changeset
2196 hackname = hpux11_lwp_rwlock_valid;
kono
parents: 67
diff changeset
2197 mach = "*-hp-hpux11*";
kono
parents: 67
diff changeset
2198 files = sys/pthread.h;
kono
parents: 67
diff changeset
2199 select = "#define __LWP_RWLOCK_VALID[ \t]*0x8c91";
kono
parents: 67
diff changeset
2200 c_fix = format;
kono
parents: 67
diff changeset
2201 c_fix_arg = "#define __LWP_RWLOCK_VALID -29551";
kono
parents: 67
diff changeset
2202 test_text = "#define __LWP_RWLOCK_VALID 0x8c91";
kono
parents: 67
diff changeset
2203 };
kono
parents: 67
diff changeset
2204
kono
parents: 67
diff changeset
2205 /*
kono
parents: 67
diff changeset
2206 * hpux sendfile()
kono
parents: 67
diff changeset
2207 */
kono
parents: 67
diff changeset
2208 fix = {
kono
parents: 67
diff changeset
2209 hackname = hpux11_extern_sendfile;
kono
parents: 67
diff changeset
2210 mach = "*-hp-hpux11.[12]*";
kono
parents: 67
diff changeset
2211 files = sys/socket.h;
kono
parents: 67
diff changeset
2212 select = "^[ \t]*extern sbsize_t sendfile.*\n.*, int\\)\\);\n";
kono
parents: 67
diff changeset
2213 c_fix = format;
kono
parents: 67
diff changeset
2214 c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n";
kono
parents: 67
diff changeset
2215 test_text = " extern sbsize_t sendfile __((int, int, off_t, bsize_t,\n"
kono
parents: 67
diff changeset
2216 " const struct iovec *, int));\n";
kono
parents: 67
diff changeset
2217 };
kono
parents: 67
diff changeset
2218
kono
parents: 67
diff changeset
2219 /*
kono
parents: 67
diff changeset
2220 * hpux sendpath()
kono
parents: 67
diff changeset
2221 */
kono
parents: 67
diff changeset
2222 fix = {
kono
parents: 67
diff changeset
2223 hackname = hpux11_extern_sendpath;
kono
parents: 67
diff changeset
2224 mach = "*-hp-hpux11.[12]*";
kono
parents: 67
diff changeset
2225 files = sys/socket.h;
kono
parents: 67
diff changeset
2226 select = "^[ \t]*extern sbsize_t sendpath.*\n.*, int\\)\\);\n";
kono
parents: 67
diff changeset
2227 c_fix = format;
kono
parents: 67
diff changeset
2228 c_fix_arg = "#ifndef _APP32_64BIT_OFF_T\n%0#endif\n";
kono
parents: 67
diff changeset
2229 test_text = " extern sbsize_t sendpath __((int, int, off_t, bsize_t,\n"
kono
parents: 67
diff changeset
2230 " const struct iovec *, int));\n";
kono
parents: 67
diff changeset
2231 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2232
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2233 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2234 * Keep HP-UX 11 from stomping on C++ math namespace
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2235 * with defines for fabsf.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2236 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2237 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2238 hackname = hpux11_fabsf;
111
kono
parents: 67
diff changeset
2239 mach = "*-hp-hpux11*";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2240 files = math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2241 select = "^[ \t]*#[ \t]*define[ \t]+fabsf\\(.*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2242
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2243 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2244 c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2245
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2246 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2247 "#ifdef _PA_RISC\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2248 "# define fabsf(x) ((float)fabs((double)(float)(x)))\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2249 "#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2250 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2251
111
kono
parents: 67
diff changeset
2252 /*
kono
parents: 67
diff changeset
2253 * The definitions for PTHREAD_MUTEX_INITIALIZER and similar initializers
kono
parents: 67
diff changeset
2254 * in pthread.h need to be constant expressions to be standard complient.
kono
parents: 67
diff changeset
2255 * As a result, we need to remove the void * casts in the initializers
kono
parents: 67
diff changeset
2256 * (see hpux11_pthread_const) and to change the __(M|C|RW)POINTER defines
kono
parents: 67
diff changeset
2257 * to use the long type.
kono
parents: 67
diff changeset
2258 */
kono
parents: 67
diff changeset
2259 fix = {
kono
parents: 67
diff changeset
2260 hackname = hpux11_pthread_pointer;
kono
parents: 67
diff changeset
2261 mach = "*-hp-hpux11.[0-3]*";
kono
parents: 67
diff changeset
2262 files = sys/pthread.h;
kono
parents: 67
diff changeset
2263 select = "(void[ \t]*\\*)(m|c|rw)(_ptr)";
kono
parents: 67
diff changeset
2264
kono
parents: 67
diff changeset
2265 c_fix = format;
kono
parents: 67
diff changeset
2266 c_fix_arg = "long\t%2%3";
kono
parents: 67
diff changeset
2267 test_text = "#define __MPOINTER\t\tvoid\t *m_ptr";
kono
parents: 67
diff changeset
2268 };
kono
parents: 67
diff changeset
2269
kono
parents: 67
diff changeset
2270 /*
kono
parents: 67
diff changeset
2271 * Remove void pointer cast and fix C99 constant in __POINTER_SET defines.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2272 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2273 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2274 hackname = hpux11_pthread_const;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2275 mach = "*-hp-hpux11.[0-3]*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2276 files = sys/pthread.h;
111
kono
parents: 67
diff changeset
2277 select = "^(#define[ \t]+__POINTER_SET[ \t0,]*)(.*\\))";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2278
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2279 c_fix = format;
111
kono
parents: 67
diff changeset
2280 c_fix_arg = "%11";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2281 test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2282 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2283
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2284 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2285 * Prevent HP-UX 11 from defining __size_t and preventing size_t from
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2286 * being defined by having it define _hpux_size_t instead.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2287 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2288 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2289 hackname = hpux11_size_t;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2290 mach = "*-hp-hpux11*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2291 select = "__size_t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2292
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2293 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2294 c_fix_arg = "_hpux_size_t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2295
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2296 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2297 "#define __size_t size_t\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2298 " extern int getpwuid_r( char *, __size_t, struct passwd **);\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2299 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2300
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2301 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2302 * Fix hpux 11.00 broken snprintf declaration
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2303 * (third argument is char *, needs to be const char * to prevent
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2304 * spurious warnings with -Wwrite-strings or in C++).
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2305 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2306 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2307 hackname = hpux11_snprintf;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2308 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2309 select = '(extern int snprintf *\(char *\*, *(|__|_hpux_)size_t,)'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2310 ' *(char *\*, *\.\.\.\);)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2311 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2312 c_fix_arg = '%1 const %3';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2313
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2314 test_text = "extern int snprintf(char *, size_t, char *, ...);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2315 "extern int snprintf(char *, __size_t, char *, ...);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2316 "extern int snprintf(char *, _hpux_size_t, char *, ...);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2317 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2318
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2319 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2320 * Fix hpux 11.00 broken vsnprintf declaration
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2321 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2322 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2323 hackname = hpux11_vsnprintf;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2324 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2325 select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, '
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2326 'const char \*,) __va__list\);';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2327 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2328 c_fix_arg = "%1 __va_list);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2329
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2330 test_text = 'extern int vsnprintf(char *, _hpux_size_t, const char *,'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2331 ' __va__list);';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2332 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2333
111
kono
parents: 67
diff changeset
2334 /*
kono
parents: 67
diff changeset
2335 * Fix missing const in hpux vsscanf declaration
kono
parents: 67
diff changeset
2336 */
kono
parents: 67
diff changeset
2337 fix = {
kono
parents: 67
diff changeset
2338 hackname = hpux_vsscanf;
kono
parents: 67
diff changeset
2339 mach = "*-*-hpux*";
kono
parents: 67
diff changeset
2340 files = stdio.h;
kono
parents: 67
diff changeset
2341 select = '(extern int vsscanf\()char';
kono
parents: 67
diff changeset
2342 c_fix = format;
kono
parents: 67
diff changeset
2343 c_fix_arg = "%1const char";
kono
parents: 67
diff changeset
2344
kono
parents: 67
diff changeset
2345 test_text = 'extern int vsscanf(char *, const char *, __va_list);';
kono
parents: 67
diff changeset
2346 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2347
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2348 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2349 * get rid of bogus inline definitions in HP-UX 8.0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2350 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2351 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2352 hackname = hpux8_bogus_inlines;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2353 files = math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2354 select = inline;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2355 bypass = "__GNUG__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2356 sed = "s@inline int abs(int [a-z][a-z]*) {.*}"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2357 "@extern \"C\" int abs(int);@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2358 sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2359 sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2360 sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2361 test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2362 "inline double sqr(double v) { return v**0.5; }";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2363 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2364
111
kono
parents: 67
diff changeset
2365 /*
kono
parents: 67
diff changeset
2366 * hpux intptr
kono
parents: 67
diff changeset
2367 */
kono
parents: 67
diff changeset
2368 fix = {
kono
parents: 67
diff changeset
2369 hackname = hpux_c99_intptr;
kono
parents: 67
diff changeset
2370 mach = "*-hp-hpux11.3*";
kono
parents: 67
diff changeset
2371 files = stdint-hpux11.h, stdint.h;
kono
parents: 67
diff changeset
2372 sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MAX[ \t]*"
kono
parents: 67
diff changeset
2373 "INT32_MAX[ \t]*$@#define PTRDIFF_MAX (2147483647l)@";
kono
parents: 67
diff changeset
2374 sed = "s@^[ \t]*#[ \t]*define[ \t]*PTRDIFF_MIN[ \t]*"
kono
parents: 67
diff changeset
2375 "INT32_MIN[ \t]*$@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@";
kono
parents: 67
diff changeset
2376 sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MAX[ \t]*"
kono
parents: 67
diff changeset
2377 "INT32_MAX[ \t]*$@#define INTPTR_MAX (2147483647l)@";
kono
parents: 67
diff changeset
2378 sed = "s@^[ \t]*#[ \t]*define[ \t]*INTPTR_MIN[ \t]*"
kono
parents: 67
diff changeset
2379 "INT32_MIN[ \t]*$@#define INTPTR_MIN (-INTPTR_MAX - 1)@";
kono
parents: 67
diff changeset
2380 sed = "s@^[ \t]*#[ \t]*define[ \t]*UINTPTR_MAX[ \t]*"
kono
parents: 67
diff changeset
2381 "UINT32_MAX[ \t]*$@#define UINTPTR_MAX (4294967295ul)@";
kono
parents: 67
diff changeset
2382 sed = "s@^[ \t]*#[ \t]*define[ \t]*SIZE_MAX[ \t]*"
kono
parents: 67
diff changeset
2383 "UINT32_MAX[ \t]*$@#define SIZE_MAX (4294967295ul)@";
kono
parents: 67
diff changeset
2384 test_text = "#define PTRDIFF_MAX INT32_MAX\n"
kono
parents: 67
diff changeset
2385 "#define PTRDIFF_MIN INT32_MIN\n"
kono
parents: 67
diff changeset
2386 "#define INTPTR_MAX INT32_MAX\n"
kono
parents: 67
diff changeset
2387 "#define INTPTR_MIN INT32_MIN\n"
kono
parents: 67
diff changeset
2388 "#define UINTPTR_MAX UINT32_MAX\n"
kono
parents: 67
diff changeset
2389 "#define SIZE_MAX UINT32_MAX\n";
kono
parents: 67
diff changeset
2390 };
kono
parents: 67
diff changeset
2391
kono
parents: 67
diff changeset
2392 /*
kono
parents: 67
diff changeset
2393 * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
kono
parents: 67
diff changeset
2394 */
kono
parents: 67
diff changeset
2395 fix = {
kono
parents: 67
diff changeset
2396 hackname = hpux_c99_inttypes;
kono
parents: 67
diff changeset
2397 mach = "*-hp-hpux11.[23]*";
kono
parents: 67
diff changeset
2398 files = inttypes.h;
kono
parents: 67
diff changeset
2399 files = stdint-hpux11.h, stdint.h;
kono
parents: 67
diff changeset
2400 sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*"
kono
parents: 67
diff changeset
2401 "__CONCAT_U__(__c)[ \t]*$@#define UINT8_C(__c) (__c)@";
kono
parents: 67
diff changeset
2402 sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*"
kono
parents: 67
diff changeset
2403 "__CONCAT_U__(__c)[ \t]*$@#define UINT16_C(__c) (__c)@";
kono
parents: 67
diff changeset
2404 sed = "s@^[ \t]*#[ \t]*define[ \t]*INT32_C(__c)[ \t]*"
kono
parents: 67
diff changeset
2405 "__CONCAT__(__c,l)[ \t]*$@#define INT32_C(__c) (__c)@";
kono
parents: 67
diff changeset
2406 sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT32_C(__c)[ \t].*$@"
kono
parents: 67
diff changeset
2407 "#define UINT32_C(__c) __CONCAT__(__c,u)@";
kono
parents: 67
diff changeset
2408 test_text = "#define UINT8_C(__c) __CONCAT_U__(__c)\n"
kono
parents: 67
diff changeset
2409 "#define UINT16_C(__c) __CONCAT_U__(__c)\n"
kono
parents: 67
diff changeset
2410 "#define INT32_C(__c) __CONCAT__(__c,l)\n"
kono
parents: 67
diff changeset
2411 "#define UINT32_C(__c) __CONCAT__(__c,ul)\n";
kono
parents: 67
diff changeset
2412 };
kono
parents: 67
diff changeset
2413
kono
parents: 67
diff changeset
2414 /*
kono
parents: 67
diff changeset
2415 * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
kono
parents: 67
diff changeset
2416 */
kono
parents: 67
diff changeset
2417 fix = {
kono
parents: 67
diff changeset
2418 hackname = hpux_c99_inttypes2;
kono
parents: 67
diff changeset
2419 mach = "*-hp-hpux11.2*";
kono
parents: 67
diff changeset
2420 files = stdint-hpux11.h, stdint.h;
kono
parents: 67
diff changeset
2421 sed = "s@^[ \t]*#[ \t]*define[ \t]*INT8_C(__c)[ \t]*"
kono
parents: 67
diff changeset
2422 "((signed char)(__c))[ \t]*$@#define INT8_C(__c) (__c)@";
kono
parents: 67
diff changeset
2423 sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT8_C(__c)[ \t]*"
kono
parents: 67
diff changeset
2424 "((unsigned char)(__c))[ \t]*$@#define UINT8_C(__c) (__c)@";
kono
parents: 67
diff changeset
2425 sed = "s@^[ \t]*#[ \t]*define[ \t]*INT16_C(__c)[ \t]*"
kono
parents: 67
diff changeset
2426 "((short)(__c))[ \t]*$@#define INT16_C(__c) (__c)@";
kono
parents: 67
diff changeset
2427 sed = "s@^[ \t]*#[ \t]*define[ \t]*UINT16_C(__c)[ \t]*"
kono
parents: 67
diff changeset
2428 "((unsigned short)(__c))[ \t]*$@#define UINT16_C(__c) (__c)@";
kono
parents: 67
diff changeset
2429 test_text = "# define INT8_C(__c) ((signed char)(__c))\n"
kono
parents: 67
diff changeset
2430 "# define UINT8_C(__c) ((unsigned char)(__c))\n"
kono
parents: 67
diff changeset
2431 "# define INT16_C(__c) ((short)(__c))\n"
kono
parents: 67
diff changeset
2432 "# define UINT16_C(__c) ((unsigned short)(__c))\n";
kono
parents: 67
diff changeset
2433 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2434
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2435 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2436 * Fix hpux broken ctype macros
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2437 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2438 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2439 hackname = hpux_ctype_macros;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2440 files = ctype.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2441 select = '((: |\()__SB_masks \? )'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2442 '(__SB_masks\[__(alnum|c)\] & _IS)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2443 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2444 c_fix_arg = "%1(int)%3";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2445
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2446 test_text = ": __SB_masks ? __SB_masks[__alnum] & _ISCNTRL\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2447 "# define isalpha(__c) (__SB_masks ? __SB_masks[__c] & _IS\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2448 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2449
111
kono
parents: 67
diff changeset
2450 /*
kono
parents: 67
diff changeset
2451 * hpux errno()
kono
parents: 67
diff changeset
2452 */
kono
parents: 67
diff changeset
2453 fix = {
kono
parents: 67
diff changeset
2454 hackname = hpux_extern_errno;
kono
parents: 67
diff changeset
2455 mach = "*-hp-hpux10.*";
kono
parents: 67
diff changeset
2456 mach = "*-hp-hpux11.[0-2]*";
kono
parents: 67
diff changeset
2457 files = errno.h;
kono
parents: 67
diff changeset
2458 select = "^[ \t]*extern int errno;$";
kono
parents: 67
diff changeset
2459 c_fix = format;
kono
parents: 67
diff changeset
2460 c_fix_arg = "#ifdef __cplusplus\n"
kono
parents: 67
diff changeset
2461 "extern \"C\" {\n"
kono
parents: 67
diff changeset
2462 "#endif\n"
kono
parents: 67
diff changeset
2463 "%0\n"
kono
parents: 67
diff changeset
2464 "#ifdef __cplusplus\n"
kono
parents: 67
diff changeset
2465 "}\n"
kono
parents: 67
diff changeset
2466 "#endif";
kono
parents: 67
diff changeset
2467 test_text = " extern int errno;\n";
kono
parents: 67
diff changeset
2468 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2469
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2470 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2471 * Fix hpux broken #ifndef _XOPEN_SOURCE_EXTENDED conditional on htonl etc.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2472 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2473 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2474 hackname = hpux_htonl;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2475 files = netinet/in.h;
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
2476 select = "#ifndef _XOPEN_SOURCE_EXTENDED[ \t]*\n"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2477 "(/\\*\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2478 " \\* Macros for number representation conversion\\.\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2479 " \\*/\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2480 "#ifndef ntohl)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2481 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2482 c_fix_arg = "#if 1\n%1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2483
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2484 test_text = "#ifndef _XOPEN_SOURCE_EXTENDED\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2485 "/*\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2486 " * Macros for number representation conversion.\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2487 " */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2488 "#ifndef ntohl\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2489 "#define ntohl(x) (x)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2490 "#define ntohs(x) (x)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2491 "#define htonl(x) (x)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2492 "#define htons(x) (x)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2493 "#endif\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2494 "#endif /* ! _XOPEN_SOURCE_EXTENDED */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2495 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2496
111
kono
parents: 67
diff changeset
2497 /*
kono
parents: 67
diff changeset
2498 * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
kono
parents: 67
diff changeset
2499 */
kono
parents: 67
diff changeset
2500 fix = {
kono
parents: 67
diff changeset
2501 hackname = hpux_imaginary_i;
kono
parents: 67
diff changeset
2502 mach = "ia64-hp-hpux11.*";
kono
parents: 67
diff changeset
2503 files = complex.h;
kono
parents: 67
diff changeset
2504 select = "^[ \t]*#[ \t]*define[ \t]*_Complex_I.*";
kono
parents: 67
diff changeset
2505 c_fix = format;
kono
parents: 67
diff changeset
2506 c_fix_arg = "#define _Complex_I (__extension__ 1.0iF)";
kono
parents: 67
diff changeset
2507 test_text = "#define _Complex_I (0.f+_Imaginary_I)\n";
kono
parents: 67
diff changeset
2508 };
kono
parents: 67
diff changeset
2509
kono
parents: 67
diff changeset
2510 /*
kono
parents: 67
diff changeset
2511 * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
kono
parents: 67
diff changeset
2512 */
kono
parents: 67
diff changeset
2513 fix = {
kono
parents: 67
diff changeset
2514 hackname = hpux_inttype_int8_t;
kono
parents: 67
diff changeset
2515 mach = "*-hp-hpux1[01].*";
kono
parents: 67
diff changeset
2516 files = sys/_inttypes.h;
kono
parents: 67
diff changeset
2517 select = "^[ \t]*typedef[ \t]*char[ \t]*int(_least){0,1}8_t.*";
kono
parents: 67
diff changeset
2518 c_fix = format;
kono
parents: 67
diff changeset
2519 c_fix_arg = "typedef signed char int%18_t;";
kono
parents: 67
diff changeset
2520 test_text = "typedef char int_least8_t;\n"
kono
parents: 67
diff changeset
2521 "typedef char int8_t;\n";
kono
parents: 67
diff changeset
2522 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2523
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2524 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2525 * HP-UX long_double
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2526 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2527 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2528 hackname = hpux_long_double;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2529 mach = "*-*-hpux10*";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2530 mach = "*-*-hpux11.[012]*";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2531 files = stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2532 select = "extern[ \t]long_double[ \t]strtold";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2533 bypass = "long_double_t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2534 sed = "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2535 sed = "s/long_double/long double/g";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2536
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2537 test_text = "# ifndef _LONG_DOUBLE\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2538 "# define _LONG_DOUBLE\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2539 " typedef struct {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2540 " unsigned int word1, word2, word3, word4;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2541 " } long_double;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2542 "# endif /* _LONG_DOUBLE */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2543 "extern long_double strtold(const char *, char **);\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2544 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2545
111
kono
parents: 67
diff changeset
2546 /*
kono
parents: 67
diff changeset
2547 * We cannot use the above rule on 11.31 because it removes the strtold
kono
parents: 67
diff changeset
2548 * definition. ia64 is OK with no hack, PA needs some help.
kono
parents: 67
diff changeset
2549 */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2550 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2551 hackname = hpux_long_double_2;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2552 mach = "hppa*-*-hpux11.3*";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2553 files = stdlib.h;
111
kono
parents: 67
diff changeset
2554 select = "#[ \t]*if[ \t]*!defined\\(__ia64\\) \\|\\| "
kono
parents: 67
diff changeset
2555 "defined\\(_PROTOTYPES\\) \\|\\| "
kono
parents: 67
diff changeset
2556 "defined\\(_LONG_DOUBLE_STRUCT\\)";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2557 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2558 c_fix_arg = "# if !defined(_PROTOTYPES) || defined(_LONG_DOUBLE_STRUCT)";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2559
111
kono
parents: 67
diff changeset
2560 test_text = "# if !defined(__ia64) || "
kono
parents: 67
diff changeset
2561 "!defined(_PROTOTYPES) || "
kono
parents: 67
diff changeset
2562 "defined(_LONG_DOUBLE_STRUCT)\n";
kono
parents: 67
diff changeset
2563 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2564
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2565 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2566 * Add missing braces to pthread initializer defines.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2567 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2568 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2569 hackname = hpux_pthread_initializers;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2570 mach = "*-hp-hpux11.[0-3]*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2571 files = sys/pthread.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2572 sed = "s@^[ \t]*1, 1, 1, 1,[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2573 "@\t{ 1, 1, 1, 1 },\t\t\t\t\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2574 sed = "s@^[ \t]*1,[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2575 "@\t{ 1, 0 }@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2576 sed = "/^[ \t]*0$/d";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2577 sed = "s@__PTHREAD_MUTEX_VALID, 0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2578 "@{ __PTHREAD_MUTEX_VALID, 0 }@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2579 sed = "s@^[ \t]*0, 0, -1, 0,[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2580 "@\t{ 0, 0, -1, 0 },\t\t\t\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2581 sed = "s@0, __LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2582 "@{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2583 sed = "s@^[ \t]*__LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2584 "@\t{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2585 sed = "s@^[ \t]*0, 0[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2586 "@\t{ 0, 0 }\t\t\t\t\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2587 sed = "s@__PTHREAD_COND_VALID, 0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2588 "@{ __PTHREAD_COND_VALID, 0 }@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2589 sed = "s@__LWP_COND_VALID, 0,[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2590 "@{ __LWP_COND_VALID, 0 },\t\t\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2591 sed = "s@__PTHREAD_RWLOCK_VALID, 0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2592 "@{ __PTHREAD_RWLOCK_VALID, 0 }@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2593 sed = "s@__LWP_RWLOCK_VALID, 0,[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2594 "@{ __LWP_RWLOCK_VALID, 0 },\t\t\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2595 sed = "s@^[ \t]*0, 0, 0, 0, 0, 0, 0[ \t]*\\\\"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2596 "@\t{ 0, 0, 0, 0, 0 }, { 0, 0}\t\t\t\t\t\\\\@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2597 test_text = "#define PTHREAD_MUTEX_INITIALIZER {\t\t\t\t\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2598 "\t__PTHREAD_MUTEX_VALID, 0,\t\t\t\t\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2599 "\t(PTHREAD_MUTEX_DEFAULT | PTHREAD_PROCESS_PRIVATE),\t\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2600 "\t__SPNLCK_INITIALIZER,\t\t\t\t\t\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2601 "\t0, 0, -1, 0,\t\t\t\t\t\t\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2602 "\t0, __LWP_MTX_VALID, 0, 1, 1, 1, 1,\t\t\t\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2603 "\t0, 0\t\t\t\t\t\t\t\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2604 "}\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2605 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2606
111
kono
parents: 67
diff changeset
2607 /*
kono
parents: 67
diff changeset
2608 * Wrap spu_info in ifdef _KERNEL. GCC cannot handle an array of unknown
kono
parents: 67
diff changeset
2609 * type and mpinfou is only defined when _KERNEL is set.
kono
parents: 67
diff changeset
2610 */
kono
parents: 67
diff changeset
2611 fix = {
kono
parents: 67
diff changeset
2612 hackname = hpux_spu_info;
kono
parents: 67
diff changeset
2613 mach = "*-hp-hpux*";
kono
parents: 67
diff changeset
2614 /*
kono
parents: 67
diff changeset
2615 * It is tempting to omit the first "files" entry. Do not.
kono
parents: 67
diff changeset
2616 * The testing machinery will take the first "files" entry as the name
kono
parents: 67
diff changeset
2617 * of a test file to play with. It would be a nuisance to have a directory
kono
parents: 67
diff changeset
2618 * with the name "*".
kono
parents: 67
diff changeset
2619 */
kono
parents: 67
diff changeset
2620 files = "ia64/sys/getppdp.h";
kono
parents: 67
diff changeset
2621 files = "*/sys/getppdp.h";
kono
parents: 67
diff changeset
2622 select = "^.*extern.*spu_info.*";
kono
parents: 67
diff changeset
2623
kono
parents: 67
diff changeset
2624 c_fix = format;
kono
parents: 67
diff changeset
2625 c_fix_arg = "#ifdef _KERNEL\n%0\n#endif";
kono
parents: 67
diff changeset
2626
kono
parents: 67
diff changeset
2627 test_text = "extern union mpinfou spu_info[];";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2628 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2629
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2630 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2631 * These hacks are need in inttypes.h on 11.23 and in stdint.h on 11.31.
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2632 */
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2633 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2634 hackname = hpux_stdint_least_fast;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2635 mach = "*-hp-hpux11.2*";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
2636 files = stdint-hpux11.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2637 select =
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2638 "^[ \t]*#[ \t]*define[ \t]+UINT_(LEAST|FAST)64_MAX[ \t]+ULLONG_MAX";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2639 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2640 c-fix-arg = "# define UINT_%164_MAX __UINT64_MAX__";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2641 test-text = "# define UINT_FAST64_MAX ULLONG_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2642 "# define UINT_LEAST64_MAX ULLONG_MAX\n";
111
kono
parents: 67
diff changeset
2643 };
kono
parents: 67
diff changeset
2644
kono
parents: 67
diff changeset
2645 /*
kono
parents: 67
diff changeset
2646 * Add noreturn attribute to longjmp declarations in hpux <setjmp.h>
kono
parents: 67
diff changeset
2647 */
kono
parents: 67
diff changeset
2648 fix = {
kono
parents: 67
diff changeset
2649 hackname = hpux_longjmp;
kono
parents: 67
diff changeset
2650 mach = "*-hp-hpux*";
kono
parents: 67
diff changeset
2651 files = setjmp.h;
kono
parents: 67
diff changeset
2652 select = "^[ \t]*extern[ \t]+void[ \t]+.*longjmp[ \t]*\(__\\(\\(.*int\\)\\)|\\(.*int\\)|\\(\\)\)";
kono
parents: 67
diff changeset
2653
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2654 c_fix = format;
111
kono
parents: 67
diff changeset
2655 c_fix_arg = "%0 __attribute__ ((__noreturn__))";
kono
parents: 67
diff changeset
2656
kono
parents: 67
diff changeset
2657 test_text = 'extern void longjmp __((jmp_buf, int));';
kono
parents: 67
diff changeset
2658 };
kono
parents: 67
diff changeset
2659
kono
parents: 67
diff changeset
2660 /*
kono
parents: 67
diff changeset
2661 * Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
kono
parents: 67
diff changeset
2662 */
kono
parents: 67
diff changeset
2663 fix = {
kono
parents: 67
diff changeset
2664 hackname = hpux_systime;
kono
parents: 67
diff changeset
2665 files = sys/time.h;
kono
parents: 67
diff changeset
2666 select = "^extern struct sigevent;";
kono
parents: 67
diff changeset
2667
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2668 c_fix = format;
111
kono
parents: 67
diff changeset
2669 c_fix_arg = "struct sigevent;";
kono
parents: 67
diff changeset
2670
kono
parents: 67
diff changeset
2671 test_text = 'extern struct sigevent;';
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2672 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2673
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2674 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2675 * Fix glibc definition of HUGE_VAL in terms of hex floating point constant
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2676 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2677 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2678 hackname = huge_val_hex;
111
kono
parents: 67
diff changeset
2679 files = bits/huge_val.h, '*/bits/huge_val.h';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2680 select = "^#[ \t]*define[ \t]*HUGE_VAL[ \t].*0x1\\.0p.*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2681 bypass = "__builtin_huge_val";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2682
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2683 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2684 c_fix_arg = "#define HUGE_VAL (__builtin_huge_val())\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2685
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2686 test_text = "# define HUGE_VAL\t(__extension__ 0x1.0p2047)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2687 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2688
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2689 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2690 * Fix glibc definition of HUGE_VALF in terms of hex floating point constant
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2691 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2692 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2693 hackname = huge_valf_hex;
111
kono
parents: 67
diff changeset
2694 files = bits/huge_val.h, '*/bits/huge_val.h';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2695 select = "^#[ \t]*define[ \t]*HUGE_VALF[ \t].*0x1\\.0p.*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2696 bypass = "__builtin_huge_valf";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2697
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2698 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2699 c_fix_arg = "#define HUGE_VALF (__builtin_huge_valf())\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2700
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2701 test_text = "# define HUGE_VALF (__extension__ 0x1.0p255f)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2702 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2703
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2704 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2705 * Fix glibc definition of HUGE_VALL in terms of hex floating point constant
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2706 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2707 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2708 hackname = huge_vall_hex;
111
kono
parents: 67
diff changeset
2709 files = bits/huge_val.h, '*/bits/huge_val.h';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2710 select = "^#[ \t]*define[ \t]*HUGE_VALL[ \t].*0x1\\.0p.*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2711 bypass = "__builtin_huge_vall";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2712
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2713 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2714 c_fix_arg = "#define HUGE_VALL (__builtin_huge_vall())\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2715
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2716 test_text = "# define HUGE_VALL (__extension__ 0x1.0p32767L)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2717 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2718
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2719 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2720 * Fix return type of abort and free
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2721 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2722 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2723 hackname = int_abort_free_and_exit;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2724 files = stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2725 select = "int[ \t]+(abort|free|exit)[ \t]*\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2726 bypass = "_CLASSIC_ANSI_TYPES";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2727
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2728 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2729 c_fix_arg = "void\t%1(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2730
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2731 test_text = "extern int abort(int);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2732 "extern int free(void*);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2733 "extern int exit(void*);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2734 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2735
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2736 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2737 * Fix various macros used to define ioctl numbers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2738 * The traditional syntax was:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2739 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2740 * #define _IO(n, x) (('n'<<8)+x)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2741 * #define TIOCFOO _IO(T, 1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2742 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2743 * but this does not work with the C standard, which disallows macro
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2744 * expansion inside strings. We have to rewrite it thus:
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2745 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2746 * #define _IO(n, x) ((n<<8)+x)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2747 * #define TIOCFOO _IO('T', 1)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2748 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2749 * The select expressions match too much, but the c_fix code is cautious.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2750 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2751 * _IO might be: _IO DESIO BSD43__IO with W, R, WR, C, ... suffixes.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2752 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2753 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2754 hackname = io_quotes_def;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2755 select = "define[ \t]+[A-Z0-9_]+IO[A-Z]*\\([a-zA-Z][,)]";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2756 c_fix = char_macro_def;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2757 c_fix_arg = "IO";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2758 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2759 "#define BSD43__IOWR(n, x) (('n'<<8)+x)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2760 "#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2761 "#define _IO(x,y) ('x'<<8|y)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2762 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2763 "#define XX_IO(x) ('x'<<8|256)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2764 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2765
111
kono
parents: 67
diff changeset
2766 /*
kono
parents: 67
diff changeset
2767 * Fix the usage of the ioctl macro numbers.
kono
parents: 67
diff changeset
2768 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2769 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2770 hackname = io_quotes_use;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2771 select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2772 "\\( *[^,']";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2773 c_fix = char_macro_use;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2774 c_fix_arg = "IO";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2775 test_text = "#define TIOCFOO BSD43__IOWR(T, 1)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2776 "#define TIOCFOO \\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2777 "BSD43__IOWR(T, 1) /* Some are multi-line */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2778 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2779
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2780 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2781 * Check for missing ';' in struct
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2782 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2783 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2784 hackname = ip_missing_semi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2785 files = netinet/ip.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2786 select = "}$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2787 sed = "/^struct/,/^};/s/}$/};/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2788 test_text=
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2789 "struct mumble {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2790 " union {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2791 " int x;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2792 " }\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2793 "}; /* mumbled struct */\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2794 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2795
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2796 /*
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2797 * Non-traditional "const" declaration in Irix's limits.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2798 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2799 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2800 hackname = irix_limits_const;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2801 files = fixinc-test-limits.h, limits.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2802 select = "^extern const ";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2803 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2804 c_fix_arg = "extern __const ";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2805 test_text = "extern const char limit; /* test limits */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2806 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2807
111
kono
parents: 67
diff changeset
2808 /*
kono
parents: 67
diff changeset
2809 * IRIX 5.x's stdio.h declares some functions that take a va_list as
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2810 * taking char *. However, GCC uses void * for va_list, so
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2811 * calling vfprintf with a va_list fails in C++. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2812 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2813 hackname = irix_stdio_va_list;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2814 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2815
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2816 select = '/\* va_list \*/ char \*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2817 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2818 c_fix_arg = "__gnuc_va_list";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2819 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2820 "extern int printf( const char *, /* va_list */ char * );";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2821 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2822
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2823 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2824 * These files in Sun OS 4.x and ARM/RISCiX and BSD4.3
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2825 * use / * * / to concatenate tokens.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2826 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2827 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2828 hackname = kandr_concat;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2829 files = "sparc/asm_linkage.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2830 files = "sun*/asm_linkage.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2831 files = "arm/as_support.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2832 files = "arm/mc_type.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2833 files = "arm/xcb.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2834 files = "dev/chardefmac.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2835 files = "dev/ps_irq.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2836 files = "dev/screen.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2837 files = "dev/scsi.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2838 files = "sys/tty.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2839 files = "Xm.acorn/XmP.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2840 files = bsd43/bsd43_.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2841 select = '/\*\*/';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2842 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2843 c_fix_arg = '##';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2844 test_text = "#define __CONCAT__(a,b) a/**/b";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2845 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2846
111
kono
parents: 67
diff changeset
2847 /*
kono
parents: 67
diff changeset
2848 * The /usr/include/sys/ucontext.h on ia64-*linux-gnu systems defines
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2849 * an _SC_GR0_OFFSET macro using an idiom that isn't a compile time
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2850 * constant on recent versions of g++.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2851 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2852 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2853 hackname = linux_ia64_ucontext;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2854 files = "sys/ucontext.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2855 mach = "ia64-*-linux*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2856 select = '\(\(\(char \*\) &\(\(struct sigcontext \*\) 0\)'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2857 '->sc_gr\[0\]\) - \(char \*\) 0\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2858 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2859 c_fix_arg = "__builtin_offsetof \(struct sigcontext, sc_gr[0]\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2860 test_text = "# define _SC_GR0_OFFSET\t\\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2861 "\t(((char *) &((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2862 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2863
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2864 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2865 * Remove header file warning from sys/time.h. Autoconf's
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2866 * AC_HEADER_TIME recommends to include both sys/time.h and time.h
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2867 * which causes warning on LynxOS. Remove the warning.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2868 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2869 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2870 hackname = lynxos_no_warning_in_sys_time_h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2871 files = sys/time.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2872 select = "#warning[ \t]+Using <time.h> instead of <sys/time.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2873 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2874 c_fix_arg = "";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2875 test_text = "#warning Using <time.h> instead of <sys/time.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2876 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2877
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2878 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2879 * Add missing declaration for putenv.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2880 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2881 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2882 hackname = lynxos_missing_putenv;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2883 mach = '*-*-lynxos*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2884 files = stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2885 bypass = 'putenv[ \t]*\\(';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2886 select = "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2887 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2888 c_fix_arg = "%0\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2889 "extern int putenv _AP((char *));";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2890 c_fix_arg = "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2891 test_text = "extern char *getenv _AP((const char *));";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2892 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2893
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2894 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2895 * Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2896 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2897 * On NetBSD, machine is a symbolic link to an architecture specific
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2898 * directory name, so we can't match a specific file name here.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2899 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2900 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2901 hackname = machine_ansi_h_va_list;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2902 select = "define[ \t]+_BSD_VA_LIST_[ \t]";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2903 bypass = '__builtin_va_list';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2904
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2905 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2906 c_fix_arg = "%1__builtin_va_list";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2907 c_fix_arg = "(define[ \t]+_BSD_VA_LIST_[ \t]+).*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2908
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2909 test_text = " # define _BSD_VA_LIST_\tchar**";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2910 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2911
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2912 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2913 * Fix non-ansi machine name defines
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2914 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2915 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2916 hackname = machine_name;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2917 c_test = machine_name;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2918 c_fix = machine_name;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2919
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2920 test_text = "/* MACH_DIFF: */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2921 "#if defined( i386 ) || defined( sparc ) || defined( vax )"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2922 "\n/* no uniform test, so be careful :-) */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2923 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2924
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2925 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2926 * Some math.h files define struct exception (it's in the System V
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2927 * Interface Definition), which conflicts with the class exception defined
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2928 * in the C++ file std/stdexcept.h. We redefine it to __math_exception.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2929 * This is not a great fix, but I haven't been able to think of anything
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
2930 * better.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2931 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2932 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2933 hackname = math_exception;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2934 files = math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2935 select = "struct exception";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2936 /*
111
kono
parents: 67
diff changeset
2937 * This should be bypassed on __cplusplus, but some supposedly C++
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2938 * aware headers, such as Solaris 8 and 9, don't wrap their struct
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2939 * exception either. So currently we bypass only for glibc, based on a
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2940 * comment in the fixed glibc header. Ick.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2941 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2942 bypass = 'We have a problem when using C\+\+|for C\+\+, '
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2943 '_[a-z0-9A-Z_]+_exception; for C, exception';
111
kono
parents: 67
diff changeset
2944 /* The Solaris 10 headers already get this right. */
kono
parents: 67
diff changeset
2945 mach = '*-*-solaris2.1[0-9]*';
kono
parents: 67
diff changeset
2946 not_machine = true;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2947 c_fix = wrap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2948
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2949 c_fix_arg = "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2950 "#define exception __math_exception\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2951 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2952
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2953 c_fix_arg = "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2954 "#undef exception\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2955 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2956
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2957 test_text = "typedef struct exception t_math_exception;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2958 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2959
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2960 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2961 * This looks pretty broken to me. ``dbl_max_def'' will contain
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2962 * "define DBL_MAX " at the start, when what we really want is just
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2963 * the value portion. Can't figure out how to write a test case
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2964 * for this either :-(
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2965 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2966 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2967 hackname = math_huge_val_from_dbl_max;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2968 files = math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2969
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2970 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2971 * IF HUGE_VAL is defined to be DBL_MAX *and* DBL_MAX is _not_ defined
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2972 * in math.h, this fix applies.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2973 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2974 select = "define[ \t]+HUGE_VAL[ \t]+DBL_MAX";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2975 bypass = "define[ \t]+DBL_MAX";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2976
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2977 shell =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2978 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2979 * See if we have a definition for DBL_MAX in float.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2980 * If we do, we will replace the one in math.h with that one.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2981 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2982
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2983 "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h "
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2984 "| sed 's/.*DBL_MAX[ \t]*//' 2>/dev/null`\n\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2985
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2986 "\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2987 "\tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2988 "s@DBL_MAX@'\"$dbl_max_def@\"\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2989 "\telse cat\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2990 "\tfi";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2991
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2992 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2993 "`echo '#define DBL_MAX\t3.1415e+9 /* really big */' >> float.h`\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2994 "#define HUGE_VAL DBL_MAX";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2995 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2996
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2997 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2998 * nested comment
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2999 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3000 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3001 hackname = nested_auth_des;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3002 files = rpc/rpc.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3003 select = '(/\*.*rpc/auth_des\.h>.*)/\*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3004 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3005 c_fix_arg = "%1*/ /*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3006 test_text = "/*#include <rpc/auth_des.h> /* skip this */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3007 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3008
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3009 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3010 * Some versions of NetBSD don't expect the C99 inline semantics.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3011 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3012 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3013 hackname = netbsd_c99_inline_1;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3014 mach = "*-*-netbsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3015 files = signal.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3016 select = "extern __inline int";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3017
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3018 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3019 c_fix_arg = "extern\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3020 "#ifdef __GNUC_STDC_INLINE__\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3021 "__attribute__((__gnu_inline__))\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3022 "#endif\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3023 "__inline int";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3024
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3025 test_text = "extern __inline int\nsigaddset(sigset_t *set, int signo)\n{}";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3026 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3027
111
kono
parents: 67
diff changeset
3028 /*
kono
parents: 67
diff changeset
3029 * netbsd_c99_inline_2
kono
parents: 67
diff changeset
3030 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3031 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3032 hackname = netbsd_c99_inline_2;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3033 mach = "*-*-netbsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3034 files = signal.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3035 select = "#define _SIGINLINE extern __inline";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3036
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3037 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3038 c_fix_arg = <<- _EOArg_
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3039 #ifdef __GNUC_STDC_INLINE__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3040 #define _SIGINLINE extern __attribute__((__gnu_inline__)) __inline
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3041 #else
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3042 %0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3043 #endif
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3044 _EOArg_;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3045
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3046 test_text = "#define _SIGINLINE extern __inline";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3047 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3048
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3049 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3050 * NetBSD has a semicolon after the ending '}' for some extern "C".
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3051 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3052 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3053 hackname = netbsd_extra_semicolon;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3054 mach = "*-*-netbsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3055 files = sys/cdefs.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3056 select = "#define[ \t]*__END_DECLS[ \t]*};";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3057
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3058 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3059 c_fix_arg = "#define __END_DECLS }";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3060
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3061 test_text = "#define __END_DECLS };";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3062 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3063
111
kono
parents: 67
diff changeset
3064 /*
kono
parents: 67
diff changeset
3065 * newlib's stdint.h has several failures to conform to C99. The fix
kono
parents: 67
diff changeset
3066 * for these removed a comment that can be matched to identify unfixed
kono
parents: 67
diff changeset
3067 * versions.
kono
parents: 67
diff changeset
3068 */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3069 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3070 hackname = newlib_stdint_1;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3071 files = stdint-newlib.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3072 select = "@todo - Add support for wint_t types";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3073 sed = "s@#define INT32_MIN.*@#define INT32_MIN (-INT32_MAX - 1)@";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3074 sed = "s@#define INT32_MAX.*@#define INT32_MAX __INT32_MAX__@";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3075 sed = "s@#define UINT32_MAX.*@#define UINT32_MAX __UINT32_MAX__@";
111
kono
parents: 67
diff changeset
3076 sed = "s@#define INT_LEAST32_MIN.*@"
kono
parents: 67
diff changeset
3077 "#define INT_LEAST32_MIN (-INT_LEAST32_MAX - 1)@";
kono
parents: 67
diff changeset
3078 sed = "s@#define INT_LEAST32_MAX.*@"
kono
parents: 67
diff changeset
3079 "#define INT_LEAST32_MAX __INT_LEAST32_MAX__@";
kono
parents: 67
diff changeset
3080 sed = "s@#define UINT_LEAST32_MAX.*@"
kono
parents: 67
diff changeset
3081 "#define UINT_LEAST32_MAX __UINT_LEAST32_MAX__@";
kono
parents: 67
diff changeset
3082 sed = 's@#define INT_FAST\([0-9]*\)_MIN.*@'
kono
parents: 67
diff changeset
3083 '#define INT_FAST\1_MIN (-INT_FAST\1_MAX - 1)@';
kono
parents: 67
diff changeset
3084 sed = 's@#define INT_FAST\([0-9]*\)_MAX.*@'
kono
parents: 67
diff changeset
3085 '#define INT_FAST\1_MAX __INT_FAST\1_MAX__@';
kono
parents: 67
diff changeset
3086 sed = 's@#define UINT_FAST\([0-9]*\)_MAX.*@'
kono
parents: 67
diff changeset
3087 '#define UINT_FAST\1_MAX __UINT_FAST\1_MAX__@';
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3088 sed = "s@#define SIZE_MAX.*@#define SIZE_MAX __SIZE_MAX__@";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3089 sed = "s@#define PTRDIFF_MIN.*@#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)@";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3090 sed = "s@#define PTRDIFF_MAX.*@#define PTRDIFF_MAX __PTRDIFF_MAX__@";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3091 sed = "s@#define UINT8_C.*@#define UINT8_C(c) __UINT8_C(c)@";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3092 sed = "s@#define UINT16_C.*@#define UINT16_C(c) __UINT16_C(c)@";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3093 test_text = "/* @todo - Add support for wint_t types. */\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3094 "#define INT32_MIN (-2147483647-1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3095 "#define INT32_MAX 2147483647\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3096 "#define UINT32_MAX 4294967295U\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3097 "#define INT_LEAST32_MIN (-2147483647-1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3098 "#define INT_LEAST32_MAX 2147483647\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3099 "#define UINT_LEAST32_MAX 4294967295U\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3100 "#define INT_FAST8_MIN INT8_MIN\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3101 "#define INT_FAST8_MAX INT8_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3102 "#define UINT_FAST8_MAX UINT8_MAX\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3103 "#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3104 "#define PTRDIFF_MIN (-__STDINT_EXP(LONG_MAX) - 1L)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3105 "#define PTRDIFF_MAX __STDINT_EXP(LONG_MAX)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3106 "#define UINT8_C(x) x##U\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3107 "#define UINT16_C(x) x##U";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3108 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3109
111
kono
parents: 67
diff changeset
3110 /*
kono
parents: 67
diff changeset
3111 * newlib_stdint_2
kono
parents: 67
diff changeset
3112 */
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3113 fix = {
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3114 hackname = newlib_stdint_2;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3115 files = stdint-newlib.h, stdint.h;
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3116 select = "@todo - Add support for wint_t types";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3117 c_fix = format;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3118 c_fix_arg = "#define INTMAX_MAX __INTMAX_MAX__\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3119 "#define INTMAX_MIN (-INTMAX_MAX - 1)\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3120 "#define UINTMAX_MAX __UINTMAX_MAX__\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3121 "#define WCHAR_MAX __WCHAR_MAX__\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3122 "#define WCHAR_MIN __WCHAR_MIN__\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3123 "#define WINT_MAX __WINT_MAX__\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3124 "#define WINT_MIN __WINT_MIN__\n\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3125 "%0";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3126 c_fix_arg = '/\*\* Macros for minimum-width integer constant expressions \*/';
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3127 test_text = "/* @todo - Add support for wint_t types. */\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3128 "/** Macros for minimum-width integer constant expressions */";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3129 };
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3130
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3131 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3132 * NeXT 3.2 adds const prefix to some math functions.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3133 * These conflict with the built-in functions.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3134 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3135 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3136 hackname = next_math_prefix;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3137 files = ansi/math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3138 select = "^extern[ \t]+double[ \t]+__const__[ \t]";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3139
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3140 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3141 c_fix_arg = "extern double %1(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3142 c_fix_arg = "^extern[ \t]+double[ \t]+__const__[ \t]+([a-z]+)\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3143
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3144 test_text = "extern\tdouble\t__const__\tmumble();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3145 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3146
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3147 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3148 * NeXT 3.2 uses the word "template" as a parameter for some
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3149 * functions. GCC reports an invalid use of a reserved key word
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3150 * with the built-in functions.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3151 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3152 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3153 hackname = next_template;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3154 files = bsd/libc.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3155 select = "[ \t]template\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3156
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3157 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3158 c_fix_arg = "(%1)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3159 c_fix_arg = "\\(([^)]*)[ \t]template\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3160 test_text = "extern mumble( char * template); /* fix */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3161 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3162
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3163 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3164 * NeXT 3.2 includes the keyword volatile in the abort() and exit()
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3165 * function prototypes. That conflicts with the built-in functions.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3166 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3167 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3168 hackname = next_volitile;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3169 files = ansi/stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3170 select = "^extern[ \t]+volatile[ \t]+void[ \t]";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3171
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3172 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3173 c_fix_arg = "extern void %1(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3174 c_fix_arg = "^extern[ \t]+volatile[ \t]+void[ \t]+(exit|abort)\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3175
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3176 test_text = "extern\tvolatile\tvoid\tabort();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3177 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3178
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3179 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3180 * NeXT 2.0 defines 'int wait(union wait*)', which conflicts with Posix.1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3181 * Note that version 3 of the NeXT system has wait.h in a different directory,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3182 * so that this code won't do anything. But wait.h in version 3 has a
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3183 * conditional, so it doesn't need this fix. So everything is okay.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3184 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3185 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3186 hackname = next_wait_union;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3187 files = sys/wait.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3188
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3189 select = 'wait\(union wait';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3190 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3191 c_fix_arg = "wait(void";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3192 test_text = "extern pid_d wait(union wait*);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3193 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3194
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3195 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3196 * a missing semi-colon at the end of the nodeent structure definition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3197 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3198 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3199 hackname = nodeent_syntax;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3200 files = netdnet/dnetdb.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3201 select = "char[ \t]*\\*na_addr[ \t]*$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3202 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3203 c_fix_arg = "%0;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3204 test_text = "char *na_addr\t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3205 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3206
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3207 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3208 * Fix OpenBSD's NULL definition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3209 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3210 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3211 hackname = openbsd_null_definition;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3212 mach = "*-*-openbsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3213 files = locale.h, stddef.h, stdio.h, string.h,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3214 time.h, unistd.h, wchar.h, sys/param.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3215 select = "__GNUG__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3216 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3217 c_fix_arg = "#ifndef NULL\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3218 "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3219 "#ifdef __GNUG__\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3220 "#define NULL\t__null\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3221 "#else\t /* ! __GNUG__ */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3222 "#define NULL\t0L\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3223 "#endif\t /* __GNUG__ */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3224 "#else\t /* ! __cplusplus */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3225 "#define NULL\t((void *)0)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3226 "#endif\t /* __cplusplus */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3227 "#endif\t /* !NULL */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3228
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3229 c_fix_arg = "^#ifndef[ \t]*NULL\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3230 "^#ifdef[ \t]*__GNUG__\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3231 "^#define[ \t]*NULL[ \t]*__null\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3232 "^#else\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3233 "^#define[ \t]*NULL[ \t]*0L\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3234 "^#endif\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3235 "^#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3236 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3237 "#ifndef NULL\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3238 "#ifdef __GNUG__\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3239 "#define NULL __null\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3240 "#else\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3241 "#define NULL 0L\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3242 "#endif\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3243 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3244 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3245
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3246 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3247 * obstack.h used casts as lvalues.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3248 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3249 * We need to change postincrements of casted pointers (which are
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3250 * then dereferenced and assigned into) of the form
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3251 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3252 * *((TYPE*)PTRVAR)++ = (VALUE)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3253 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3254 * into expressions like
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3255 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3256 * ((*((TYPE*)PTRVAR) = (VALUE)), (PTRVAR += sizeof (TYPE)))
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3257 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3258 * which is correct for the cases used in obstack.h since PTRVAR is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3259 * of type char * and the value of the expression is not used.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3260 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3261 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3262 hackname = obstack_lvalue_cast;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3263 files = obstack.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3264 select = '\*\(\(([^()]*)\*\)(.*)\)\+\+ = \(([^()]*)\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3265 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3266 c_fix_arg = "((*((%1*)%2) = (%3)), (%2 += sizeof (%1)))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3267 test_text = "*((void **) (h)->next_free)++ = (aptr)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3268 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3269
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3270 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3271 * Fix OpenBSD's va_start define.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3272 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3273 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3274 hackname = openbsd_va_start;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3275 mach = "*-*-openbsd*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3276 files = stdarg.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3277 select = '__builtin_stdarg_start';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3278 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3279 c_fix_arg = __builtin_va_start;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3280
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3281 test_text = "#define va_start(v,l) __builtin_stdarg_start((v),l)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3282 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3283
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3284 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3285 * sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3286 * defining regex.h related types. This causes libg++ build and usage
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3287 * failures. Fixing this correctly requires checking and modifying 3 files.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3288 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3289 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3290 hackname = osf_namespace_a;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3291 files = reg_types.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3292 files = sys/lc_core.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3293 test = " -r reg_types.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3294 test = " -r sys/lc_core.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3295 test = " -n \"`grep '} regex_t;' reg_types.h`\"";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3296 test = " -z \"`grep __regex_t regex.h`\"";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3297
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3298 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3299 c_fix_arg = "__%0";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3300 c_fix_arg = "reg(ex|off|match)_t";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3301
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3302 test_text = "`touch sys/lc_core.h`"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3303 "typedef struct {\n int stuff, mo_suff;\n} regex_t;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3304 "extern regex_t re;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3305 "extern regoff_t ro;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3306 "extern regmatch_t rm;\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3307 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3308
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3309 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3310 hackname = osf_namespace_c;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3311 files = regex.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3312 test = " -r reg_types.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3313 test = " -r sys/lc_core.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3314 test = " -n \"`grep '} regex_t;' reg_types.h`\"";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3315 test = " -z \"`grep __regex_t regex.h`\"";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3316
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3317 select = "#include <reg_types\.h>.*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3318 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3319 c_fix_arg = "%0\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3320 "typedef __regex_t\tregex_t;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3321 "typedef __regoff_t\tregoff_t;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3322 "typedef __regmatch_t\tregmatch_t;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3323
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3324 test_text = "#include <reg_types.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3325 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3326
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3327 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3328 * On broken glibc-2.3.3 systems an array of incomplete structures is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3329 * passed to __sigsetjmp. Fix that to take a pointer instead.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3330 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3331 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3332 hackname = pthread_incomplete_struct_argument;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3333 files = pthread.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3334 select = "struct __jmp_buf_tag";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3335 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3336 c_fix_arg = "%1 *%2%3";
111
kono
parents: 67
diff changeset
3337 c_fix_arg = "^(extern int __sigsetjmp \\(struct __jmp_buf_tag) "
kono
parents: 67
diff changeset
3338 "(__env)\\[1\\](.*)$";
kono
parents: 67
diff changeset
3339 test_text = "extern int __sigsetjmp (struct __jmp_buf_tag __env[1], "
kono
parents: 67
diff changeset
3340 "int __savemask);";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3341 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3342
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3343 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3344 * Fix return type of fread and fwrite on sysV68
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3345 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3346 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3347 hackname = read_ret_type;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3348 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3349 select = "extern int\t.*, fread\\(\\), fwrite\\(\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3350 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3351 c_fix_arg = "extern unsigned int fread(), fwrite();\n%1%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3352 c_fix_arg = "(extern int\t.*), fread\\(\\), fwrite\\(\\)(.*)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3353
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3354 test_text = "extern int\tfclose(), fflush(), fread(), fwrite(), foo();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3355 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3356
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3357 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3358 * Fix casts as lvalues in glibc's <rpc/xdr.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3359 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3360 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3361 hackname = rpc_xdr_lvalue_cast_a;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3362 files = rpc/xdr.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3363 select = "#define[ \t]*IXDR_GET_LONG.*\\\\\n.*__extension__.*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3364 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3365 c_fix_arg = "#define IXDR_GET_LONG(buf) ((long)IXDR_GET_U_INT32(buf))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3366 test_text = "#define IXDR_GET_LONG(buf) \\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3367 "\t((long)ntohl((u_long)*__extension__((u_int32_t*)(buf))++))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3368 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3369
111
kono
parents: 67
diff changeset
3370 /*
kono
parents: 67
diff changeset
3371 * rpc_xdr_lvalue_cast_b
kono
parents: 67
diff changeset
3372 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3373 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3374 hackname = rpc_xdr_lvalue_cast_b;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3375 files = rpc/xdr.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3376 select = "#define[ \t]*IXDR_PUT_LONG.*\\\\\n.*__extension__.*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3377 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3378 c_fix_arg = "#define IXDR_PUT_LONG(buf, v) ((long)IXDR_PUT_INT32(buf, (long)(v)))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3379 test_text = "#define IXDR_PUT_LONG(buf, v) \\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3380 "\t(*__extension__((u_int32_t*)(buf))++ = (long)htonl((u_long)(v)))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3381 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3382
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3383 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3384 * function class(double x) conflicts with C++ keyword on rs/6000
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3385 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3386 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3387 hackname = rs6000_double;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3388 files = math.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3389 select = '[^a-zA-Z_]class\(';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3390
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3391 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3392 c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3393 c_fix_arg = '^.*[^a-zA-Z_]class\(.*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3394
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3395 test_text = "extern int class();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3396 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3397
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3398 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3399 * Wrong fchmod prototype on RS/6000.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3400 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3401 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3402 hackname = rs6000_fchmod;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3403 files = sys/stat.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3404 select = 'fchmod\(char \*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3405 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3406 c_fix_arg = "fchmod(int";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3407 test_text = "extern int fchmod(char *, mode_t);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3408 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3409
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3410 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3411 * parameters conflict with C++ new on rs/6000
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3412 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3413 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3414 hackname = rs6000_param;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3415 files = "stdio.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3416 files = "unistd.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3417
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3418 select = 'rename\(const char \*old, const char \*new\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3419 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3420 c_fix_arg = 'rename(const char *_old, const char *_new)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3421
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3422 test_text = 'extern int rename(const char *old, const char *new);';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3423 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3424
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3425 /*
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3426 * Solaris 10+ <sys/feature_tests.h> defines _RESTRICT_KYWD as restrict
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3427 * for C99. This is wrong for C++, which needs many C99 features, but
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3428 * only supports __restrict.
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3429 */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3430 fix = {
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3431 hackname = solaris___restrict;
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3432 files = sys/feature_tests.h;
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3433 select = "#define[ \t]*_RESTRICT_KYWD[ \t]*restrict";
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3434 mach = "*-*-solaris2*";
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3435 c_fix = format;
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3436 c_fix_arg = "#ifdef __cplusplus\n#define\t_RESTRICT_KYWD\t__restrict\n"
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3437 "#else\n%0\n#endif";
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3438 test_text = "#define _RESTRICT_KYWD restrict";
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3439 };
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3440
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3441 /*
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3442 * Solaris 10+ complex.h defines _Complex_I and _Imaginary_I in terms of
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3443 * themselves, which are Sun Studio compiler intrinsics. Remove _Imaginary_I
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3444 * and imaginary definitions which are not supported by GCC.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3445 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3446 fix = {
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3447 hackname = solaris_complex;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3448 mach = "*-*-solaris2.*";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3449 files = complex.h;
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3450 select = "#define[ \t]_Complex_I[ \t]_Complex_I";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3451 sed = "s/#define[ \t]_Complex_I[ \t]_Complex_I/"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3452 "#define\t_Complex_I\t(__extension__ 1.0iF)/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3453 sed = "/#define[ \t]_Imaginary_I[ \t]_Imaginary_I/d";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3454 sed = "/#define[ \t]imaginary[ \t]_Imaginary/d";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3455 sed = "s/#define[ \t]I[ \t]\\{1,\\}_Imaginary_I/#define\tI\t\t_Complex_I/";
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3456 test_text = "#define _Complex_I _Complex_I\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3457 "#define complex _Complex\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3458 "#define _Imaginary_I _Imaginary_I\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3459 "#define imaginary _Imaginary\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3460 "#undef I\n"
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3461 "#define I _Imaginary_I";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3462 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3463
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3464 /*
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3465 * Solaris 10+ <complex.h> is wrapped in #ifndef __cplusplus. Wrap in
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3466 * extern "C" instead so libstdc++ can use it.
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3467 */
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3468 fix = {
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3469 hackname = solaris_complex_cxx;
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3470 mach = "*-*-solaris2.*";
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3471 files = complex.h;
111
kono
parents: 67
diff changeset
3472 sed = "/#if[ \t]*!defined(__cplusplus)/c\\\n"
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3473 "#ifdef\t__cplusplus\\\nextern \"C\" {\\\n#endif";
111
kono
parents: 67
diff changeset
3474 sed = "/#endif[ \t]*\\/\\* !defined(__cplusplus) \\*\\//c\\\n"
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3475 "#ifdef\t__cplusplus\\\n}\\\n#endif";
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3476 test_text = "#if !defined(__cplusplus)\n"
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3477 "#endif /* !defined(__cplusplus) */";
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3478 };
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3479
111
kono
parents: 67
diff changeset
3480 /*
kono
parents: 67
diff changeset
3481 * g++ rejects functions declared with both C and C++ linkage.
kono
parents: 67
diff changeset
3482 */
kono
parents: 67
diff changeset
3483 fix = {
kono
parents: 67
diff changeset
3484 hackname = solaris_cxx_linkage;
kono
parents: 67
diff changeset
3485 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3486 files = "iso/stdlib_iso.h";
kono
parents: 67
diff changeset
3487 select = "(#if __cplusplus >= 199711L)\n"
kono
parents: 67
diff changeset
3488 "(extern \"C\\+\\+\" \\{\n)"
kono
parents: 67
diff changeset
3489 "(.*(bsearch|qsort).*)";
kono
parents: 67
diff changeset
3490 c_fix = format;
kono
parents: 67
diff changeset
3491 c_fix_arg = "%1 && !__GNUG__\n%2%3";
kono
parents: 67
diff changeset
3492
kono
parents: 67
diff changeset
3493 test_text =
kono
parents: 67
diff changeset
3494 "#if __cplusplus >= 199711L\n"
kono
parents: 67
diff changeset
3495 "extern \"C++\" {\n"
kono
parents: 67
diff changeset
3496 " void *bsearch(const void *, const void *, size_t, size_t,";
kono
parents: 67
diff changeset
3497 };
kono
parents: 67
diff changeset
3498
kono
parents: 67
diff changeset
3499 /*
kono
parents: 67
diff changeset
3500 * Solaris <iso/stdio_iso.h> doesn't declare getc for C++ with
kono
parents: 67
diff changeset
3501 * _STRICT_STDC, but uses it.
kono
parents: 67
diff changeset
3502 */
kono
parents: 67
diff changeset
3503 fix = {
kono
parents: 67
diff changeset
3504 hackname = solaris_getc_strict_stdc;
kono
parents: 67
diff changeset
3505 mach = "*-*-solaris2*";
kono
parents: 67
diff changeset
3506 files = "iso/stdio_iso.h";
kono
parents: 67
diff changeset
3507 select = "(.*&& )!defined\\(_STRICT_STDC\\)(.*)";
kono
parents: 67
diff changeset
3508 c_fix = format;
kono
parents: 67
diff changeset
3509 c_fix_arg = "%1(!defined(_STRICT_STDC) || (__cplusplus >= 199711L))%2";
kono
parents: 67
diff changeset
3510
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3511 test_text =
111
kono
parents: 67
diff changeset
3512 "#if !defined(_REENTRANT) && !defined(_LP64) && !defined(_STRICT_STDC)";
kono
parents: 67
diff changeset
3513 };
kono
parents: 67
diff changeset
3514
kono
parents: 67
diff changeset
3515 /*
kono
parents: 67
diff changeset
3516 * Solaris <iso/stdio_iso.h> should deprecate gets before C11.
kono
parents: 67
diff changeset
3517 */
kono
parents: 67
diff changeset
3518 fix = {
kono
parents: 67
diff changeset
3519 hackname = solaris_gets_c11;
kono
parents: 67
diff changeset
3520 mach = "*-*-solaris2*";
kono
parents: 67
diff changeset
3521 files = "iso/stdio_iso.h";
kono
parents: 67
diff changeset
3522 select = "(extern char[ \t]*\\*gets\\(char \\*\\));";
kono
parents: 67
diff changeset
3523
kono
parents: 67
diff changeset
3524 c_fix = format;
kono
parents: 67
diff changeset
3525 c_fix_arg = "#if __STDC_VERSION__ < 201112L && __cplusplus < 201402L\n"
kono
parents: 67
diff changeset
3526 "%1 __attribute__((__deprecated__));\n"
kono
parents: 67
diff changeset
3527 "#endif";
kono
parents: 67
diff changeset
3528
kono
parents: 67
diff changeset
3529 test_text = "extern char *gets(char *);";
kono
parents: 67
diff changeset
3530 };
kono
parents: 67
diff changeset
3531
kono
parents: 67
diff changeset
3532 /*
kono
parents: 67
diff changeset
3533 * Solaris <iso/stdio_iso.h> shouldn't declare gets for C++14.
kono
parents: 67
diff changeset
3534 */
kono
parents: 67
diff changeset
3535 fix = {
kono
parents: 67
diff changeset
3536 hackname = solaris_gets_cxx14;
kono
parents: 67
diff changeset
3537 mach = "*-*-solaris2*";
kono
parents: 67
diff changeset
3538 files = "iso/stdio_iso.h";
kono
parents: 67
diff changeset
3539 select = <<- _EOSelect_
kono
parents: 67
diff changeset
3540 (#if __STDC_VERSION__ < 201112L)
kono
parents: 67
diff changeset
3541 (extern char \*gets\(char \*\) __ATTR_DEPRECATED;)
kono
parents: 67
diff changeset
3542 _EOSelect_;
kono
parents: 67
diff changeset
3543 c_fix = format;
kono
parents: 67
diff changeset
3544 c_fix_arg = "%1 && __cplusplus < 201402L\n%2";
kono
parents: 67
diff changeset
3545
kono
parents: 67
diff changeset
3546 test_text = <<- _EOText_
kono
parents: 67
diff changeset
3547 #if __STDC_VERSION__ < 201112L
kono
parents: 67
diff changeset
3548 extern char *gets(char *) __ATTR_DEPRECATED;
kono
parents: 67
diff changeset
3549 _EOText_;
kono
parents: 67
diff changeset
3550 };
kono
parents: 67
diff changeset
3551
kono
parents: 67
diff changeset
3552 /*
kono
parents: 67
diff changeset
3553 * Sun Solaris 2 has a version of sys/int_const.h that defines
kono
parents: 67
diff changeset
3554 * UINT8_C and UINT16_C to unsigned constants.
kono
parents: 67
diff changeset
3555 */
kono
parents: 67
diff changeset
3556 fix = {
kono
parents: 67
diff changeset
3557 hackname = solaris_int_const;
kono
parents: 67
diff changeset
3558 files = sys/int_const.h;
kono
parents: 67
diff changeset
3559 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3560 c_fix = format;
kono
parents: 67
diff changeset
3561 c_fix_arg = "#define\tUINT8_C(c)\t(c)\n"
kono
parents: 67
diff changeset
3562 "%1\n"
kono
parents: 67
diff changeset
3563 "#define\tUINT16_C(c)\t(c)";
kono
parents: 67
diff changeset
3564 select = "^#define[ \t]+UINT8_C\\(c\\)[ \t]+__CONCAT__.*\n"
kono
parents: 67
diff changeset
3565 "(/\*.*\*/)\n"
kono
parents: 67
diff changeset
3566 "#define[ \t]+UINT16_C\\(c\\)[ \t]+__CONCAT__.*";
kono
parents: 67
diff changeset
3567 test_text =
kono
parents: 67
diff changeset
3568 "#define UINT8_C(c) __CONCAT__(c,u)\n"
kono
parents: 67
diff changeset
3569 "/* CSTYLED */\n"
kono
parents: 67
diff changeset
3570 "#define UINT16_C(c) __CONCAT__(c,u)";
kono
parents: 67
diff changeset
3571 };
kono
parents: 67
diff changeset
3572
kono
parents: 67
diff changeset
3573 /*
kono
parents: 67
diff changeset
3574 * Sun Solaris 2 has a version of sys/int_limits.h that defines
kono
parents: 67
diff changeset
3575 * UINT8_MAX and UINT16_MAX to unsigned constants.
kono
parents: 67
diff changeset
3576 */
kono
parents: 67
diff changeset
3577 fix = {
kono
parents: 67
diff changeset
3578 hackname = solaris_int_limits_1;
kono
parents: 67
diff changeset
3579 files = sys/int_limits.h;
kono
parents: 67
diff changeset
3580 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3581 c_fix = format;
kono
parents: 67
diff changeset
3582 c_fix_arg = "#define\tUINT8_MAX\t(255)\n"
kono
parents: 67
diff changeset
3583 "#define\tUINT16_MAX\t(65535)";
kono
parents: 67
diff changeset
3584 select = "^#define[ \t]+UINT8_MAX[ \t]+\\(255U\\)\n"
kono
parents: 67
diff changeset
3585 "#define[ \t]+UINT16_MAX[ \t]+\\(65535U\\)";
kono
parents: 67
diff changeset
3586 test_text =
kono
parents: 67
diff changeset
3587 "#define UINT8_MAX (255U)\n"
kono
parents: 67
diff changeset
3588 "#define UINT16_MAX (65535U)";
kono
parents: 67
diff changeset
3589 };
kono
parents: 67
diff changeset
3590
kono
parents: 67
diff changeset
3591 /*
kono
parents: 67
diff changeset
3592 * Sun Solaris 2 has a version of sys/int_limits.h that defines
kono
parents: 67
diff changeset
3593 * INT_FAST16 limits to wrong values for sys/int_types.h.
kono
parents: 67
diff changeset
3594 */
kono
parents: 67
diff changeset
3595 fix = {
kono
parents: 67
diff changeset
3596 hackname = solaris_int_limits_2;
kono
parents: 67
diff changeset
3597 files = sys/int_limits.h;
kono
parents: 67
diff changeset
3598 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3599 c_fix = format;
kono
parents: 67
diff changeset
3600 c_fix_arg = "#define\t%1_FAST16_%2 %132_%2";
kono
parents: 67
diff changeset
3601 select = "^#define[ \t]+(INT|UINT)_FAST16_(MAX|MIN)[ \t](INT|UINT)16.*";
kono
parents: 67
diff changeset
3602 test_text =
kono
parents: 67
diff changeset
3603 "#define INT_FAST16_MAX INT16_MAX\n"
kono
parents: 67
diff changeset
3604 "#define UINT_FAST16_MAX UINT16_MAX\n"
kono
parents: 67
diff changeset
3605 "#define INT_FAST16_MIN INT16_MIN";
kono
parents: 67
diff changeset
3606 };
kono
parents: 67
diff changeset
3607
kono
parents: 67
diff changeset
3608 /*
kono
parents: 67
diff changeset
3609 * Sun Solaris 2 has a version of sys/int_limits.h that defines
kono
parents: 67
diff changeset
3610 * SIZE_MAX as unsigned long.
kono
parents: 67
diff changeset
3611 */
kono
parents: 67
diff changeset
3612 fix = {
kono
parents: 67
diff changeset
3613 hackname = solaris_int_limits_3;
kono
parents: 67
diff changeset
3614 files = sys/int_limits.h;
kono
parents: 67
diff changeset
3615 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3616 c_fix = format;
kono
parents: 67
diff changeset
3617 c_fix_arg = "#define\tSIZE_MAX\t4294967295U";
kono
parents: 67
diff changeset
3618 select = "^#define[ \t]+SIZE_MAX[ \t]+4294967295UL";
kono
parents: 67
diff changeset
3619 test_text =
kono
parents: 67
diff changeset
3620 "#define SIZE_MAX 4294967295UL";
kono
parents: 67
diff changeset
3621 };
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3622
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3623 /*
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3624 * Sun Solaris 10 defines several C99 math macros in terms of
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3625 * builtins specific to the Studio compiler, in particular not
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3626 * compatible with the GNU compiler.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3627 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3628 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3629 hackname = solaris_math_1;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3630 select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3631 bypass = "__GNUC__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3632 files = iso/math_c99.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3633 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3634 c_fix_arg = "#define\tHUGE_VA%1\t(__builtin_huge_va%2())";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3635 c_fix_arg = "^#define[ \t]+HUGE_VA([LF]+)[ \t]+__builtin_huge_va([lf]+)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3636 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3637 '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3638 "#undef HUGE_VAL\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3639 "#define HUGE_VAL __builtin_huge_val\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3640 "#undef HUGE_VALF\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3641 "#define HUGE_VALF __builtin_huge_valf\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3642 "#undef HUGE_VALL\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3643 "#define HUGE_VALL __builtin_huge_vall";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3644 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3645
111
kono
parents: 67
diff changeset
3646 /*
kono
parents: 67
diff changeset
3647 * On Solaris 11, if you do isinf(NaN) you'll get a floating point
kono
parents: 67
diff changeset
3648 * exception. Provide an alternative using GCC's builtin.
kono
parents: 67
diff changeset
3649 */
kono
parents: 67
diff changeset
3650 fix = {
kono
parents: 67
diff changeset
3651 hackname = solaris_math_10;
kono
parents: 67
diff changeset
3652 select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
kono
parents: 67
diff changeset
3653 files = iso/math_c99.h;
kono
parents: 67
diff changeset
3654 c_fix = format;
kono
parents: 67
diff changeset
3655 c_fix_arg = "#define\tisinf(x) __builtin_isinf(x)";
kono
parents: 67
diff changeset
3656 c_fix_arg = "^#define[ \t]+isinf\\(x\\)[ \t]+__extension__\\([ \t]*\\\\\n"
kono
parents: 67
diff changeset
3657 "[ \t]*\\{[ \t]*__typeof\\(x\\)[ \t]*__x_i[ \t]*=[ \t]*\\(x\\);"
kono
parents: 67
diff changeset
3658 "[ \t]*\\\\\n"
kono
parents: 67
diff changeset
3659 "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*"
kono
parents: 67
diff changeset
3660 "INFINITY[ \t]*\\|\\|[ \t]*\\\\\n"
kono
parents: 67
diff changeset
3661 "[ \t]*__x_i[ \t]*==[ \t]*\\(__typeof\\(__x_i\\)\\)[ \t]*"
kono
parents: 67
diff changeset
3662 "\\(-INFINITY\\);[ \t]*\\}\\)";
kono
parents: 67
diff changeset
3663 test_text =
kono
parents: 67
diff changeset
3664 '#pragma ident "@(#)math_c99.h 1.12 07/01/21 SMI"'"\n"
kono
parents: 67
diff changeset
3665 "#undef isinf\n"
kono
parents: 67
diff changeset
3666 "#define isinf(x) __extension__( \\\\\n"
kono
parents: 67
diff changeset
3667 " { __typeof(x) __x_i = (x); \\\\\n"
kono
parents: 67
diff changeset
3668 " __x_i == (__typeof(__x_i)) INFINITY || \\\\\n"
kono
parents: 67
diff changeset
3669 " __x_i == (__typeof(__x_i)) (-INFINITY); })";
kono
parents: 67
diff changeset
3670 };
kono
parents: 67
diff changeset
3671
kono
parents: 67
diff changeset
3672 /*
kono
parents: 67
diff changeset
3673 * Solaris math INFINITY
kono
parents: 67
diff changeset
3674 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3675 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3676 hackname = solaris_math_2;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3677 select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3678 bypass = "__GNUC__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3679 files = iso/math_c99.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3680 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3681 c_fix_arg = "#define\tINFINITY\t(__builtin_inff())";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3682 c_fix_arg = "^#define[ \t]+INFINITY[ \t]+__builtin_infinity";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3683 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3684 '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3685 "#undef INFINITY\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3686 "#define INFINITY __builtin_infinity";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3687 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3688
111
kono
parents: 67
diff changeset
3689 /*
kono
parents: 67
diff changeset
3690 * Solaris math NAN
kono
parents: 67
diff changeset
3691 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3692 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3693 hackname = solaris_math_3;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3694 select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3695 bypass = "__GNUC__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3696 files = iso/math_c99.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3697 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3698 c_fix_arg = "#define\tNAN\t\t(__builtin_nanf(\"\"))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3699 c_fix_arg = "^#define[ \t]+NAN[ \t]+__builtin_nan";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3700 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3701 '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3702 "#undef NAN\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3703 "#define NAN __builtin_nan";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3704 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3705
111
kono
parents: 67
diff changeset
3706 /*
kono
parents: 67
diff changeset
3707 * Solaris math fpclassify
kono
parents: 67
diff changeset
3708 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3709 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3710 hackname = solaris_math_4;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3711 select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3712 bypass = "__GNUC__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3713 files = iso/math_c99.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3714 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3715 c_fix_arg = "#define\tfpclassify(x) \\\n"
111
kono
parents: 67
diff changeset
3716 " __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, "
kono
parents: 67
diff changeset
3717 "FP_SUBNORMAL, FP_ZERO, (x))";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3718 c_fix_arg = "^#define[ \t]+fpclassify\\(x\\)[ \t]+__builtin_fpclassify\\(x\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3719 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3720 '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3721 "#undef fpclassify\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3722 "#define fpclassify(x) __builtin_fpclassify(x)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3723 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3724
111
kono
parents: 67
diff changeset
3725 /*
kono
parents: 67
diff changeset
3726 * Solaris math signbit
kono
parents: 67
diff changeset
3727 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3728 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3729 hackname = solaris_math_8;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3730 select = '@\(#\)math_c99\.h' "[ \t]+1\\.[0-9]+[ \t]+[0-9/]+ SMI";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3731 bypass = "__GNUC__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3732 files = iso/math_c99.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3733 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3734 c_fix_arg = "#define\tsignbit(x)\t(sizeof(x) == sizeof(float) \\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3735 "\t\t\t ? __builtin_signbitf(x) \\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3736 "\t\t\t : sizeof(x) == sizeof(long double) \\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3737 "\t\t\t ? __builtin_signbitl(x) \\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3738 "\t\t\t : __builtin_signbit(x))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3739 c_fix_arg = "^#define[ \t]+signbit\\(x\\)[ \t]+__builtin_signbit\\(x\\)";
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3740 test_text = <<- _EOText_
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3741 #ident "@(#)math_c99.h 1.9 04/11/01 SMI"
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3742 #undef signbit
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3743 #define signbit(x) __builtin_signbit(x)
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3744 _EOText_;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3745 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3746
111
kono
parents: 67
diff changeset
3747 /*
kono
parents: 67
diff changeset
3748 * Solaris math comparison macros
kono
parents: 67
diff changeset
3749 */
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3750 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3751 hackname = solaris_math_9;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3752 select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3753 bypass = "__GNUC__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3754 files = iso/math_c99.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3755 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3756 c_fix_arg = "#define\t%1(x, y)%2__builtin_%1(x, y)";
111
kono
parents: 67
diff changeset
3757 c_fix_arg = "^#define[ \t]+([a-z]+)\\(x, y\\)([ \t]+)\\(\\(x\\) "
kono
parents: 67
diff changeset
3758 "__builtin_[a-z]+\\(y\\)\\)";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3759 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3760 '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3761 "#undef isgreater\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3762 "#define isgreater(x, y) ((x) __builtin_isgreater(y))\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3763 "#undef isgreaterequal\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3764 "#define isgreaterequal(x, y) ((x) __builtin_isgreaterequal(y))\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3765 "#undef isless\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3766 "#define isless(x, y) ((x) __builtin_isless(y))\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3767 "#undef islessequal\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3768 "#define islessequal(x, y) ((x) __builtin_islessequal(y))\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3769 "#undef islessgreater\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3770 "#define islessgreater(x, y) ((x) __builtin_islessgreater(y))\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3771 "#undef isunordered\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3772 "#define isunordered(x, y) ((x) __builtin_isunordered(y))";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3773 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3774
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3775 /*
111
kono
parents: 67
diff changeset
3776 * Newer Solaris 10/11 GCC signbit implementations cause strict-aliasing
kono
parents: 67
diff changeset
3777 * warnings.
kono
parents: 67
diff changeset
3778 */
kono
parents: 67
diff changeset
3779 fix = {
kono
parents: 67
diff changeset
3780 hackname = solaris_math_11;
kono
parents: 67
diff changeset
3781 select = '@\(#\)math_c99\.h' "[ \t]+1\\.[0-9]+[ \t]+[0-9/]+ ";
kono
parents: 67
diff changeset
3782 files = iso/math_c99.h;
kono
parents: 67
diff changeset
3783 c_fix = format;
kono
parents: 67
diff changeset
3784 c_fix_arg = << _EOArg_
kono
parents: 67
diff changeset
3785 #undef signbit
kono
parents: 67
diff changeset
3786 #define signbit(x) (sizeof(x) == sizeof(float) \
kono
parents: 67
diff changeset
3787 ? __builtin_signbitf(x) \
kono
parents: 67
diff changeset
3788 : sizeof(x) == sizeof(long double) \
kono
parents: 67
diff changeset
3789 ? __builtin_signbitl(x) \
kono
parents: 67
diff changeset
3790 : __builtin_signbit(x))
kono
parents: 67
diff changeset
3791 _EOArg_;
kono
parents: 67
diff changeset
3792 c_fix_arg = << _EOArg_
kono
parents: 67
diff changeset
3793 ^#undef[ ]+signbit
kono
parents: 67
diff changeset
3794 #if defined\(__sparc\)
kono
parents: 67
diff changeset
3795 #define[ ]+signbit\(x\)[ ]+__extension__\( \\
kono
parents: 67
diff changeset
3796 [ ]+\{[ ]*__typeof\(x\)[ ]*__x_s[ ]*=[ ]*\(x\);[ ]*\\
kono
parents: 67
diff changeset
3797 [ ]+\(int\)[ ]*\(\*\(unsigned[ ]*\*\)[ ]*\&__x_s[ ]*>>[ ]*31\);[ ]*\}\)
kono
parents: 67
diff changeset
3798 #elif defined\(__i386\) \|\| defined\(__amd64\)
kono
parents: 67
diff changeset
3799 #define[ ]+signbit\(x\)[ ]+__extension__\( \\
kono
parents: 67
diff changeset
3800 [ ]+\{ __typeof\(x\) __x_s = \(x\); \\
kono
parents: 67
diff changeset
3801 [ ]+\(sizeof \(__x_s\) == sizeof \(float\) \? \\
kono
parents: 67
diff changeset
3802 [ ]+\(int\) \(\*\(unsigned \*\) \&__x_s >> 31\) : \\
kono
parents: 67
diff changeset
3803 [ ]+sizeof \(__x_s\) == sizeof \(double\) \? \\
kono
parents: 67
diff changeset
3804 [ ]+\(int\) \(\(\(unsigned \*\) \&__x_s\)\[1\] >> 31\) : \\
kono
parents: 67
diff changeset
3805 [ ]+\(int\) \(\(\(unsigned short \*\) \&__x_s\)\[4\] >> 15\)\); \}\)
kono
parents: 67
diff changeset
3806 #endif
kono
parents: 67
diff changeset
3807 _EOArg_;
kono
parents: 67
diff changeset
3808 test_text = << _EOText_
kono
parents: 67
diff changeset
3809 /* @(#)math_c99.h 1.14 13/03/27 */
kono
parents: 67
diff changeset
3810 #undef signbit
kono
parents: 67
diff changeset
3811 #if defined(__sparc)
kono
parents: 67
diff changeset
3812 #define signbit(x) __extension__( \\
kono
parents: 67
diff changeset
3813 { __typeof(x) __x_s = (x); \\
kono
parents: 67
diff changeset
3814 (int) (*(unsigned *) &__x_s >> 31); })
kono
parents: 67
diff changeset
3815 #elif defined(__i386) || defined(__amd64)
kono
parents: 67
diff changeset
3816 #define signbit(x) __extension__( \\
kono
parents: 67
diff changeset
3817 { __typeof(x) __x_s = (x); \\
kono
parents: 67
diff changeset
3818 (sizeof (__x_s) == sizeof (float) ? \\
kono
parents: 67
diff changeset
3819 (int) (*(unsigned *) &__x_s >> 31) : \\
kono
parents: 67
diff changeset
3820 sizeof (__x_s) == sizeof (double) ? \\
kono
parents: 67
diff changeset
3821 (int) (((unsigned *) &__x_s)[1] >> 31) : \\
kono
parents: 67
diff changeset
3822 (int) (((unsigned short *) &__x_s)[4] >> 15)); })
kono
parents: 67
diff changeset
3823 #endif
kono
parents: 67
diff changeset
3824 _EOText_;
kono
parents: 67
diff changeset
3825 };
kono
parents: 67
diff changeset
3826
kono
parents: 67
diff changeset
3827 /*
kono
parents: 67
diff changeset
3828 * Some versions of Solaris 10+ <math.h> #undef libstdc++-internal macros.
kono
parents: 67
diff changeset
3829 */
kono
parents: 67
diff changeset
3830 fix = {
kono
parents: 67
diff changeset
3831 hackname = solaris_math_12;
kono
parents: 67
diff changeset
3832 files = math.h;
kono
parents: 67
diff changeset
3833 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3834 select = '#undef.*_GLIBCXX_USE_C99_MATH';
kono
parents: 67
diff changeset
3835 sed = "/#undef[ \t]*_GLIBCXX_USE_C99_MATH/d";
kono
parents: 67
diff changeset
3836 test_text = << _EOText_
kono
parents: 67
diff changeset
3837 #if __cplusplus >= 201103L
kono
parents: 67
diff changeset
3838 #undef _GLIBCXX_USE_C99_MATH
kono
parents: 67
diff changeset
3839 #undef _GLIBCXX_USE_C99_MATH_TR1
kono
parents: 67
diff changeset
3840 #endif
kono
parents: 67
diff changeset
3841 _EOText_;
kono
parents: 67
diff changeset
3842 };
kono
parents: 67
diff changeset
3843
kono
parents: 67
diff changeset
3844 /*
kono
parents: 67
diff changeset
3845 * Sun Solaris defines PTHREAD_ONCE_INIT as an array containing a
kono
parents: 67
diff changeset
3846 * structure. As such, it need two levels of brackets, but only
kono
parents: 67
diff changeset
3847 * contains one. Wrap the macro definition in an extra layer.
kono
parents: 67
diff changeset
3848 */
kono
parents: 67
diff changeset
3849 fix = {
kono
parents: 67
diff changeset
3850 hackname = solaris_once_init_1;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3851 select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3852 files = pthread.h;
111
kono
parents: 67
diff changeset
3853 mach = '*-*-solaris*';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3854 c_fix = format;
111
kono
parents: 67
diff changeset
3855 c_fix_arg = "%1{%2}%3";
kono
parents: 67
diff changeset
3856 c_fix_arg = "(^#define[ \t]+PTHREAD_ONCE_INIT[ \t]+\\{)([^}]+)(\\})[ \t]*$";
kono
parents: 67
diff changeset
3857 test_text =
kono
parents: 67
diff changeset
3858 '#pragma ident "@(#)pthread.h 1.37 04/09/28 SMI"'"\n"
kono
parents: 67
diff changeset
3859 "#define PTHREAD_ONCE_INIT\t{0, 0, 0, PTHREAD_ONCE_NOTDONE}";
kono
parents: 67
diff changeset
3860 };
kono
parents: 67
diff changeset
3861
kono
parents: 67
diff changeset
3862 /*
kono
parents: 67
diff changeset
3863 * Solaris 10+ <spawn.h> uses char *const argv[_RESTRICT_KYWD] in the
kono
parents: 67
diff changeset
3864 * posix_spawn declarations, which doesn't work with C++.
kono
parents: 67
diff changeset
3865 */
kono
parents: 67
diff changeset
3866 fix = {
kono
parents: 67
diff changeset
3867 hackname = solaris_posix_spawn_restrict;
kono
parents: 67
diff changeset
3868 files = spawn.h;
kono
parents: 67
diff changeset
3869 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3870 c_fix = format;
kono
parents: 67
diff changeset
3871 c_fix_arg = "%1*_RESTRICT_KYWD %2%3";
kono
parents: 67
diff changeset
3872 select = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)";
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3873 test_text =
111
kono
parents: 67
diff changeset
3874 "char *const argv[_RESTRICT_KYWD],\n"
kono
parents: 67
diff changeset
3875 "char *const envp[_RESTRICT_KYWD]);";
kono
parents: 67
diff changeset
3876 };
kono
parents: 67
diff changeset
3877
kono
parents: 67
diff changeset
3878 /*
kono
parents: 67
diff changeset
3879 * The pow overloads with int were removed in C++ 2011 DR 550.
kono
parents: 67
diff changeset
3880 */
kono
parents: 67
diff changeset
3881 fix = {
kono
parents: 67
diff changeset
3882 hackname = solaris_pow_int_overload;
kono
parents: 67
diff changeset
3883 mach = '*-*-solaris2*';
kono
parents: 67
diff changeset
3884 files = "iso/math_iso.h";
kono
parents: 67
diff changeset
3885 select = "^[ \t]*inline [a-z ]* pow\\([^()]*, int [^()]*\\)"
kono
parents: 67
diff changeset
3886 " *\\{[^{}]*\n[^{}]*\\}";
kono
parents: 67
diff changeset
3887 c_fix = format;
kono
parents: 67
diff changeset
3888 c_fix_arg = "#if __cplusplus < 201103L\n%0\n#endif";
kono
parents: 67
diff changeset
3889
kono
parents: 67
diff changeset
3890 test_text =
kono
parents: 67
diff changeset
3891 " inline long double pow(long double __X, int __Y) { return\n"
kono
parents: 67
diff changeset
3892 " __powl(__X, (long double) (__Y)); }";
kono
parents: 67
diff changeset
3893 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3894
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3895 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3896 * Sun Solaris defines PTHREAD_RWLOCK_INITIALIZER with a "0" for some
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3897 * fields of the pthread_rwlock_t structure, which are of type
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3898 * upad64_t, which itself is typedef'd to int64_t, but with __STDC__
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3899 * defined (e.g. by -ansi) it is a union. So change the initializer
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3900 * to "{0}" instead.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3901 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3902 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3903 hackname = solaris_rwlock_init_1;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3904 select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3905 files = pthread.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3906 mach = '*-*-solaris*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3907 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3908 c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3909 "%0\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3910 "#else\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3911 "%1{0, 0, 0, {{0}, {0}, {0}}, {{0}, {0}}, {{0}, {0}}}\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3912 "#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3913 c_fix_arg = "(^#define[ \t]+PTHREAD_RWLOCK_INITIALIZER[ \t]+)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3914 "\\{0, 0, 0, \\{0, 0, 0\\}, \\{0, 0\\}, \\{0, 0\\}\\}[ \t]*$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3915
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3916 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3917 '#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3918 "#define PTHREAD_RWLOCK_INITIALIZER\t{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3919 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3920
111
kono
parents: 67
diff changeset
3921 /*
kono
parents: 67
diff changeset
3922 * Before Solaris 10, <stdio.h> lacks declarations of std::__filbuf and
kono
parents: 67
diff changeset
3923 * std::__flsbuf, but <iso/stdio_iso.h> uses them.
kono
parents: 67
diff changeset
3924 */
kono
parents: 67
diff changeset
3925 fix = {
kono
parents: 67
diff changeset
3926 hackname = solaris_std___filbuf;
kono
parents: 67
diff changeset
3927 files = stdio.h;
63
b7f97abdc517 update gcc from gcc-4.5.0 to gcc-4.6
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 55
diff changeset
3928 mach = '*-*-solaris2*';
111
kono
parents: 67
diff changeset
3929 bypass = "using std::__filbuf";
kono
parents: 67
diff changeset
3930 select = "(using std::perror;\n)(#endif)";
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3931 c_fix = format;
111
kono
parents: 67
diff changeset
3932 c_fix_arg = "%1#ifndef _LP64\n"
kono
parents: 67
diff changeset
3933 "using std::__filbuf;\n"
kono
parents: 67
diff changeset
3934 "using std::__flsbuf;\n"
kono
parents: 67
diff changeset
3935 "#endif\n%2";
kono
parents: 67
diff changeset
3936
kono
parents: 67
diff changeset
3937 test_text = "using std::perror;\n"
kono
parents: 67
diff changeset
3938 "#endif";
kono
parents: 67
diff changeset
3939 };
kono
parents: 67
diff changeset
3940
kono
parents: 67
diff changeset
3941 /*
kono
parents: 67
diff changeset
3942 * Solaris <stdio.h> shouldn't use std::gets for C++14.
kono
parents: 67
diff changeset
3943 */
kono
parents: 67
diff changeset
3944 fix = {
kono
parents: 67
diff changeset
3945 hackname = solaris_std_gets_cxx14;
kono
parents: 67
diff changeset
3946 mach = "*-*-solaris2*";
kono
parents: 67
diff changeset
3947 files = "stdio.h";
kono
parents: 67
diff changeset
3948 select = "using std::gets;";
kono
parents: 67
diff changeset
3949
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3950 c_fix = format;
111
kono
parents: 67
diff changeset
3951 c_fix_arg = "#if __cplusplus < 201402L\n%0\n#endif";
kono
parents: 67
diff changeset
3952
kono
parents: 67
diff changeset
3953 test_text = "using std::gets;";
kono
parents: 67
diff changeset
3954 };
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3955
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3956 /*
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
3957 * Sun Solaris 8 has what appears to be some gross workaround for
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3958 * some old version of their c++ compiler. G++ doesn't want it
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3959 * either, but doesn't want to be tied to SunPRO version numbers.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3960 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3961 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3962 hackname = solaris_stdio_tag;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3963 files = stdio_tag.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3964
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3965 select = '__cplusplus < 54321L';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3966 /* In Solaris 10, the code in stdio_tag.h is conditionalized on
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3967 "!defined(__GNUC__)" so we no longer need to fix it. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3968 bypass = '__GNUC__';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3969 sed = 's/defined(__cplusplus) && (__cplusplus < 54321L)/0/';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3970
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3971 test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3972 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3973
111
kono
parents: 67
diff changeset
3974 /*
kono
parents: 67
diff changeset
3975 * Solaris <stdlib.h> shouldn't use _Noreturn, breaks with C++.
kono
parents: 67
diff changeset
3976 */
kono
parents: 67
diff changeset
3977 fix = {
kono
parents: 67
diff changeset
3978 hackname = solaris_stdlib_noreturn;
kono
parents: 67
diff changeset
3979 mach = "*-*-solaris2*";
kono
parents: 67
diff changeset
3980 files = "iso/stdlib_c99.h";
kono
parents: 67
diff changeset
3981 select = "(extern) _Noreturn (void quick_exit\\(int\\));";
kono
parents: 67
diff changeset
3982
kono
parents: 67
diff changeset
3983 c_fix = format;
kono
parents: 67
diff changeset
3984 c_fix_arg = "%1 %2 __attribute__((__noreturn__));";
kono
parents: 67
diff changeset
3985
kono
parents: 67
diff changeset
3986 test_text = "extern _Noreturn void quick_exit(int);";
kono
parents: 67
diff changeset
3987 };
67
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3988
f6334be47118 update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
parents: 63
diff changeset
3989 /*
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3990 * a missing semi-colon at the end of the statsswtch structure definition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3991 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3992 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3993 hackname = statsswtch;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3994 files = rpcsvc/rstat.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3995 select = "boottime$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3996 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3997 c_fix_arg = "boottime;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3998 test_text = "struct statswtch {\n int boottime\n};";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3999 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4000
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4001 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4002 * Arrange for stdio.h to use stdarg.h to define __gnuc_va_list.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4003 * On 4BSD-derived systems, stdio.h defers to machine/ansi.h; that's
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4004 * OK too.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4005 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4006 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4007 hackname = stdio_stdarg_h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4008 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4009 bypass = "include.*(stdarg\.h|machine/ansi\.h)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4010 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4011 * On Solaris 10, this fix is unncessary; <stdio.h> includes
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4012 * <iso/stdio_iso.h>, which includes <sys/va_list.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4013 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4014 mach = '*-*-solaris2.1[0-9]*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4015 not_machine = true;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4016
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4017 c_fix = wrap;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4018
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4019 c_fix_arg = "#define __need___va_list\n#include <stdarg.h>\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4020
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4021 test_text = "";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4022 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4023
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4024 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4025 * Don't use or define the name va_list in stdio.h. This is for
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4026 * ANSI. Note _BSD_VA_LIST_ is dealt with elsewhere. The presence
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4027 * of __gnuc_va_list, __DJ_va_list, or _G_va_list is taken to
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4028 * indicate that the header knows what it's doing -- under SUSv2,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4029 * stdio.h is required to define va_list, and we shouldn't break
111
kono
parents: 67
diff changeset
4030 * that.
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4031 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4032 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4033 hackname = stdio_va_list;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4034 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4035 bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4036 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4037 * On Solaris 10, the definition in
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4038 * <stdio.h> is guarded appropriately by the _XPG4 feature macro;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4039 * there is therefore no need for this fix there.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4040 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4041 mach = '*-*-solaris2.1[0-9]*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4042 not_machine = true;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4043
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4044 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4045 * Use __gnuc_va_list in arg types in place of va_list.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4046 * On 386BSD use __gnuc_va_list instead of _VA_LIST_. On Tru64 UNIX V5.1A
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4047 * use __gnuc_va_list instead of __VA_LIST__. We're hoping the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4048 * trailing parentheses and semicolon save all other systems from this.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4049 * Define __not_va_list__ (something harmless and unused)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4050 * instead of va_list.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4051 * Don't claim to have defined va_list.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4052 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4053 sed = "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4054 "s@(va_list)&@(__gnuc_va_list)\\&@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4055 "s@ _VA_LIST_));@ __gnuc_va_list));@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4056 "s@ __VA_LIST__));@ __gnuc_va_list));@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4057 "s@ va_list@ __not_va_list__@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4058 "s@\\*va_list@*__not_va_list__@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4059 "s@ __va_list)@ __gnuc_va_list)@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4060 "s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4061 "@typedef \\1 __not_va_list__;@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4062 "s@typedef[ \t]*__va_list__@typedef __gnuc_va_list@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4063 "s@GNUC_VA_LIST@GNUC_Va_LIST@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4064 "s@_VA_LIST_DEFINED@_Va_LIST_DEFINED@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4065 "s@_NEED___VA_LIST@_NEED___Va_LIST@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4066 "s@VA_LIST@DUMMY_VA_LIST@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4067 "s@_Va_LIST@_VA_LIST@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4068 test_text = "extern void mumble( va_list);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4069 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4070
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4071 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4072 * Fix headers that use va_list from stdio.h to use the updated
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4073 * va_list from the stdio_va_list change. Note _BSD_VA_LIST_ is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4074 * dealt with elsewhere. The presence of __gnuc_va_list,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4075 * __DJ_va_list, or _G_va_list is taken to indicate that the header
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4076 * knows what it's doing.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4077 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4078 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4079 hackname = stdio_va_list_clients;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4080 files = com_err.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4081 files = cps.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4082 files = curses.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4083 files = krb5.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4084 files = lc_core.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4085 files = pfmt.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4086 files = wchar.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4087 files = curses_colr/curses.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4088 bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4089 /* Don't fix, if we use va_list from stdarg.h, or if the use is
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4090 otherwise protected. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4091 bypass = 'include <stdarg\.h>|#ifdef va_start';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4092
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4093 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4094 * Use __gnuc_va_list in arg types in place of va_list.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4095 * On 386BSD use __gnuc_va_list instead of _VA_LIST_. On Tru64 UNIX V5.1A
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4096 * use __gnuc_va_list instead of __VA_LIST__. We're hoping the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4097 * trailing parentheses and semicolon save all other systems from this.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4098 * Define __not_va_list__ (something harmless and unused)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4099 * instead of va_list.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4100 * Don't claim to have defined va_list.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4101 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4102 sed = "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4103 "s@(va_list)&@(__gnuc_va_list)\\&@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4104 "s@ _VA_LIST_));@ __gnuc_va_list));@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4105 "s@ __VA_LIST__));@ __gnuc_va_list));@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4106 "s@ va_list@ __not_va_list__@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4107 "s@\\*va_list@*__not_va_list__@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4108 "s@ __va_list)@ __gnuc_va_list)@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4109 "s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4110 "@typedef \\1 __not_va_list__;@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4111 "s@typedef[ \t]*__va_list__@typedef __gnuc_va_list@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4112 "s@GNUC_VA_LIST@GNUC_Va_LIST@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4113 "s@_VA_LIST_DEFINED@_Va_LIST_DEFINED@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4114 "s@_NEED___VA_LIST@_NEED___Va_LIST@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4115 "s@VA_LIST@DUMMY_VA_LIST@\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4116 "s@_Va_LIST@_VA_LIST@";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4117 test_text = "extern void mumble( va_list);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4118 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4119
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4120 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4121 * "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4122 * is "!defined( __STRICT_ANSI__ )"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4123 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4124 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4125 hackname = strict_ansi_not;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4126 select = "^([ \t]*#[ \t]*if.*)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4127 "(!__STDC__"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4128 "|__STDC__[ \t]*==[ \t]*0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4129 "|__STDC__[ \t]*!=[ \t]*1"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4130 "|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4131 /* Tru64 UNIX V4.0F/V5.1 <standards.h> supports GCC usage of __STDC__. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4132 bypass = 'GNU and MIPS C compilers define __STDC__ differently';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4133 /* GNU gmp.h uses "__STDC__ != 1" only if __SCO_VERSION__, which
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4134 is not defined by GCC, so it is safe. */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4135 bypass = '__SCO_VERSION__.*__STDC__ != 1';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4136 c_test = stdc_0_in_system_headers;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4137
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4138 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4139 c_fix_arg = "%1 !defined(__STRICT_ANSI__)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4140
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4141 test_text = "#if !__STDC__ \n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4142 "#if __STDC__ == 0\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4143 "#if __STDC__ != 1\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4144 "#if __STDC__ - 0 == 0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4145 "/* not std C */\nint foo;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4146 "\n#end-end-end-end-if :-)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4147 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4148
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4149 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4150 * "__STDC__-0==0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4151 * is "!defined( __STRICT_ANSI__ )" on continued #if-s
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4152 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4153 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4154 hackname = strict_ansi_not_ctd;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4155 files = math.h, limits.h, stdio.h, signal.h,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4156 stdlib.h, sys/signal.h, time.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4157 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4158 * Starting at the beginning of a line, skip white space and
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4159 * a leading "(" or "&&" or "||". One of those must be found.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4160 * Then, zero, one or more copies of a "defined(_FOO_BAR_) &&"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4161 * expression. If these are nested, then they must accumulate
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4162 * because we won't match any closing parentheses. Finally,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4163 * after skipping over all that, we must then match our suspect
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4164 * phrase: "__STDC__-0==0" with or without white space.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4165 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4166 select = "^([ \t]*" '(\(|&&|\|\|)'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4167 "([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4168 "[ \t(]*)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4169 "(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4170 c_test = stdc_0_in_system_headers;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4171
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4172 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4173 c_fix_arg = "%1 !defined(__STRICT_ANSI__)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4174
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4175 test_text = "#if 1 && \\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4176 "&& defined(mumbling) |& (__STDC__ - 0 == 0) \\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4177 "( __STDC__ == 0 && !defined(_XOPEN_SOURCE) \\\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4178 "|| __STDC__ - 0 == 0 ) /* not std C */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4179 "int foo;\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4180 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4181
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4182 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4183 * "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4184 * is "defined( __STRICT_ANSI__ )"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4185 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4186 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4187 hackname = strict_ansi_only;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4188 select = "^([ \t]*#[ \t]*if.*)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4189 "(__STDC__[ \t]*!=[ \t]*0"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4190 "|__STDC__[ \t]*==[ \t]*1"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4191 "|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4192 "|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4193 c_test = stdc_0_in_system_headers;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4194
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4195 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4196 c_fix_arg = "%1 defined(__STRICT_ANSI__)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4197
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4198 test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4199 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4200
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4201 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4202 * IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4203 * in prototype without previous definition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4204 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4205 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4206 hackname = struct_file;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4207 files = rpc/xdr.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4208 select = '^.*xdrstdio_create.*struct __file_s';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4209 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4210 c_fix_arg = "struct __file_s;\n%0";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4211 test_text = "extern void xdrstdio_create( struct __file_s* );";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4212 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4213
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4214 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4215 * IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4216 * in prototype without previous definition.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4217 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4218 * Don't fix OpenBSD, which uses struct sockaddr_in prototyping the same
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4219 * function, and does define it.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4220 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4221 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4222 hackname = struct_sockaddr;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4223 files = rpc/auth.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4224 select = "^.*authdes_create.*struct sockaddr[^_]";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4225 bypass = "<sys/socket\.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4226 bypass = "struct sockaddr;\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4227 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4228 c_fix_arg = "struct sockaddr;\n%0";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4229 test_text = "extern AUTH* authdes_create( struct sockaddr* );";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4230 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4231
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4232 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4233 * Apply fix this to all OSs since this problem seems to effect
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4234 * more than just SunOS.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4235 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4236 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4237 hackname = sun_auth_proto;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4238 files = rpc/auth.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4239 files = rpc/clnt.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4240 files = rpc/svc.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4241 files = rpc/xdr.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4242 bypass = "__cplusplus";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4243 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4244 * Select those files containing '(*name)()'.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4245 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4246 select = '\(\*[a-z][a-z_]*\)\(\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4247
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4248 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4249 c_fix_arg = "#ifdef __cplusplus\n%1(...);%2\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4250 "#else\n%1();%2\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4251 c_fix_arg = '(.*\(\*[a-z][a-z_]*\))\(\);(.*)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4252
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4253 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4254 "struct auth_t {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4255 " int (*name)(); /* C++ bad */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4256 "};";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4257 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4258
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4259 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4260 * Fix bogus #ifdef on SunOS 4.1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4261 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4262 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4263 hackname = sun_bogus_ifdef;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4264 files = "hsfs/hsfs_spec.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4265 files = "hsfs/iso_spec.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4266 select = '#ifdef(.*\|\|.*)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4267 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4268 c_fix_arg = "#if%1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4269
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4270 test_text = "#ifdef __i386__ || __vax__ || __sun4c__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4271 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4272
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4273 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4274 * Fix the CAT macro in SunOS memvar.h.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4275 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4276 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4277 hackname = sun_catmacro;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4278 files = pixrect/memvar.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4279 select = "^#define[ \t]+CAT\\(a,b\\).*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4280 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4281
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4282 c_fix_arg =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4283 "#ifdef __STDC__\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4284 "# define CAT(a,b) a##b\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4285 "#else\n%0\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4286
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4287 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4288 "#define CAT(a,b)\ta/**/b";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4289 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4290
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4291 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4292 * Fix return type of free and {c,m,re}alloc in <malloc.h> on SunOS 4.1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4293 * Also fix return type of {m,re}alloc in <malloc.h> on sysV68
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4294 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4295 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4296 hackname = sun_malloc;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4297 files = malloc.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4298 bypass = "_CLASSIC_ANSI_TYPES";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4299
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4300 sed = "s/typedef[ \t]char \\*\tmalloc_t/typedef void \\*\tmalloc_t/g";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4301 sed = "s/int[ \t][ \t]*free/void\tfree/g";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4302 sed = "s/char\\([ \t]*\\*[ \t]*malloc\\)/void\\1/g";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4303 sed = "s/char\\([ \t]*\\*[ \t]*realloc\\)/void\\1/g";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4304 sed = "s/char\\([ \t]*\\*[ \t]*calloc\\)/void\\1/g";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4305
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4306 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4307 "typedef char *\tmalloc_t;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4308 "int \tfree();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4309 "char*\tmalloc();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4310 "char*\tcalloc();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4311 "char*\trealloc();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4312 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4313
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4314 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4315 * Check for yet more missing ';' in struct (in SunOS 4.0.x)
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4316 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4317 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4318 hackname = sun_rusers_semi;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4319 files = rpcsvc/rusers.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4320 select = "_cnt$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4321 sed = "/^struct/,/^};/s/_cnt$/_cnt;/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4322 test_text = "struct mumble\n int _cnt\n};";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4323 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4324
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4325 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4326 * signal.h on SunOS defines signal using (),
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4327 * which causes trouble when compiling with g++ -pedantic.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4328 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4329 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4330 hackname = sun_signal;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4331 files = sys/signal.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4332 files = signal.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4333 select = "^void\t" '\(\*signal\(\)\)\(\);.*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4334
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4335 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4336 c_fix_arg =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4337 "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4338 "void\t(*signal(...))(...);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4339 "#else\n%0\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4340
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4341 test_text = "void\t(*signal())();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4342 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4343
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4344 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4345 * Correct the return type for strlen in strings.h in SunOS 4.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4346 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4347 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4348 hackname = sunos_strlen;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4349 files = strings.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4350 select = "int[ \t]*strlen\\(\\);(.*)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4351 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4352 c_fix_arg = "__SIZE_TYPE__ strlen();%1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4353 test_text = " int\tstrlen(); /* string length */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4354 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4355
111
kono
parents: 67
diff changeset
4356 /*
kono
parents: 67
diff changeset
4357 * Linux kernel's vt.h breaks C++
kono
parents: 67
diff changeset
4358 */
kono
parents: 67
diff changeset
4359 fix = {
kono
parents: 67
diff changeset
4360 hackname = suse_linux_vt_cxx;
kono
parents: 67
diff changeset
4361 files = linux/vt.h;
kono
parents: 67
diff changeset
4362
kono
parents: 67
diff changeset
4363 select = "^[ \t]*unsigned int new;";
kono
parents: 67
diff changeset
4364 c_fix = format;
kono
parents: 67
diff changeset
4365 c_fix_arg = "unsigned int newev;";
kono
parents: 67
diff changeset
4366
kono
parents: 67
diff changeset
4367 test_text = " unsigned int new; /* New console (if changing) */";
kono
parents: 67
diff changeset
4368 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4369
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4370 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4371 * Disable apparent native compiler optimization cruft in SVR4.2 <string.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4372 * that is visible to any ANSI compiler using this include. Simply
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4373 * delete the lines that #define some string functions to internal forms.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4374 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4375 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4376 hackname = svr4_disable_opt;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4377 files = string.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4378 select = '#define.*__std_hdr_';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4379 sed = '/#define.*__std_hdr_/d';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4380 test_text = "#define strlen __std_hdr_strlen\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4381 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4382
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4383 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4384 * Fix broken decl of getcwd present on some svr4 systems.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4385 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4386 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4387 hackname = svr4_getcwd;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4388 files = stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4389 files = unistd.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4390 files = prototypes.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4391 select = 'getcwd\(char \*, int\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4392
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4393 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4394 c_fix_arg = "getcwd(char *, size_t)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4395
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4396 test_text = "extern char* getcwd(char *, int);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4397 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4398
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4399 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4400 * Fix broken decl of profil present on some svr4 systems.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4401 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4402 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4403 hackname = svr4_profil;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4404 files = stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4405 files = unistd.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4406
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4407 select =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4408 'profil\(unsigned short \*, unsigned int, unsigned int, unsigned int\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4409 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4410 c_fix_arg = 'profil(unsigned short *, size_t, int, unsigned int)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4411
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4412 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4413 'profil(unsigned short *, unsigned int, unsigned int, unsigned int);';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4414 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4415
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4416 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4417 * Correct types for signal handler constants like SIG_DFL; they might be
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4418 * void (*) (), and should be void (*) (int). C++ doesn't like the
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4419 * old style.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4420 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4421 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4422 hackname = svr4_sighandler_type;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4423 files = sys/signal.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4424 select = 'void *\(\*\)\(\)';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4425 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4426 c_fix_arg = "void (*)(int)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4427 test_text = "#define SIG_DFL (void(*)())0\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4428 "#define SIG_IGN (void (*)())0\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4429 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4430
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4431 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4432 * Some SysV r4 systems, including Sequent's DYNIX/ptx, use the local
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4433 * function 'getrnge' in <regexp.h> before they declare it. For these
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4434 * systems add a 'static int' declaration of 'getrnge' into <regexp.h>
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4435 * early on.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4436 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4437 * 'getrnge' traditionally manipulates a file-scope global called 'size',
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4438 * so put the declaration right after the declaration of 'size'.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4439 *
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4440 * Don't do this if there is already a `static void getrnge' declaration
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4441 * present, since this would cause a redeclaration error. Solaris 2.x has
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4442 * such a declaration.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4443 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4444 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4445 hackname = svr4_undeclared_getrnge;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4446 files = regexp.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4447 select = "getrnge";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4448 bypass = "static void getrnge";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4449 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4450 c_fix_arg = "%0\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4451 "static int getrnge ();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4452 c_fix_arg = "^static int[ \t]+size;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4453 test_text = "static int size;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4454 "/* stuff which calls getrnge() */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4455 "static getrnge()\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4456 "{}";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4457 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4458
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4459 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4460 * Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4461 * in string.h on sysV68
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4462 * Correct the return type for strlen in string.h on Lynx.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4463 * Correct the argument type for ffs in string.h on Alpha OSF/1 V2.0.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4464 * Add missing const for strdup on OSF/1 V3.0.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4465 * On sysV88 layout is slightly different.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4466 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4467 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4468 hackname = sysv68_string;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4469 files = testing.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4470 files = string.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4471 bypass = "_CLASSIC_ANSI_TYPES";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4472
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4473 sed = "s/extern[ \t]*int[ \t]*strlen();/extern unsigned int strlen();/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4474 sed = "s/extern[ \t]*int[ \t]*ffs[ \t]*(long);/extern int ffs(int);/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4475 sed = "s/strdup(char \\*s1);/strdup(const char *s1);/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4476
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4477 sed = "/^extern char$/N";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4478 sed = "s/^extern char\\(\\n\t\\*memccpy(),\\)$/extern void\\1/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4479
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4480 sed = "/^extern int$/N";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4481 sed = "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4482
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4483 sed = "/^\tstrncmp(),$/N";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4484 sed = 's/^\(' "\t" 'strncmp()\),\n\(' "\t" 'strlen(),\)$/'
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4485 '\1;' "\\\nextern unsigned int\\\n\\2/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4486
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4487 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4488 "extern int strlen();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4489
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4490 "extern int ffs(long);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4491
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4492 "extern char\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4493 "\t*memccpy(),\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4494 "\tmemcpy();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4495
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4496 "extern int\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4497 "\tstrcmp(),\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4498 "\tstrncmp(),\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4499 "\tstrlen(),\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4500 "\tstrspn();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4501
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4502 "extern int\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4503 "\tstrlen(), strspn();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4504 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4505
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4506 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4507 * Fix return type of calloc, malloc, realloc, bsearch and exit
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4508 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4509 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4510 hackname = sysz_stdlib_for_sun;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4511 files = stdlib.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4512 bypass = "_CLASSIC_ANSI_TYPES";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4513
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4514 select = "char[ \t]*\\*[ \t]*(calloc|malloc|realloc|bsearch)[ \t]*\\(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4515 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4516 c_fix_arg = "void *\t%1(";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4517
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4518 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4519 "extern char*\tcalloc(size_t);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4520 "extern char*\tmalloc(size_t);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4521 "extern char*\trealloc(void*,size_t);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4522 "extern char*\tbsearch(void*,size_t,size_t);\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4523 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4524
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4525 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4526 * __thread is now a keyword.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4527 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4528 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4529 hackname = thread_keyword;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4530 files = "pthread.h";
111
kono
parents: 67
diff changeset
4531 files = bits/sigthread.h, '*/bits/sigthread.h';
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4532 select = "([* ])__thread([,)])";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4533 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4534 c_fix_arg = "%1__thr%2";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4535
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4536 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4537 "extern int pthread_create (pthread_t *__restrict __thread,\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4538 "extern int pthread_kill (pthread_t __thread, int __signo);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4539 "extern int pthread_cancel (pthread_t __thread);";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4540 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4541
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4542 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4543 * if the #if says _cplusplus, not the double underscore __cplusplus
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4544 * that it should be
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4545 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4546 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4547 hackname = tinfo_cplusplus;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4548 files = tinfo.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4549 select = "[ \t]_cplusplus";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4550
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4551 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4552 c_fix_arg = " __cplusplus";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4553 test_text = "#ifdef _cplusplus\nint bogus;\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4554 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4555
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4556 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4557 * parameters not const on DECstation Ultrix V4.0 and OSF/1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4558 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4559 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4560 hackname = ultrix_const;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4561 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4562 select = 'perror\( char \*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4563
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4564 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4565 c_fix_arg = "%1 const %3 *__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4566 c_fix_arg = "([ \t*](perror|fputs|fwrite|scanf|fscanf)\\(.*)"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4567 "[ \t]+(char|void) \\*__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4568
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4569 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4570 "extern void perror( char *__s );\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4571 "extern int fputs( char *__s, FILE *);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4572 "extern size_t fwrite( void *__ptr, size_t, size_t, FILE *);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4573 "extern int fscanf( FILE *__stream, char *__format, ...);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4574 "extern int scanf( char *__format, ...);\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4575 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4576
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4577 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4578 * parameters not const on DECstation Ultrix V4.0 and OSF/1.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4579 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4580 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4581 hackname = ultrix_const2;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4582 files = stdio.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4583
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4584 select = '\*fopen\( char \*';
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4585 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4586 c_fix_arg = "%1( const char *%3, const char *";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4587 c_fix_arg = "([ \t*](fopen|sscanf|popen|tempnam))\\("
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4588 "[ \t]*char[ \t]*\\*([^,]*),"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4589 "[ \t]*char[ \t]*\\*[ \t]*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4590
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4591 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4592 "extern FILE *fopen( char *__filename, char *__type );\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4593 "extern int sscanf( char *__s, char *__format, ...);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4594 "extern FILE *popen(char *, char *);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4595 "extern char *tempnam(char*,char*);\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4596 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4597
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4598 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4599 * Fix definitions of macros used by va-i960.h in VxWorks header file.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4600 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4601 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4602 hackname = va_i960_macro;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4603 files = arch/i960/archI960.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4604 select = "__(vsiz|vali|vpad|alignof__)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4605
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4606 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4607 c_fix_arg = "__vx%1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4608
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4609 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4610 "extern int __vsiz vsiz;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4611 "extern int __vali vali;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4612 "extern int __vpad vpad;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4613 "#define __alignof__(x) ...";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4614 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4615
111
kono
parents: 67
diff changeset
4616 /*
kono
parents: 67
diff changeset
4617 * On VMS, add missing braces around sigset_t constants.
kono
parents: 67
diff changeset
4618 */
kono
parents: 67
diff changeset
4619 fix = {
kono
parents: 67
diff changeset
4620 hackname = vms_add_missing_braces;
kono
parents: 67
diff changeset
4621 select = "(_SIG_[A-Z]+_SET[ \t]+= \\{)(0x[0F]+, 0x[0F]+)";
kono
parents: 67
diff changeset
4622 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4623 files = "rtldef/signal.h";
kono
parents: 67
diff changeset
4624 c_fix = format;
kono
parents: 67
diff changeset
4625
kono
parents: 67
diff changeset
4626 c_fix_arg = '%1 {%2} ';
kono
parents: 67
diff changeset
4627
kono
parents: 67
diff changeset
4628 test_text = "static const __sigset_t _SIG_EMPTY_SET = "
kono
parents: 67
diff changeset
4629 "{0x00000000, 0x00000000},\n"
kono
parents: 67
diff changeset
4630 " _SIG_FULL_SET = {0xFFFFFFFF, 0xFFFFFFFF};\n";
kono
parents: 67
diff changeset
4631 };
kono
parents: 67
diff changeset
4632
kono
parents: 67
diff changeset
4633 /*
kono
parents: 67
diff changeset
4634 * On VMS, some DEC-C builtins are directly used.
kono
parents: 67
diff changeset
4635 */
kono
parents: 67
diff changeset
4636 fix = {
kono
parents: 67
diff changeset
4637 hackname = vms_decc_builtin;
kono
parents: 67
diff changeset
4638 select = "(__MEMSET|__MEMMOVE|__MEMCPY|__STRLEN|__STRCPY)";
kono
parents: 67
diff changeset
4639 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4640 files = rtldef/string.h, rtldef/time.h, rtldef/strings.h,
kono
parents: 67
diff changeset
4641 rtldef/socket.h;
kono
parents: 67
diff changeset
4642 sed = "s@__MEMSET@memset@";
kono
parents: 67
diff changeset
4643 sed = "s@__MEMMOVE@memmove@";
kono
parents: 67
diff changeset
4644 sed = "s@__MEMCPY@memcpy@";
kono
parents: 67
diff changeset
4645 sed = "s@__STRLEN@strlen@";
kono
parents: 67
diff changeset
4646 sed = "s@__STRCPY@strcpy@";
kono
parents: 67
diff changeset
4647
kono
parents: 67
diff changeset
4648 test_text = "define FD_ZERO(__p) __MEMSET((__p), 0, sizeof(*(__p)))\n";
kono
parents: 67
diff changeset
4649 };
kono
parents: 67
diff changeset
4650
kono
parents: 67
diff changeset
4651 /*
kono
parents: 67
diff changeset
4652 * Define __CAN_USE_EXTERN_PREFIX on vms.
kono
parents: 67
diff changeset
4653 */
kono
parents: 67
diff changeset
4654 fix = {
kono
parents: 67
diff changeset
4655 hackname = vms_define_can_use_extern_prefix;
kono
parents: 67
diff changeset
4656 files = "rtldef/decc$types.h";
kono
parents: 67
diff changeset
4657 select = "#[ \t]*else\n"
kono
parents: 67
diff changeset
4658 "#[ \t]*if defined\\(__DECCXX\\)\n"
kono
parents: 67
diff changeset
4659 "#[ \t]*define __CAN_USE_EXTERN_PREFIX 1\n";
kono
parents: 67
diff changeset
4660 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4661 c_fix = format;
kono
parents: 67
diff changeset
4662
kono
parents: 67
diff changeset
4663 c_fix_arg = "%0"
kono
parents: 67
diff changeset
4664 "# elif defined (__GNUC__)\n"
kono
parents: 67
diff changeset
4665 "#\tdefine __CAN_USE_EXTERN_PREFIX 1\n";
kono
parents: 67
diff changeset
4666
kono
parents: 67
diff changeset
4667 test_text = "# else\n"
kono
parents: 67
diff changeset
4668 "# if defined(__DECCXX)\n"
kono
parents: 67
diff changeset
4669 "#\tdefine __CAN_USE_EXTERN_PREFIX 1\n"
kono
parents: 67
diff changeset
4670 "# endif\n"
kono
parents: 67
diff changeset
4671 "# endif\n";
kono
parents: 67
diff changeset
4672 };
kono
parents: 67
diff changeset
4673
kono
parents: 67
diff changeset
4674 /*
kono
parents: 67
diff changeset
4675 * On VMS, disable the use of dec-c string builtins
kono
parents: 67
diff changeset
4676 */
kono
parents: 67
diff changeset
4677 fix = {
kono
parents: 67
diff changeset
4678 hackname = vms_disable_decc_string_builtins;
kono
parents: 67
diff changeset
4679 select = "#if !defined\\(__VAX\\)\n";
kono
parents: 67
diff changeset
4680 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4681 files = "rtldef/string.h";
kono
parents: 67
diff changeset
4682 c_fix = format;
kono
parents: 67
diff changeset
4683
kono
parents: 67
diff changeset
4684 c_fix_arg = "#if !defined(__VAX) && !defined(__GNUC__)\n";
kono
parents: 67
diff changeset
4685
kono
parents: 67
diff changeset
4686 test_text = "#if !defined(__VAX)\n";
kono
parents: 67
diff changeset
4687 };
kono
parents: 67
diff changeset
4688
kono
parents: 67
diff changeset
4689 /*
kono
parents: 67
diff changeset
4690 * On VMS, fix incompatible redeclaration of hostalias.
kono
parents: 67
diff changeset
4691 */
kono
parents: 67
diff changeset
4692 fix = {
kono
parents: 67
diff changeset
4693 hackname = vms_do_not_redeclare_hostalias;
kono
parents: 67
diff changeset
4694 select = "(void[ \t]+fp_nquery \\(const u_char \\*, int, FILE \\*\\);)\n"
kono
parents: 67
diff changeset
4695 "(__char_ptr32[ \t]+hostalias \\(const char \\*\\);)";
kono
parents: 67
diff changeset
4696 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4697 files = "rtldef/resolv.h";
kono
parents: 67
diff changeset
4698 c_fix = format;
kono
parents: 67
diff changeset
4699
kono
parents: 67
diff changeset
4700 c_fix_arg = "%1\n"
kono
parents: 67
diff changeset
4701 "/* %2 */";
kono
parents: 67
diff changeset
4702
kono
parents: 67
diff changeset
4703 test_text = "void fp_nquery (const u_char *, int, FILE *);\n"
kono
parents: 67
diff changeset
4704 "__char_ptr32 hostalias (const char *);\n";
kono
parents: 67
diff changeset
4705 };
kono
parents: 67
diff changeset
4706
kono
parents: 67
diff changeset
4707 /*
kono
parents: 67
diff changeset
4708 * On VMS, forward declare structure before referencing them in prototypes.
kono
parents: 67
diff changeset
4709 */
kono
parents: 67
diff changeset
4710 fix = {
kono
parents: 67
diff changeset
4711 hackname = vms_forward_declare_struct;
kono
parents: 67
diff changeset
4712 select = "(/\\* forward decls for C\\+\\+ \\*/\n)"
kono
parents: 67
diff changeset
4713 "#ifdef __cplusplus\n";
kono
parents: 67
diff changeset
4714 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4715 files = rtldef/if.h;
kono
parents: 67
diff changeset
4716 c_fix = format;
kono
parents: 67
diff changeset
4717
kono
parents: 67
diff changeset
4718 c_fix_arg = "%1"
kono
parents: 67
diff changeset
4719 "#if defined (__cplusplus) || defined (__GNUC__)\n";
kono
parents: 67
diff changeset
4720
kono
parents: 67
diff changeset
4721 test_text = "/* forward decls for C++ */\n"
kono
parents: 67
diff changeset
4722 "#ifdef __cplusplus\n"
kono
parents: 67
diff changeset
4723 "struct foo;\n"
kono
parents: 67
diff changeset
4724 "#endif\n";
kono
parents: 67
diff changeset
4725 };
kono
parents: 67
diff changeset
4726
kono
parents: 67
diff changeset
4727 /*
kono
parents: 67
diff changeset
4728 * On VMS, do not declare getopt and al if pointers are 64 bit.
kono
parents: 67
diff changeset
4729 */
kono
parents: 67
diff changeset
4730 fix = {
kono
parents: 67
diff changeset
4731 hackname = vms_no_64bit_getopt;
kono
parents: 67
diff changeset
4732 select = "^[ \t]*(extern[ \t]*)?(int[ \t]*(getopt|optind|opterr|optopt)"
kono
parents: 67
diff changeset
4733 "|(char \\*optarg))([ \t]*\\(.*\\))?;\n";
kono
parents: 67
diff changeset
4734 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4735 files = rtldef/stdio.h, rtldef/unistd.h;
kono
parents: 67
diff changeset
4736 c_fix = format;
kono
parents: 67
diff changeset
4737
kono
parents: 67
diff changeset
4738 c_fix_arg = <<- _EOArg_
kono
parents: 67
diff changeset
4739 #if __INITIAL_POINTER_SIZE != 64 /* getopt is short ptr only. */
kono
parents: 67
diff changeset
4740 %0#endif
kono
parents: 67
diff changeset
4741
kono
parents: 67
diff changeset
4742 _EOArg_;
kono
parents: 67
diff changeset
4743
kono
parents: 67
diff changeset
4744 test_text = "int getopt (int, char * const [], const char *);";
kono
parents: 67
diff changeset
4745 };
kono
parents: 67
diff changeset
4746
kono
parents: 67
diff changeset
4747 /*
kono
parents: 67
diff changeset
4748 * On VMS, force the use of fast setjmp, as the normal setjmp uses conditions
kono
parents: 67
diff changeset
4749 * which is not yet fully supported by gcc.
kono
parents: 67
diff changeset
4750 */
kono
parents: 67
diff changeset
4751 fix = {
kono
parents: 67
diff changeset
4752 hackname = vms_use_fast_setjmp;
kono
parents: 67
diff changeset
4753 select = "(#[ \t]*if[ \t]*defined\\(__FAST_SETJMP\\)[ \t]*\\|\\|)";
kono
parents: 67
diff changeset
4754 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4755 files = rtldef/setjmp.h;
kono
parents: 67
diff changeset
4756 c_fix = format;
kono
parents: 67
diff changeset
4757
kono
parents: 67
diff changeset
4758 c_fix_arg = "%0 defined (__GNUC__) ||";
kono
parents: 67
diff changeset
4759
kono
parents: 67
diff changeset
4760 test_text = "# if defined(__FAST_SETJMP) || defined(__UNIX_SETJMP)";
kono
parents: 67
diff changeset
4761 };
kono
parents: 67
diff changeset
4762
kono
parents: 67
diff changeset
4763 /*
kono
parents: 67
diff changeset
4764 * On VMS, use pragma extern_model instead of VAX-C keywords.
kono
parents: 67
diff changeset
4765 */
kono
parents: 67
diff changeset
4766 fix = {
kono
parents: 67
diff changeset
4767 hackname = vms_use_pragma_extern_model;
kono
parents: 67
diff changeset
4768 select = "#if defined\\(__DECC\\) \\|\\| defined\\(__DECCXX\\)\n"
kono
parents: 67
diff changeset
4769 "# pragma extern_model __save\n";
kono
parents: 67
diff changeset
4770 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4771 c_fix = format;
kono
parents: 67
diff changeset
4772
kono
parents: 67
diff changeset
4773 c_fix_arg = "#if defined(__DECC) || defined(__DECCXX) || defined(__GNUC__)\n"
kono
parents: 67
diff changeset
4774 "# pragma extern_model __save\n";
kono
parents: 67
diff changeset
4775
kono
parents: 67
diff changeset
4776 test_text = "#if defined(__DECC) || defined(__DECCXX)\n"
kono
parents: 67
diff changeset
4777 "# pragma extern_model __save\n"
kono
parents: 67
diff changeset
4778 "# pragma extern_model strict_refdef\n"
kono
parents: 67
diff changeset
4779 " extern struct x zz$yy;\n"
kono
parents: 67
diff changeset
4780 "# pragma extern_model __restore\n"
kono
parents: 67
diff changeset
4781 "#endif\n";
kono
parents: 67
diff changeset
4782 };
kono
parents: 67
diff changeset
4783
kono
parents: 67
diff changeset
4784 /*
kono
parents: 67
diff changeset
4785 * On VMS, change <resource.h> to <sys/resource.h> to avoid a
kono
parents: 67
diff changeset
4786 * conflict while building gcc. Likewise for <builtins.h>
kono
parents: 67
diff changeset
4787 */
kono
parents: 67
diff changeset
4788 fix = {
kono
parents: 67
diff changeset
4789 hackname = vms_use_quoted_include;
kono
parents: 67
diff changeset
4790 select = "(#[ \t]*include[ \t]+)<(resource|builtins)\\.h>";
kono
parents: 67
diff changeset
4791 mach = "*-*-*vms*";
kono
parents: 67
diff changeset
4792 files = rtldef/wait.h, starlet_c/pthread.h;
kono
parents: 67
diff changeset
4793 c_fix = format;
kono
parents: 67
diff changeset
4794
kono
parents: 67
diff changeset
4795 c_fix_arg = '%1<sys/%2.h>';
kono
parents: 67
diff changeset
4796
kono
parents: 67
diff changeset
4797 test_text = "# include <resource.h>";
kono
parents: 67
diff changeset
4798 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4799
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4800 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4801 * AIX and Interix headers define NULL to be cast to a void pointer,
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4802 * which is illegal in ANSI C++.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4803 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4804 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4805 hackname = void_null;
111
kono
parents: 67
diff changeset
4806 files = curses.h, dbm.h, locale.h, stdio.h, stdlib.h, string.h,
kono
parents: 67
diff changeset
4807 time.h, unistd.h, sys/dir.h, sys/param.h, sys/types.h;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4808 /* avoid changing C++ friendly NULL */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4809 bypass = __cplusplus;
111
kono
parents: 67
diff changeset
4810 bypass = __null;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4811 select = "^#[ \t]*define[ \t]+NULL[ \t]+\\(\\(void[ \t]*\\*\\)0\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4812 c_fix = format;
111
kono
parents: 67
diff changeset
4813 c_fix_arg = <<- _EOFix_
kono
parents: 67
diff changeset
4814 #ifndef NULL
kono
parents: 67
diff changeset
4815 #ifdef __cplusplus
kono
parents: 67
diff changeset
4816 #ifdef __GNUG__
kono
parents: 67
diff changeset
4817 #define NULL __null
kono
parents: 67
diff changeset
4818 #else /* ! __GNUG__ */
kono
parents: 67
diff changeset
4819 #define NULL 0L
kono
parents: 67
diff changeset
4820 #endif /* __GNUG__ */
kono
parents: 67
diff changeset
4821 #else /* ! __cplusplus */
kono
parents: 67
diff changeset
4822 #define NULL ((void *)0)
kono
parents: 67
diff changeset
4823 #endif /* __cplusplus */
kono
parents: 67
diff changeset
4824 #endif /* !NULL */
kono
parents: 67
diff changeset
4825 _EOFix_;
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4826 test_text = "# define\tNULL \t((void *)0) /* typed NULL */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4827 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4828
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4829 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4830 * Make VxWorks header which is almost gcc ready fully gcc ready.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4831 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4832 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4833 hackname = vxworks_gcc_problem;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4834 files = types/vxTypesBase.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4835 select = "__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4836
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4837 sed = "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4838 "#if 1/";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4839
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4840 sed = "/[ \t]size_t/i\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4841 "#ifndef _GCC_SIZE_T\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4842 "#define _GCC_SIZE_T\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4843
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4844 sed = "/[ \t]size_t/a\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4845 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4846
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4847 sed = "/[ \t]ptrdiff_t/i\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4848 "#ifndef _GCC_PTRDIFF_T\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4849 "#define _GCC_PTRDIFF_T\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4850
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4851 sed = "/[ \t]ptrdiff_t/a\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4852 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4853
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4854 sed = "/[ \t]wchar_t/i\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4855 "#ifndef _GCC_WCHAR_T\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4856 "#define _GCC_WCHAR_T\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4857
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4858 sed = "/[ \t]wchar_t/a\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4859 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4860
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4861 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4862 "#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4863 "typedef unsigned int size_t;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4864 "typedef long ptrdiff_t;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4865 "typedef unsigned short wchar_t;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4866 "#endif /* __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__ */\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4867 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4868
111
kono
parents: 67
diff changeset
4869 /*
kono
parents: 67
diff changeset
4870 * Wrap VxWorks ioctl to keep everything pretty
kono
parents: 67
diff changeset
4871 */
kono
parents: 67
diff changeset
4872 fix = {
kono
parents: 67
diff changeset
4873 hackname = vxworks_ioctl_macro;
kono
parents: 67
diff changeset
4874 files = ioLib.h;
kono
parents: 67
diff changeset
4875 mach = "*-*-vxworks*";
kono
parents: 67
diff changeset
4876
kono
parents: 67
diff changeset
4877 c_fix = format;
kono
parents: 67
diff changeset
4878 c_fix_arg = "%0\n"
kono
parents: 67
diff changeset
4879 "#define ioctl(fd, func, arg) (ioctl)(fd, func, (int)(arg))\n";
kono
parents: 67
diff changeset
4880 c_fix_arg = "extern[\t ]+int[\t ]+ioctl[\t ]*\\([\t ,[:alnum:]]*\\);";
kono
parents: 67
diff changeset
4881
kono
parents: 67
diff changeset
4882 test_text = "extern int ioctl ( int asdf1234, int jkl , int qwerty ) ;";
kono
parents: 67
diff changeset
4883 };
kono
parents: 67
diff changeset
4884
kono
parents: 67
diff changeset
4885 /*
kono
parents: 67
diff changeset
4886 * Wrap VxWorks mkdir to be posix compliant
kono
parents: 67
diff changeset
4887 */
kono
parents: 67
diff changeset
4888 fix = {
kono
parents: 67
diff changeset
4889 hackname = vxworks_mkdir_macro;
kono
parents: 67
diff changeset
4890 files = sys/stat.h;
kono
parents: 67
diff changeset
4891 mach = "*-*-vxworks*";
kono
parents: 67
diff changeset
4892
kono
parents: 67
diff changeset
4893 c_fix = format;
kono
parents: 67
diff changeset
4894 c_fix_arg = "%0\n"
kono
parents: 67
diff changeset
4895 "#define mkdir(dir, ...) ((void)0, ##__VA_ARGS__, (mkdir)(dir))\n";
kono
parents: 67
diff changeset
4896 c_fix_arg = "extern[\t ]+STATUS[\t ]+mkdir[\t ]*"
kono
parents: 67
diff changeset
4897 "\\([\t ]*const[\t ]+char[\t ]*\\*[\t ]*" /* arg type */
kono
parents: 67
diff changeset
4898 "(|[_[:alpha:]][_[:alnum:]]*)" /* arg name (optional) */
kono
parents: 67
diff changeset
4899 "\\)[\t ]*;";
kono
parents: 67
diff changeset
4900
kono
parents: 67
diff changeset
4901 test_text = "extern STATUS mkdir (const char * _qwerty) ;";
kono
parents: 67
diff changeset
4902 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4903
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4904 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4905 * Fix VxWorks <time.h> to not require including <vxTypes.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4906 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4907 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4908 hackname = vxworks_needs_vxtypes;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4909 files = time.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4910 select = "uint_t([ \t]+_clocks_per_sec)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4911 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4912 c_fix_arg = "unsigned int%1";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4913 test_text = "uint_t\t_clocks_per_sec;";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4914 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4915
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4916 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4917 * Fix VxWorks <sys/stat.h> to not require including <vxWorks.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4918 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4919 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4920 hackname = vxworks_needs_vxworks;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4921 files = sys/stat.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4922 test = " -r types/vxTypesOld.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4923 test = " -n \"`egrep '#include' $file`\"";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4924 test = " -n \"`egrep ULONG $file`\"";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4925 select = "#[ \t]define[ \t]+__INCstath";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4926
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4927 sed = "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4928 "#include <types/vxTypesOld.h>\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4929
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4930 test_text = "`touch types/vxTypesOld.h`"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4931 "#include </dev/null> /* ULONG */\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4932 "# define\t__INCstath <sys/stat.h>";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4933 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4934
111
kono
parents: 67
diff changeset
4935 /*
kono
parents: 67
diff changeset
4936 * Make it so VxWorks does not include gcc/regs.h accidentally
kono
parents: 67
diff changeset
4937 */
kono
parents: 67
diff changeset
4938 fix = {
kono
parents: 67
diff changeset
4939 hackname = vxworks_regs;
kono
parents: 67
diff changeset
4940 mach = "*-*-vxworks*";
kono
parents: 67
diff changeset
4941
kono
parents: 67
diff changeset
4942 select = "#[\t ]*include[\t ]+[<\"]regs.h[>\"]";
kono
parents: 67
diff changeset
4943 c_fix = format;
kono
parents: 67
diff changeset
4944 c_fix_arg = "#include <arch/../regs.h>";
kono
parents: 67
diff changeset
4945
kono
parents: 67
diff changeset
4946 test_text = "#include <regs.h>\n";
kono
parents: 67
diff changeset
4947 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4948
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4949 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4950 * Another bad dependency in VxWorks 5.2 <time.h>.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4951 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4952 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4953 hackname = vxworks_time;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4954 files = time.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4955 test = " -r vxWorks.h";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4956
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4957 select = "#[ \t]*define[ \t]+VOIDFUNCPTR[ \t].*";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4958 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4959
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4960 c_fix_arg =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4961 "#ifndef __gcc_VOIDFUNCPTR_defined\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4962 "#ifdef __cplusplus\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4963 "typedef void (*__gcc_VOIDFUNCPTR) (...);\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4964 "#else\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4965 "typedef void (*__gcc_VOIDFUNCPTR) ();\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4966 "#endif\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4967 "#define __gcc_VOIDFUNCPTR_defined\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4968 "#endif\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4969 "#define VOIDFUNCPTR __gcc_VOIDFUNCPTR";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4970
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4971 test_text = "`touch vxWorks.h`"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4972 "#define VOIDFUNCPTR (void(*)())";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4973 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4974
111
kono
parents: 67
diff changeset
4975 /*
kono
parents: 67
diff changeset
4976 * This hack makes write const-correct on VxWorks
kono
parents: 67
diff changeset
4977 */
kono
parents: 67
diff changeset
4978 fix = {
kono
parents: 67
diff changeset
4979 hackname = vxworks_write_const;
kono
parents: 67
diff changeset
4980 files = ioLib.h;
kono
parents: 67
diff changeset
4981 mach = "*-*-vxworks*";
kono
parents: 67
diff changeset
4982
kono
parents: 67
diff changeset
4983 c_fix = format;
kono
parents: 67
diff changeset
4984 c_fix_arg = "extern int write (int, const char*, size_t);";
kono
parents: 67
diff changeset
4985 c_fix_arg = "extern[\t ]+int[\t ]+write[\t ]*\\("
kono
parents: 67
diff changeset
4986 "[\t ]*int[\t ]*,"
kono
parents: 67
diff changeset
4987 "[\t ]*char[\t ]*\\*[\t ]*,"
kono
parents: 67
diff changeset
4988 "[\t ]*size_t[\t ]*\\)[\t ]*;";
kono
parents: 67
diff changeset
4989
kono
parents: 67
diff changeset
4990 test_text = "extern int write ( int , char * , size_t ) ;";
kono
parents: 67
diff changeset
4991 };
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4992
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4993 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4994 * There are several name conflicts with C++ reserved words in X11 header
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4995 * files. These are fixed in some versions, so don't do the fixes if
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4996 * we find __cplusplus in the file. These were found on the RS/6000.
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4997 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4998 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4999 hackname = x11_class;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5000 files = X11/ShellP.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5001 bypass = __cplusplus;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5002 select = "^([ \t]*char \\*)class;(.*)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5003 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5004 c_fix_arg = "#ifdef __cplusplus\n%1c_class;%2\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5005 "#else\n%1class;%2\n#endif";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5006 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5007 "struct {\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5008 " char *class;\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5009 "} mumble;\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5010 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5011
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5012 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5013 * class in Xm/BaseClassI.h
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5014 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5015 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5016 hackname = x11_class_usage;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5017 files = Xm/BaseClassI.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5018 bypass = "__cplusplus";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5019
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5020 select = " class\\)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5021 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5022 c_fix_arg = " c_class)";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5023
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5024 test_text = "extern mumble (int class);\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5025 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5026
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5027 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5028 * new in Xm/Traversal.h
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5029 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5030 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5031 hackname = x11_new;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5032 files = Xm/Traversal.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5033 bypass = __cplusplus;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5034
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5035 sed = "/Widget\told, new;/i\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5036 "#ifdef __cplusplus\\\n"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
5037 "\\\tWidget\told, c_new;\\\n"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5038 "#else\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5039
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5040 sed = "/Widget\told, new;/a\\\n"
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5041 "#endif\n";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5042
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5043 sed = "s/Widget new,/Widget c_new,/g";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5044 test_text =
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5045 "struct wedge {\n"
55
77e2b8dfacca update it from 4.4.3 to 4.5.0
ryoma <e075725@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
5046 " Widget\told, new;\n"
0
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5047 "};\nextern Wedged( Widget new, Widget old );";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5048 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5049
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5050 /*
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5051 * Incorrect sprintf declaration in X11/Xmu.h
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5052 */
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5053 fix = {
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5054 hackname = x11_sprintf;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5055 files = X11/Xmu.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5056 files = X11/Xmu/Xmu.h;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5057 select = "^extern char \\*\tsprintf\\(\\);$";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5058
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5059 c_fix = format;
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5060 c_fix_arg = "#ifndef __STDC__\n%0\n#endif /* !defined __STDC__ */";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5061
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5062 test_text = "extern char *\tsprintf();";
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5063 };
a06113de4d67 first commit
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5064 /*EOF*/