1999-10-19 21:22:45 +08:00
|
|
|
|
1999-03-03 15:41:52 +08:00
|
|
|
/* -*- Mode: C -*- */
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
autogen definitions fixincl;
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-01 07:59:45 +08:00
|
|
|
/* Define all the fixes we know about for repairing damaged headers.
|
|
|
|
Please see the README before adding or changing entries in this file.
|
1999-10-12 22:44:18 +08:00
|
|
|
|
2000-05-01 07:59:45 +08:00
|
|
|
Set up a debug test so we can make the templates emit special
|
|
|
|
code while debugging these fixes: */
|
1999-10-12 22:44:18 +08:00
|
|
|
|
1999-12-30 06:59:16 +08:00
|
|
|
#ifdef DEBUG
|
|
|
|
FIXINC_DEBUG = yes;
|
|
|
|
#endif
|
1999-10-12 22:44:18 +08:00
|
|
|
|
1999-12-30 06:59:16 +08:00
|
|
|
/* DO NOT DO BROKEN FIXES (empty replacement fixes) */
|
1999-11-15 22:47:53 +08:00
|
|
|
|
1999-10-12 22:44:18 +08:00
|
|
|
/*
|
1999-12-30 06:59:16 +08:00
|
|
|
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
1999-10-12 22:44:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAA_ki_iface;
|
|
|
|
files = sys/ki_iface.h;
|
|
|
|
select = 'These definitions are for HP Internal developers';
|
|
|
|
replace; /* empty replacement -> no fixing the file */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
1999-12-30 06:59:16 +08:00
|
|
|
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
1999-10-12 22:44:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAA_ki;
|
|
|
|
files = sys/ki.h;
|
|
|
|
select = '11.00 HP-UX LP64';
|
|
|
|
replace; /* empty replacement -> no fixing the file */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
1999-12-30 06:59:16 +08:00
|
|
|
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
1999-10-12 22:44:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAA_ki_calls;
|
|
|
|
files = sys/ki_calls.h;
|
|
|
|
select = 'kthread_create_caller_t';
|
|
|
|
replace; /* empty replacement -> no fixing the file */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
1999-12-30 06:59:16 +08:00
|
|
|
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
1999-10-12 22:44:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAA_ki_defs;
|
|
|
|
files = sys/ki_defs.h;
|
|
|
|
select = 'Kernel Instrumentation Definitions';
|
|
|
|
replace; /* empty replacement -> no fixing the file */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-03-09 05:41:36 +08:00
|
|
|
/*
|
|
|
|
* Tru64 UNIX V4.0F/V5.1 <standards.h> defines _NO_PROTO and _NONSTD_TYPES
|
|
|
|
* correctly for GCC, but strict_ansi_not breaks it.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAA_standards;
|
|
|
|
files = standards.h;
|
|
|
|
select = 'GNU and MIPS C compilers define __STDC__ differently';
|
|
|
|
replace; /* empty replacement -> no fixing the file */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-10-12 22:44:18 +08:00
|
|
|
/*
|
|
|
|
* This file on SunOS 4 has a very large macro. When the sed loop
|
|
|
|
* tries pull it in, it overflows the pattern space size of the SunOS
|
|
|
|
* sed (GNU sed does not have this problem). Since the file does not
|
|
|
|
* require fixing, we remove it from the fixed directory.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAA_bad_fixes;
|
|
|
|
files = sundev/ipi_error.h;
|
|
|
|
/* shouldn't there be a select expression here??? */
|
|
|
|
replace; /* empty replacement -> no fixing the file */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
1999-12-30 06:59:16 +08:00
|
|
|
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
1999-10-12 22:44:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAA_time;
|
|
|
|
files = sys/time.h;
|
|
|
|
select = '11.0 and later representation of ki time';
|
|
|
|
replace; /* empty replacement -> no fixing the file */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* And now, the real fixes, replacement text fixes first: */
|
|
|
|
|
|
|
|
/*
|
2001-03-09 05:41:36 +08:00
|
|
|
* Completely replace <_int_varargs.h> with a file that includes gcc's
|
1999-10-12 22:44:18 +08:00
|
|
|
* stdarg.h or varargs.h files as appropriate on DG/UX
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_dgux_int_varargs;
|
|
|
|
files = _int_varargs.h;
|
|
|
|
replace = "#ifndef __INT_VARARGS_H
|
|
|
|
\#define __INT_VARARGS_H
|
|
|
|
|
|
|
|
/************************************************************************/
|
|
|
|
/* _INT_VARARGS.H - Define the common stuff for varargs/stdarg/stdio. */
|
|
|
|
/************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
** This file is a DG internal header. Never include this
|
|
|
|
** file directly.
|
|
|
|
*/
|
|
|
|
|
|
|
|
\#ifndef ___int_features_h
|
2001-03-09 05:41:36 +08:00
|
|
|
\#include <sys/_int_features.h>
|
1999-10-12 22:44:18 +08:00
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#if !(defined(_VA_LIST) || defined(_VA_LIST_))
|
|
|
|
\#define _VA_LIST
|
|
|
|
\#define _VA_LIST_
|
|
|
|
|
|
|
|
\#ifdef __LINT__
|
|
|
|
|
|
|
|
\#ifdef __STDC__
|
|
|
|
typedef void * va_list;
|
|
|
|
\#else
|
|
|
|
typedef char * va_list;
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#else
|
|
|
|
\#if _M88K_ANY
|
|
|
|
|
|
|
|
\#if defined(__DCC__)
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int next_arg;
|
|
|
|
int *mem_ptr;
|
|
|
|
int *reg_ptr;
|
|
|
|
} va_list;
|
|
|
|
|
|
|
|
\#else /* ! defined(__DCC__) */
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int __va_arg; /* argument number */
|
|
|
|
int *__va_stk; /* start of args passed on stack */
|
|
|
|
int *__va_reg; /* start of args passed in regs */
|
|
|
|
} va_list;
|
|
|
|
|
|
|
|
\#endif /* ! defined(__DCC__) */
|
|
|
|
|
|
|
|
\#elif _IX86_ANY
|
|
|
|
|
|
|
|
\#if defined(__GNUC__) || defined(__STDC__)
|
|
|
|
typedef void * va_list;
|
|
|
|
\#else
|
|
|
|
typedef char * va_list;
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#endif /* _IX86_ANY */
|
|
|
|
|
|
|
|
\#endif /* __LINT__ */
|
|
|
|
\#endif /* !(defined(_VA_LIST) || defined(_VA_LIST_)) */
|
|
|
|
\#endif /* #ifndef __INT_VARARGS_H */\n";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-11-22 23:05:48 +08:00
|
|
|
/*
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
* This fixes __FD_ZERO bug for linux 2.x.y (x <= 2 && y <= some n)
|
1999-11-22 23:05:48 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
hackname = AAB_fd_zero_asm_posix_types_h;
|
1999-11-22 23:05:48 +08:00
|
|
|
files = asm/posix_types.h;
|
2000-08-15 02:08:46 +08:00
|
|
|
mach = 'i[34567]86-*-linux*';
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
bypass = '} while';
|
1999-11-22 23:05:48 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Define _POSIX_TYPES_H_WRAPPER at the end of the wrapper, not
|
|
|
|
* the start, so that if #include_next gets another instance of
|
|
|
|
* the wrapper, this will follow the #include_next chain until
|
|
|
|
* we arrive at the real <asm/posix_types.h>.
|
|
|
|
*/
|
|
|
|
replace =
|
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
'/* This file fixes a bug in the __FD_ZERO macro
|
|
|
|
for older versions of the Linux kernel. */
|
1999-11-22 23:05:48 +08:00
|
|
|
\#ifndef _POSIX_TYPES_H_WRAPPER
|
|
|
|
\#include <features.h>
|
cppinit.c (cpp_start_read): Turn off -Wtraditional if processing C++.
* cppinit.c (cpp_start_read): Turn off -Wtraditional if
processing C++.
* cpplib.c (_cpp_handle_directive): Improve warnings for
traditional C and indented directives.
* enquire.c, gsyslimits.h, limity.h, config/convex/fixinc.convex,
fixinc/fixinc.irix, fixinc/fixinc.sco, fixinc/fixinc.wrap,
fixinc/inclhack.def: Indent the # of #include_next one space.
* cp/rtti.c: Un-indent #if and #endif.
* cppexp.c (_cpp_parse_expr): If lex returns '#', it's a
syntax error, but an error has already been printed.
* cpplex.c (_cpp_parse_assertion): Give a more specific error
message when called with nothing remaining on the line.
(_cpp_lex_token): If _cpp_parse_assertion fails, return an
OTHER token, not an ASSERTION.
* cpplib.c (do_assert): When we create a 'base' node, clear
its aschain pointer.
* gcc.c-torture/compile/981211-1.c: Move to...
* gcc.dg/cpp-as1.c: ...here.
* gcc.dg/cpp-as2.c: New file.
* gcc.dg/cpp-tradwarn1.c: Change warning regexps to match the
compiler.
From-SVN: r32870
2000-04-03 06:50:55 +08:00
|
|
|
\#include_next <asm/posix_types.h>
|
1999-11-22 23:05:48 +08:00
|
|
|
|
|
|
|
\#if defined(__FD_ZERO) && !defined(__GLIBC__)
|
|
|
|
\#undef __FD_ZERO
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
\#define __FD_ZERO(fdsetp) \\
|
|
|
|
do { \\
|
|
|
|
int __d0, __d1; \\
|
|
|
|
__asm__ __volatile__("cld ; rep ; stosl" \\
|
|
|
|
: "=&c" (__d0), "=&D" (__d1) \\
|
|
|
|
: "a" (0), "0" (__FDSET_LONGS), \\
|
|
|
|
"1" ((__kernel_fd_set *) (fdsetp)) :"memory"); \\
|
1999-11-22 23:05:48 +08:00
|
|
|
} while (0)
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#define _POSIX_TYPES_H_WRAPPER
|
|
|
|
\#endif /* _POSIX_TYPES_H_WRAPPER */
|
|
|
|
';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This fixes __FD_ZERO bug for glibc-1.x
|
|
|
|
*/
|
|
|
|
fix = {
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
hackname = AAB_fd_zero_gnu_types_h;
|
1999-11-22 23:05:48 +08:00
|
|
|
files = gnu/types.h;
|
2000-08-15 02:08:46 +08:00
|
|
|
mach = 'i[34567]86-*-linux*';
|
1999-11-22 23:05:48 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Define _TYPES_H_WRAPPER at the end of the wrapper, not
|
|
|
|
* the start, so that if #include_next gets another instance of
|
|
|
|
* the wrapper, this will follow the #include_next chain until
|
|
|
|
* we arrive at the real <gnu/types.h>.
|
|
|
|
*/
|
|
|
|
replace =
|
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
'/* This file fixes a bug in the __FD_ZERO macro present in glibc 1.x. */
|
1999-11-22 23:05:48 +08:00
|
|
|
\#ifndef _TYPES_H_WRAPPER
|
|
|
|
\#include <features.h>
|
cppinit.c (cpp_start_read): Turn off -Wtraditional if processing C++.
* cppinit.c (cpp_start_read): Turn off -Wtraditional if
processing C++.
* cpplib.c (_cpp_handle_directive): Improve warnings for
traditional C and indented directives.
* enquire.c, gsyslimits.h, limity.h, config/convex/fixinc.convex,
fixinc/fixinc.irix, fixinc/fixinc.sco, fixinc/fixinc.wrap,
fixinc/inclhack.def: Indent the # of #include_next one space.
* cp/rtti.c: Un-indent #if and #endif.
* cppexp.c (_cpp_parse_expr): If lex returns '#', it's a
syntax error, but an error has already been printed.
* cpplex.c (_cpp_parse_assertion): Give a more specific error
message when called with nothing remaining on the line.
(_cpp_lex_token): If _cpp_parse_assertion fails, return an
OTHER token, not an ASSERTION.
* cpplib.c (do_assert): When we create a 'base' node, clear
its aschain pointer.
* gcc.c-torture/compile/981211-1.c: Move to...
* gcc.dg/cpp-as1.c: ...here.
* gcc.dg/cpp-as2.c: New file.
* gcc.dg/cpp-tradwarn1.c: Change warning regexps to match the
compiler.
From-SVN: r32870
2000-04-03 06:50:55 +08:00
|
|
|
\#include_next <gnu/types.h>
|
1999-11-22 23:05:48 +08:00
|
|
|
|
|
|
|
\#if defined(__FD_ZERO) && !defined(__GLIBC__)
|
|
|
|
\#undef __FD_ZERO
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
\# define __FD_ZERO(fdsetp) \\
|
|
|
|
do { \\
|
|
|
|
int __d0, __d1; \\
|
|
|
|
__asm__ __volatile__("cld ; rep ; stosl" \\
|
|
|
|
: "=&c" (__d0), "=&D" (__d1) \\
|
|
|
|
: "a" (0), "0" (__FDSET_LONGS), \\
|
|
|
|
"1" ((__fd_set *) (fdsetp)) :"memory"); \\
|
1999-11-22 23:05:48 +08:00
|
|
|
} while (0)
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#define _TYPES_H_WRAPPER
|
|
|
|
\#endif /* _TYPES_H_WRAPPER */
|
|
|
|
';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This fixes __FD_ZERO bug for glibc-2.0.x
|
|
|
|
*/
|
|
|
|
fix = {
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
hackname = AAB_fd_zero_selectbits_h;
|
1999-11-22 23:05:48 +08:00
|
|
|
files = selectbits.h;
|
2000-08-15 02:08:46 +08:00
|
|
|
mach = 'i[34567]86-*-linux*';
|
1999-11-22 23:05:48 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Define _SELECTBITS_H_WRAPPER at the end of the wrapper, not
|
|
|
|
* the start, so that if #include_next gets another instance of
|
|
|
|
* the wrapper, this will follow the #include_next chain until
|
|
|
|
* we arrive at the real <selectbits.h>.
|
|
|
|
*/
|
|
|
|
replace =
|
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
'/* This file fixes a bug in the __FD_ZERO macro present in glibc 2.0.x. */
|
1999-11-22 23:05:48 +08:00
|
|
|
\#ifndef _SELECTBITS_H_WRAPPER
|
|
|
|
\#include <features.h>
|
cppinit.c (cpp_start_read): Turn off -Wtraditional if processing C++.
* cppinit.c (cpp_start_read): Turn off -Wtraditional if
processing C++.
* cpplib.c (_cpp_handle_directive): Improve warnings for
traditional C and indented directives.
* enquire.c, gsyslimits.h, limity.h, config/convex/fixinc.convex,
fixinc/fixinc.irix, fixinc/fixinc.sco, fixinc/fixinc.wrap,
fixinc/inclhack.def: Indent the # of #include_next one space.
* cp/rtti.c: Un-indent #if and #endif.
* cppexp.c (_cpp_parse_expr): If lex returns '#', it's a
syntax error, but an error has already been printed.
* cpplex.c (_cpp_parse_assertion): Give a more specific error
message when called with nothing remaining on the line.
(_cpp_lex_token): If _cpp_parse_assertion fails, return an
OTHER token, not an ASSERTION.
* cpplib.c (do_assert): When we create a 'base' node, clear
its aschain pointer.
* gcc.c-torture/compile/981211-1.c: Move to...
* gcc.dg/cpp-as1.c: ...here.
* gcc.dg/cpp-as2.c: New file.
* gcc.dg/cpp-tradwarn1.c: Change warning regexps to match the
compiler.
From-SVN: r32870
2000-04-03 06:50:55 +08:00
|
|
|
\#include_next <selectbits.h>
|
1999-11-22 23:05:48 +08:00
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
\#if defined(__FD_ZERO) && defined(__GLIBC__) \\
|
|
|
|
&& defined(__GLIBC_MINOR__) && __GLIBC__ == 2 \\
|
1999-11-22 23:05:48 +08:00
|
|
|
&& __GLIBC_MINOR__ == 0
|
|
|
|
\#undef __FD_ZERO
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
\#define __FD_ZERO(fdsetp) \\
|
|
|
|
do { \\
|
|
|
|
int __d0, __d1; \\
|
|
|
|
__asm__ __volatile__ ("cld; rep; stosl" \\
|
|
|
|
: "=&c" (__d0), "=&D" (__d1) \\
|
|
|
|
: "a" (0), "0" (sizeof (__fd_set) \\
|
|
|
|
/ sizeof (__fd_mask)), \\
|
|
|
|
"1" ((__fd_mask *) (fdsetp)) \\
|
|
|
|
: "memory"); \\
|
1999-11-22 23:05:48 +08:00
|
|
|
} while (0)
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#define _SELECTBITS_H_WRAPPER
|
|
|
|
\#endif /* _SELECTBITS_H_WRAPPER */
|
|
|
|
';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-01-18 05:45:29 +08:00
|
|
|
/*
|
|
|
|
* Fix non-ANSI memcpy declaration that conflicts with gcc's builtin
|
|
|
|
* declaration on Sun OS 4.x. We must only fix this on Sun OS 4.x, because
|
|
|
|
* many other systems have similar text but correct versions of the file.
|
|
|
|
* To ensure only Sun's is fixed, we grep for a likely unique string.
|
|
|
|
* Fix also on sysV68 R3V7.1 (head/memory.h\t50.1\t )
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_sun_memcpy;
|
|
|
|
files = memory.h;
|
|
|
|
select = "/\\*\t@\\(#\\)"
|
|
|
|
"(head/memory.h\t50.1\t "
|
|
|
|
"|memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2\t)\\*/";
|
|
|
|
|
|
|
|
replace =
|
|
|
|
'/* This file was generated by fixincludes */
|
|
|
|
\#ifndef __memory_h__
|
|
|
|
\#define __memory_h__
|
|
|
|
|
|
|
|
\#ifdef __STDC__
|
|
|
|
extern void *memccpy();
|
|
|
|
extern void *memchr();
|
|
|
|
extern void *memcpy();
|
|
|
|
extern void *memset();
|
|
|
|
\#else
|
|
|
|
extern char *memccpy();
|
|
|
|
extern char *memchr();
|
|
|
|
extern char *memcpy();
|
|
|
|
extern char *memset();
|
|
|
|
\#endif /* __STDC__ */
|
|
|
|
|
|
|
|
extern int memcmp();
|
|
|
|
|
|
|
|
\#endif /* __memory_h__ */
|
|
|
|
';
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-11-15 22:47:53 +08:00
|
|
|
/*
|
|
|
|
* Completely replace <sys/byteorder.h>; with a file that implements gcc's
|
|
|
|
* optimized byteswapping. Restricted to "SVR4" machines until either
|
|
|
|
* it is shown to be safe to replace this file always, or we get bolder ;-)
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_svr4_replace_byteorder;
|
|
|
|
#ifndef SVR5
|
|
|
|
mach = "*-*-sysv4*";
|
|
|
|
mach = "i[34567]86-*-sysv5*";
|
|
|
|
mach = "i[34567]86-*-udk*";
|
|
|
|
mach = "i[34567]86-*-solaris2.[0-4]";
|
|
|
|
mach = "powerpcle-*-solaris2.[0-4]";
|
|
|
|
mach = "sparc-*-solaris2.[0-4]";
|
|
|
|
#endif /* SVR5 */
|
|
|
|
files = sys/byteorder.h;
|
|
|
|
replace = '#ifndef _SYS_BYTEORDER_H
|
|
|
|
\#define _SYS_BYTEORDER_H
|
|
|
|
|
|
|
|
/* Functions to convert `short\' and `long\' quantities from host byte order
|
|
|
|
to (internet) network byte order (i.e. big-endian).
|
|
|
|
|
|
|
|
Written by Ron Guilmette (rfg@ncd.com).
|
|
|
|
|
|
|
|
This isn\'t actually used by GCC. It is installed by fixinc.svr4.
|
|
|
|
|
|
|
|
For big-endian machines these functions are essentially no-ops.
|
|
|
|
|
|
|
|
For little-endian machines, we define the functions using specialized
|
|
|
|
asm sequences in cases where doing so yields better code (e.g. i386). */
|
|
|
|
|
|
|
|
\#if !defined (__GNUC__) && !defined (__GNUG__)
|
|
|
|
\#error You lose! This file is only useful with GNU compilers.
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#ifndef __BYTE_ORDER__
|
|
|
|
/* Byte order defines. These are as defined on UnixWare 1.1, but with
|
|
|
|
double underscores added at the front and back. */
|
|
|
|
\#define __LITTLE_ENDIAN__ 1234
|
|
|
|
\#define __BIG_ENDIAN__ 4321
|
|
|
|
\#define __PDP_ENDIAN__ 3412
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
\#ifdef __STDC__
|
|
|
|
static __inline__ unsigned long htonl (unsigned long);
|
|
|
|
static __inline__ unsigned short htons (unsigned int);
|
|
|
|
static __inline__ unsigned long ntohl (unsigned long);
|
|
|
|
static __inline__ unsigned short ntohs (unsigned int);
|
|
|
|
\#endif /* defined (__STDC__) */
|
|
|
|
|
|
|
|
\#if defined (__i386__)
|
|
|
|
|
|
|
|
\#ifndef __BYTE_ORDER__
|
|
|
|
\#define __BYTE_ORDER__ __LITTLE_ENDIAN__
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
/* Convert a host long to a network long. */
|
|
|
|
|
|
|
|
/* We must use a new-style function definition, so that this will also
|
|
|
|
be valid for C++. */
|
|
|
|
static __inline__ unsigned long
|
|
|
|
htonl (unsigned long __arg)
|
|
|
|
{
|
|
|
|
register unsigned long __result;
|
|
|
|
|
|
|
|
__asm__ ("xchg%B0 %b0,%h0
|
|
|
|
ror%L0 $16,%0
|
|
|
|
xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
|
|
|
|
return __result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a host short to a network short. */
|
|
|
|
|
|
|
|
static __inline__ unsigned short
|
|
|
|
htons (unsigned int __arg)
|
|
|
|
{
|
|
|
|
register unsigned short __result;
|
|
|
|
|
|
|
|
__asm__ ("xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
|
|
|
|
return __result;
|
|
|
|
}
|
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
\#elif ((defined (__i860__) && !defined (__i860_big_endian__)) \\
|
|
|
|
|| defined (__ns32k__) || defined (__vax__) \\
|
1999-11-15 22:47:53 +08:00
|
|
|
|| defined (__spur__) || defined (__arm__))
|
|
|
|
|
|
|
|
\#ifndef __BYTE_ORDER__
|
|
|
|
\#define __BYTE_ORDER__ __LITTLE_ENDIAN__
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
/* For other little-endian machines, using C code is just as efficient as
|
|
|
|
using assembly code. */
|
|
|
|
|
|
|
|
/* Convert a host long to a network long. */
|
|
|
|
|
|
|
|
static __inline__ unsigned long
|
|
|
|
htonl (unsigned long __arg)
|
|
|
|
{
|
|
|
|
register unsigned long __result;
|
|
|
|
|
|
|
|
__result = (__arg >> 24) & 0x000000ff;
|
|
|
|
__result |= (__arg >> 8) & 0x0000ff00;
|
|
|
|
__result |= (__arg << 8) & 0x00ff0000;
|
|
|
|
__result |= (__arg << 24) & 0xff000000;
|
|
|
|
return __result;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a host short to a network short. */
|
|
|
|
|
|
|
|
static __inline__ unsigned short
|
|
|
|
htons (unsigned int __arg)
|
|
|
|
{
|
|
|
|
register unsigned short __result;
|
|
|
|
|
|
|
|
__result = (__arg << 8) & 0xff00;
|
|
|
|
__result |= (__arg >> 8) & 0x00ff;
|
|
|
|
return __result;
|
|
|
|
}
|
|
|
|
|
|
|
|
\#else /* must be a big-endian machine */
|
|
|
|
|
|
|
|
\#ifndef __BYTE_ORDER__
|
|
|
|
\#define __BYTE_ORDER__ __BIG_ENDIAN__
|
|
|
|
\#endif
|
|
|
|
|
|
|
|
/* Convert a host long to a network long. */
|
|
|
|
|
|
|
|
static __inline__ unsigned long
|
|
|
|
htonl (unsigned long __arg)
|
|
|
|
{
|
|
|
|
return __arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a host short to a network short. */
|
|
|
|
|
|
|
|
static __inline__ unsigned short
|
|
|
|
htons (unsigned int __arg)
|
|
|
|
{
|
|
|
|
return __arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
\#endif /* big-endian */
|
|
|
|
|
|
|
|
/* Convert a network long to a host long. */
|
|
|
|
|
|
|
|
static __inline__ unsigned long
|
|
|
|
ntohl (unsigned long __arg)
|
|
|
|
{
|
|
|
|
return htonl (__arg);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Convert a network short to a host short. */
|
|
|
|
|
|
|
|
static __inline__ unsigned short
|
|
|
|
ntohs (unsigned int __arg)
|
|
|
|
{
|
|
|
|
return htons (__arg);
|
|
|
|
}
|
|
|
|
\#endif
|
|
|
|
';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-10-12 22:44:18 +08:00
|
|
|
/*
|
|
|
|
* Completely replace <sys/varargs.h> with a file that includes gcc's
|
|
|
|
* stdarg.h or varargs.h files as appropriate.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_svr4_no_varargs;
|
|
|
|
files = sys/varargs.h;
|
|
|
|
replace = "/* This file was generated by fixincludes. */\n"
|
|
|
|
"#ifndef _SYS_VARARGS_H\n"
|
|
|
|
"#define _SYS_VARARGS_H\n\n"
|
|
|
|
|
|
|
|
"#ifdef __STDC__\n"
|
|
|
|
"#include <stdarg.h>\n"
|
|
|
|
"#else\n"
|
|
|
|
"#include <varargs.h>\n"
|
|
|
|
"#endif\n\n"
|
|
|
|
|
|
|
|
"#endif /* _SYS_VARARGS_H */\n";
|
|
|
|
};
|
|
|
|
#endif
|
1999-06-23 20:29:01 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-01-18 05:45:29 +08:00
|
|
|
/*
|
|
|
|
* Cancel out ansi_compat.h on Ultrix. Replace it with an empty file.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_ultrix_ansi_compat;
|
|
|
|
files = ansi_compat.h;
|
|
|
|
select = ULTRIX;
|
|
|
|
replace = "/* This file intentionally left blank. */\n";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-06-06 01:44:07 +08:00
|
|
|
/*
|
|
|
|
* The Ultrix 4.3 file limits.h is a symbolic link to sys/limits.h.
|
|
|
|
* Replace limits.h with a file that includes sys/limits.h.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_ultrix_limits;
|
|
|
|
files = limits.h;
|
|
|
|
mach = "*-*-ultrix4.3";
|
|
|
|
replace =
|
|
|
|
'/* @(#)limits.h */
|
|
|
|
/* This file was generated by fixincludes */
|
|
|
|
\#ifndef _LIMITS_INCLUDED
|
|
|
|
\#define _LIMITS_INCLUDED
|
|
|
|
\#include <sys/limits.h>
|
|
|
|
\#endif /* _LIMITS_INCLUDED */
|
|
|
|
';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The ULTRIX 4.3 version of memory.h duplicates definitions
|
|
|
|
* present in strings.h. Replace memory.h with a file that includes
|
|
|
|
* strings.h to prevent problems from multiple inclusion.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_ultrix_memory;
|
|
|
|
files = memory.h;
|
|
|
|
mach = "*-*-ultrix4.3";
|
|
|
|
replace =
|
|
|
|
'/* @(#)memory.h */
|
|
|
|
/* This file was generated by fixincludes */
|
|
|
|
\#ifndef _MEMORY_INCLUDED
|
|
|
|
\#define _MEMORY_INCLUDED
|
|
|
|
\#include <strings.h>
|
|
|
|
\#endif /* _MEMORY_INCLUDED */
|
|
|
|
';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The Ultrix 4.3 file string.h is a symbolic link to strings.h.
|
|
|
|
* Replace string.h link with a file that includes strings.h to prevent
|
|
|
|
* problems from multiple inclusion.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = AAB_ultrix_string;
|
|
|
|
files = string.h;
|
|
|
|
mach = "*-*-ultrix4.3";
|
|
|
|
replace =
|
|
|
|
'/* @(#)string.h */
|
|
|
|
/* This file was generated by fixincludes */
|
|
|
|
\#ifndef _STRING_INCLUDED
|
|
|
|
\#define _STRING_INCLUDED
|
|
|
|
\#include <strings.h>
|
|
|
|
\#endif /* _STRING_INCLUDED */
|
|
|
|
';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-08-14 02:00:34 +08:00
|
|
|
/*
|
|
|
|
* pthread.h on AIX 4.3.3 tries to define a macro without whitspace
|
|
|
|
* which violates a requirement of ISO C.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = aix_pthread;
|
|
|
|
files = "pthread.h";
|
|
|
|
select = "(#define [A-Za-z_0-9]+)(\\\\\n[^A-Za-z_0-9 \t\n(])";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1 %2";
|
2000-08-23 22:08:57 +08:00
|
|
|
test_text = "#define PTHREAD_MUTEX_INITIALIZER\\\\\n"
|
|
|
|
"{...init stuff...}";
|
2000-08-14 02:00:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline
|
|
|
|
* in an otherwise harmless (and #ifed out) macro definition
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = aix_sysmachine;
|
|
|
|
files = sys/machine.h;
|
|
|
|
select = "\\\\ +\n";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "\\\n";
|
|
|
|
test_text = "#define FOO \\\n"
|
|
|
|
" bar \\ \n baz \\ \n bat";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
2000-05-15 05:20:33 +08:00
|
|
|
* sys/wait.h on AIX 3.2.5 puts the declaration of wait3 before the
|
|
|
|
* definition of struct rusage, so the prototype added by fixproto fails.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-10 00:21:08 +08:00
|
|
|
hackname = aix_syswait;
|
|
|
|
files = sys/wait.h;
|
2000-05-13 05:59:39 +08:00
|
|
|
select = "^extern pid_t wait3\\(\\);\n";
|
2000-05-10 00:21:08 +08:00
|
|
|
select = "bos325,";
|
2000-05-13 05:59:39 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "struct rusage;\n%0";
|
2000-05-15 05:20:33 +08:00
|
|
|
test_text = "/* bos325, */\n"
|
|
|
|
"extern pid_t wait3();\n"
|
|
|
|
"\t/* pid_t wait3(int *, int, struct rusage *); */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sys/signal.h on some versions of AIX uses volatile in the typedef of
|
|
|
|
* sig_atomic_t, which causes gcc to generate a warning about duplicate
|
|
|
|
* volatile when a sig_atomic_t variable is declared volatile, as
|
|
|
|
* required by ANSI C.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-10 00:21:08 +08:00
|
|
|
hackname = aix_volatile;
|
|
|
|
files = sys/signal.h;
|
|
|
|
select = "typedef volatile int sig_atomic_t";
|
2000-05-15 05:20:33 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "typedef int sig_atomic_t";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "typedef volatile int sig_atomic_t;";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-10 00:21:08 +08:00
|
|
|
hackname = alpha_getopt;
|
|
|
|
files = "stdio.h";
|
|
|
|
files = "stdlib.h";
|
|
|
|
select = 'getopt\(int, char \*\[\], *char \*\)';
|
2000-05-15 05:20:33 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "getopt(int, char *const[], const char *)";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = 'extern int getopt(int, char *[], char *);';
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-07-12 06:20:38 +08:00
|
|
|
/*
|
1999-03-31 20:02:19 +08:00
|
|
|
* Remove erroneous parentheses in sym.h on Alpha OSF/1.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-10 00:21:08 +08:00
|
|
|
hackname = alpha_parens;
|
|
|
|
files = sym.h;
|
|
|
|
select = '#ifndef\(__mips64\)';
|
2000-05-15 05:20:33 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __mips64";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "#ifndef(__mips64) /* bogus */\nextern int foo;\n#endif";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = alpha_sbrk;
|
|
|
|
files = unistd.h;
|
|
|
|
select = "char[ \t]*\\*[\t ]*sbrk[ \t]*\\(";
|
2000-05-15 05:20:33 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "void *sbrk(";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "extern char* sbrk(ptrdiff_t increment);";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix this ARM/RISCiX file where ___type is a Compiler
|
|
|
|
* hint that is specific to the Norcroft compiler.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-10 00:21:08 +08:00
|
|
|
hackname = arm_norcroft_hint;
|
|
|
|
select = "___type p_type";
|
|
|
|
files = "X11/Intrinsic.h";
|
2000-05-21 02:54:45 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "p_type";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "___type p_type mumble;";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix this ARM/RISCiX file to avoid interfering
|
|
|
|
* with the use of __wchar_t in cc1plus.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = arm_wchar;
|
|
|
|
files = stdlib.h;
|
|
|
|
select = "#[ \t]*define[ \t]*__wchar_t";
|
2000-05-21 03:47:41 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1_GCC_WCHAR_T";
|
|
|
|
c_fix_arg = "(#[ \t]*(ifndef|define)[ \t]+)__wchar_t";
|
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text =
|
|
|
|
"# ifndef \t __wchar_t /* we don't have wchar_t yet, ... */\n"
|
|
|
|
"# define __wchar_t short\n"
|
|
|
|
"# endif /* __wchar_t */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file in A/UX 3.0.x/3.1.x contains an __asm directive for c89;
|
|
|
|
* gcc doesn't understand it.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = aux_asm;
|
|
|
|
files = sys/param.h;
|
|
|
|
select = "#ifndef NOINLINE";
|
2000-05-21 02:54:45 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#if !defined(NOINLINE) && !defined(__GNUC__)";
|
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text =
|
|
|
|
"#ifndef NOINLINE /* ain't got no inline, so we got it */\n"
|
|
|
|
"#endif /* NOINLINE */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For C++, avoid any typedef or macro definition of bool,
|
|
|
|
* and use the built in type instead.
|
1999-03-31 20:02:19 +08:00
|
|
|
* HP/UX 10.20 also has it in curses_colr/curses.h.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 02:54:45 +08:00
|
|
|
hackname = avoid_bool_define;
|
|
|
|
files = curses.h;
|
|
|
|
files = curses_colr/curses.h;
|
|
|
|
files = term.h;
|
|
|
|
files = tinfo.h;
|
Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes.
(fix_char_macro_defines, fix_char_macro_uses): New functions.
* fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp.
Recognize Emacs mode markers also.
* fixinc/fixtests.c (else_endif_label): Fix bug in recognition of
C++ comments in C++ headers. Call is_cxx_header only if
necessary.
* fixinc/inclhack.def (avoid_bool): Add select for the problem and
bypass for ncurses.
(bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with...
(io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes):
... these, which use the new C fixes.
(math_exception): Escape literal '+' in bypass expression.
* fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh:
Regenerate.
From-SVN: r31512
2000-01-20 05:41:04 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
select = "#[ \t]*define[ \t]+bool[ \t]";
|
2000-05-21 03:47:41 +08:00
|
|
|
bypass = "we must use the C\\+\\+ compiler's type";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
|
|
|
|
c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+bool[ \t].*";
|
1999-04-27 06:57:01 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
test_text = "# define bool\t char \n";
|
|
|
|
};
|
1999-06-08 08:10:51 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
fix = {
|
|
|
|
hackname = avoid_bool_type;
|
|
|
|
files = curses.h;
|
|
|
|
files = curses_colr/curses.h;
|
|
|
|
files = term.h;
|
|
|
|
files = tinfo.h;
|
1999-06-08 08:10:51 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
select = "^[ \t]*typedef[ \t].*[ \t]bool[ \t]*;";
|
2000-05-21 03:47:41 +08:00
|
|
|
bypass = "we must use the C\\+\\+ compiler's type";
|
1999-06-08 08:10:51 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
|
1999-06-08 08:10:51 +08:00
|
|
|
|
2000-11-12 11:37:33 +08:00
|
|
|
test_text = "typedef unsigned int\tbool \t; /* bool\n type */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
2000-11-12 05:40:27 +08:00
|
|
|
/*
|
|
|
|
* For C++, avoid any typedef definition of wchar_t,
|
|
|
|
* and use the built in type instead.
|
|
|
|
*/
|
|
|
|
|
|
|
|
fix = {
|
|
|
|
hackname = avoid_wchar_t_type;
|
|
|
|
|
|
|
|
select = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
|
|
|
|
|
2000-11-12 11:37:33 +08:00
|
|
|
test_text = "typedef unsigned short\twchar_t \t; /* wchar_t\n type */";
|
2000-11-12 05:40:27 +08:00
|
|
|
};
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix #defines under Alpha OSF/1:
|
|
|
|
* The following files contain '#pragma extern_prefix "_FOO"' followed by
|
|
|
|
* a '#define something(x,y,z) _FOOsomething(x,y,z)'. The intent of these
|
|
|
|
* statements is to reduce namespace pollution. While these macros work
|
|
|
|
* properly in most cases, they don't allow you to take a pointer to the
|
|
|
|
* "something" being modified. To get around this limitation, change these
|
|
|
|
* statements to be of the form '#define something _FOOsomething'.
|
2000-05-21 03:47:41 +08:00
|
|
|
*
|
|
|
|
* sed ain't egrep, lesson 2463: sed can use self-referential
|
|
|
|
* regular expressions. In the substitute expression below,
|
|
|
|
* "\\1" and "\\2" refer to subexpressions found earlier in the
|
|
|
|
* same match. So, we continue to use sed. "extern_prefix" will
|
|
|
|
* be a rare match anyway...
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = bad_lval;
|
1999-11-22 23:05:48 +08:00
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
select = "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix";
|
1999-11-22 23:05:48 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
files = libgen.h;
|
|
|
|
files = dirent.h;
|
|
|
|
files = ftw.h;
|
|
|
|
files = grp.h;
|
|
|
|
files = ndbm.h;
|
|
|
|
files = pthread.h;
|
|
|
|
files = pwd.h;
|
|
|
|
files = signal.h;
|
|
|
|
files = standards.h;
|
|
|
|
files = stdlib.h;
|
|
|
|
files = string.h;
|
|
|
|
files = stropts.h;
|
|
|
|
files = time.h;
|
|
|
|
files = unistd.h;
|
2000-05-15 03:29:02 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
sed =
|
2000-05-15 03:29:02 +08:00
|
|
|
"s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*"
|
|
|
|
"\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/";
|
2000-05-10 00:21:08 +08:00
|
|
|
|
|
|
|
test_text = '#pragma extern_prefix "_FOO"'"\n"
|
|
|
|
"#define something(x,y,z) _FOOsomething(x,y,z)\n"
|
|
|
|
"#define mumble _FOOmumble";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
/*
|
|
|
|
* Fix `typedef struct term;' on hppa1.1-hp-hpux9.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 02:54:45 +08:00
|
|
|
hackname = bad_struct_term;
|
|
|
|
files = curses.h;
|
|
|
|
select = "^[ \t]*typedef[ \t]+struct[ \t]+term[ \t]*;";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "struct term;";
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
test_text = 'typedef struct term;';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix one other error in this file:
|
|
|
|
* a mismatched quote not inside a C comment.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 02:54:45 +08:00
|
|
|
hackname = badquote;
|
|
|
|
files = sundev/vuid_event.h;
|
|
|
|
select = "doesn't";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "does not";
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
test_text = "/* doesn't have matched single quotes */";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* check for broken assert.h that needs stdio.h
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-15 03:29:02 +08:00
|
|
|
hackname = broken_assert_stdio;
|
|
|
|
files = assert.h;
|
|
|
|
select = stderr;
|
|
|
|
bypass = "include.*stdio\\.h";
|
|
|
|
c_fix = wrap;
|
|
|
|
c_fix_arg = "#include <stdio.h>\n";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "extern FILE* stderr;";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* check for broken assert.h that needs stdlib.h
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-15 03:29:02 +08:00
|
|
|
hackname = broken_assert_stdlib;
|
|
|
|
files = assert.h;
|
|
|
|
select = 'exit *\(|abort *\(';
|
|
|
|
bypass = "include.*stdlib\\.h";
|
|
|
|
c_fix = wrap;
|
|
|
|
c_fix_arg = "#ifdef __cplusplus\n"
|
|
|
|
"#include <stdlib.h>\n"
|
|
|
|
"#endif\n";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "extern void exit ( int );";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-04 22:50:14 +08:00
|
|
|
/*
|
|
|
|
* Remove `extern double cabs' declarations from math.h.
|
2000-10-30 03:34:53 +08:00
|
|
|
* This conflicts with C99. Discovered on AIX.
|
2000-05-18 23:47:31 +08:00
|
|
|
* SunOS4 has its cabs() declaration followed by a comment which
|
|
|
|
* terminates on the following line.
|
2000-05-04 22:50:14 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = broken_cabs;
|
|
|
|
files = "math.h";
|
2000-09-30 01:47:32 +08:00
|
|
|
select = '^extern[ \t]+double[ \t]+cabs';
|
2000-05-21 02:54:45 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "";
|
2000-09-30 01:47:32 +08:00
|
|
|
c_fix_arg = "^extern[ \t]+double[ \t]+cabs\\((struct dbl_hypot|)\\);";
|
2000-05-21 02:54:45 +08:00
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "#ifdef __STDC__\n"
|
2000-09-30 01:47:32 +08:00
|
|
|
"extern double cabs(struct dbl_hypot);\n"
|
2000-05-10 00:21:08 +08:00
|
|
|
"#else\n"
|
2000-09-30 01:47:32 +08:00
|
|
|
"extern double cabs();\n"
|
2000-05-18 23:47:31 +08:00
|
|
|
"#endif\n"
|
|
|
|
"extern double cabs(); /* This is a comment\n"
|
|
|
|
" and it ends here. */";
|
2000-05-04 22:50:14 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
/*
|
|
|
|
* Fix various macros used to define ioctl numbers.
|
|
|
|
* The traditional syntax was:
|
|
|
|
*
|
|
|
|
* #define _CTRL(n, x) (('n'<<8)+x)
|
|
|
|
* #define TCTRLCFOO _CTRL(T, 1)
|
|
|
|
*
|
|
|
|
* but this does not work with the C standard, which disallows macro
|
|
|
|
* expansion inside strings. We have to rewrite it thus:
|
|
|
|
*
|
|
|
|
* #define _CTRL(n, x) ((n<<8)+x)
|
|
|
|
* #define TCTRLCFOO _CTRL('T', 1)
|
|
|
|
*
|
|
|
|
* The select expressions match too much, but the c_fix code is cautious.
|
|
|
|
*
|
|
|
|
* CTRL might be: CTRL _CTRL ISCTRL BSD43_CTRL ...
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = ctrl_quotes_def;
|
2000-06-17 04:38:42 +08:00
|
|
|
select = "define[ \t]+[A-Z0-9_]+CTRL\\([a-zA-Z][,)]";
|
2000-05-16 22:01:34 +08:00
|
|
|
c_fix = char_macro_def;
|
|
|
|
c_fix_arg = "CTRL";
|
2000-06-18 01:50:12 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This is two tests in order to ensure that the "CTRL(c)" can
|
|
|
|
* be selected in isolation from the multi-arg format
|
|
|
|
*/
|
|
|
|
test_text = "#define BSD43_CTRL(n, x) (('n'<<8)+x)\n";
|
|
|
|
test_text = "#define _CTRL(c) ('c'&037)";
|
2000-05-16 22:01:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
fix = {
|
|
|
|
hackname = ctrl_quotes_use;
|
|
|
|
select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
|
|
|
|
c_fix = char_macro_use;
|
|
|
|
c_fix_arg = "CTRL";
|
2000-05-31 04:24:44 +08:00
|
|
|
test_text = "#define TCTRLFOO BSD43_CTRL(T, 1)";
|
2000-05-16 22:01:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sys/mman.h on HP/UX is not C++ ready,
|
|
|
|
* even though NO_IMPLICIT_EXTERN_C is defined on HP/UX.
|
|
|
|
*
|
2000-05-21 02:54:45 +08:00
|
|
|
* rpc/types.h on OSF1/2.0 is not C++ ready,
|
|
|
|
* even though NO_IMPLICIT_EXTERN_C is defined for the alpha.
|
|
|
|
*
|
|
|
|
* The problem is the declaration of malloc.
|
2000-05-16 22:01:34 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = cxx_unready;
|
|
|
|
files = sys/mman.h;
|
|
|
|
files = rpc/types.h;
|
|
|
|
select = '[^#]+malloc.*;'; /* Catch any form of declaration
|
|
|
|
not within a macro. */
|
|
|
|
bypass = '"C"|__BEGIN_DECLS';
|
|
|
|
|
|
|
|
c_fix = wrap;
|
|
|
|
c_fix_arg = "#ifdef __cplusplus\n"
|
|
|
|
"extern \"C\" {\n"
|
|
|
|
"#endif\n";
|
|
|
|
c_fix_arg = "#ifdef __cplusplus\n"
|
|
|
|
"}\n"
|
|
|
|
"#endif\n";
|
|
|
|
test_text = "extern void* malloc( size_t );";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-03-31 20:02:19 +08:00
|
|
|
/*
|
|
|
|
* Fix <c_asm.h> on Digital UNIX V4.0:
|
|
|
|
* It contains a prototype for a DEC C internal asm() function,
|
|
|
|
* clashing with gcc's asm keyword. So protect this with __DECC.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = dec_intern_asm;
|
|
|
|
files = c_asm.h;
|
1999-04-01 08:15:14 +08:00
|
|
|
sed = "/^[ \t]*float[ \t]*fasm/i\\\n#ifdef __DECC\n";
|
|
|
|
sed = "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\\\n"
|
1999-03-31 20:02:19 +08:00
|
|
|
"#endif\n";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text =
|
|
|
|
"float fasm {\n"
|
|
|
|
" ... asm stuff ...\n"
|
|
|
|
"};\n#pragma intrinsic( dasm )\n/* END ASM TEST*/";
|
1999-03-31 20:02:19 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-03-08 03:05:25 +08:00
|
|
|
/*
|
|
|
|
* Fix typo in <wchar.h> on DJGPP 2.03.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = djgpp_wchar_h;
|
|
|
|
file = wchar.h;
|
|
|
|
select = "__DJ_wint_t";
|
|
|
|
bypass = "sys/djtypes.h";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%0\n#include <sys/djtypes.h>";
|
|
|
|
c_fix_arg = "#include <stddef.h>";
|
|
|
|
test_text = "__DJ_wint_t\n#undef __DJ_wint_t\n#define __DJ_wint_t";
|
|
|
|
};
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Fix these Sun OS files to avoid an invalid identifier in an #ifdef.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 02:54:45 +08:00
|
|
|
hackname = ecd_cursor;
|
|
|
|
files = "sunwindow/win_lock.h";
|
|
|
|
files = "sunwindow/win_cursor.h";
|
|
|
|
select = 'ecd\.cursor';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = 'ecd_cursor';
|
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "#ifdef ecd.cursor\n#error bogus\n#endif /* ecd+cursor */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
1999-11-22 23:05:48 +08:00
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
/*
|
|
|
|
* fix-header doesn't fix fabs' prototype, and I have no idea why.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = fix_header_breakage;
|
|
|
|
mach = "m88k-motorola-sysv3*";
|
|
|
|
files = "math.h";
|
|
|
|
|
|
|
|
select = 'extern double floor\(\), ceil\(\), fmod\(\), fabs\(\);';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg =
|
|
|
|
'extern double floor(), ceil(), fmod(), fabs _PARAMS((double));';
|
|
|
|
test_text = 'extern double floor(), ceil(), fmod(), fabs();';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-02-22 04:01:24 +08:00
|
|
|
/*
|
|
|
|
* Between 8/24/1998 and 2/17/2001, FreeBSD system headers presume
|
|
|
|
* neither the existence of GCC 3 nor its exact feature set yet break
|
|
|
|
* (by design?) when __GNUC__ is set beyond 2.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = freebsd_gcc3_breakage;
|
|
|
|
mach = *-*-freebsd*;
|
|
|
|
files = sys/cdefs.h;
|
|
|
|
select = '^#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7$';
|
|
|
|
bypass = '__GNUC__[ \t]*([>=]=[ \t]*[3-9]|>[ \t]*2)';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = '%0 || __GNUC__ >= 3';
|
|
|
|
test_text = '#if __GNUC__ == 2 && __GNUC_MINOR__ >= 7';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
2000-07-13 22:47:55 +08:00
|
|
|
* Fix HP & Sony's use of "../machine/xxx.h"
|
|
|
|
* to refer to: <machine/xxx.h>
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 02:54:45 +08:00
|
|
|
hackname = hp_inline;
|
|
|
|
files = sys/spinlock.h;
|
|
|
|
files = machine/machparam.h;
|
|
|
|
select = "[ \t]*#[ \t]*include[ \t]+" '"\.\./machine/';
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1<machine/%2.h>";
|
|
|
|
|
|
|
|
c_fix_arg = "([ \t]*#[ \t]*include[ \t]+)" '"\.\./machine/'
|
|
|
|
'([a-z]+)\.h"';
|
|
|
|
|
|
|
|
test_text = ' # include "../machine/mumble.h"';
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Check for (...) in C++ code in HP/UX sys/file.h.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-10 00:21:08 +08:00
|
|
|
hackname = hp_sysfile;
|
|
|
|
files = sys/file.h;
|
|
|
|
select = "HPUX_SOURCE";
|
2000-05-21 02:54:45 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "(struct file *, ...)";
|
|
|
|
c_fix_arg = '\(\.\.\.\)';
|
|
|
|
|
2000-05-13 05:59:39 +08:00
|
|
|
test_text = "extern void foo(...); /* HPUX_SOURCE - bad varargs */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-17 22:59:20 +08:00
|
|
|
/*
|
|
|
|
* Keep HP-UX 11 from stomping on C++ math namespace
|
|
|
|
* with defines for fabsf.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = hpux11_fabsf;
|
|
|
|
files = math.h;
|
|
|
|
select = "^[ \t]*#[ \t]*define[ \t]+fabsf\\(.*";
|
|
|
|
bypass = "__cplusplus";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
|
|
|
|
|
|
|
|
test_text =
|
|
|
|
"#ifdef _PA_RISC\n"
|
|
|
|
"# define fabsf(x) ((float)fabs((double)(float)(x)))\n"
|
|
|
|
"#endif";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
/*
|
1999-10-15 14:00:29 +08:00
|
|
|
* In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition
|
|
|
|
* of UINT32_C has undefined behavior according to ISO/ANSI:
|
|
|
|
* the arguments to __CONCAT__ are not macro expanded before the
|
|
|
|
* concatination happens so the trailing ')' in the first argument
|
|
|
|
* is concatinated with the 'l' in the second argument creating an
|
|
|
|
* invalid pp token. The behavior of invalid pp tokens is undefined.
|
|
|
|
* GCC does not handle these invalid tokens the way the HP compiler does.
|
|
|
|
* This problem will potentially occur anytime macros are used in the
|
|
|
|
* arguments to __CONCAT__. A general solution to this problem would be to
|
|
|
|
* insert another layer of macro between __CONCAT__ and its use
|
|
|
|
* in UINT32_C. An example of this solution can be found in the C standard.
|
|
|
|
* A more specific solution, the one used here, is to change the UINT32_C
|
|
|
|
* macro to not used macros in the arguments to __CONCAT__.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = hpux11_uint32_c;
|
|
|
|
files = inttypes.h;
|
2000-05-10 00:21:08 +08:00
|
|
|
select = "^#define UINT32_C\\(__c\\)[ \t]*"
|
|
|
|
"__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)";
|
2000-05-16 22:01:34 +08:00
|
|
|
c_fix = format;
|
2000-05-10 00:21:08 +08:00
|
|
|
c_fix_arg = '#define UINT32_C(__c) __CONCAT__(__c,ul)';
|
2000-05-16 22:01:34 +08:00
|
|
|
test_text =
|
|
|
|
"#define CONCAT_U__(__c)\t__CONCAT__(__c,u)\n"
|
|
|
|
"#define UINT32_C(__c)\t__CONCAT__(__CONCAT_U__(__c),l)";
|
1999-10-15 14:00:29 +08:00
|
|
|
};
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* get rid of bogus inline definitions in HP-UX 8.0
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = hpux8_bogus_inlines;
|
|
|
|
files = math.h;
|
|
|
|
select = inline;
|
|
|
|
sed = "s@inline int abs(int [a-z][a-z]*) {.*}"
|
|
|
|
"@extern \"C\" int abs(int);@";
|
|
|
|
sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
|
|
|
|
sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
|
|
|
|
sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
|
|
|
|
test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n"
|
|
|
|
"inline double sqr(double v) { return v**0.5; }";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
/*
|
|
|
|
* Fix return type of abort and free
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = int_abort_free_and_exit;
|
|
|
|
files = stdlib.h;
|
|
|
|
select = "int[ \t]+(abort|free|exit)[ \t]*\\(";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "void\t%1(";
|
|
|
|
|
|
|
|
test_text = "extern int abort(int);\n"
|
|
|
|
"extern int free(void*);\n"
|
|
|
|
"extern int exit(void*);";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
2000-01-18 05:45:29 +08:00
|
|
|
* On Interactive Unix 2.2, certain traditional Unix definitions
|
|
|
|
* (notably getc and putc in stdio.h) are omitted if __STDC__ is
|
|
|
|
* defined, not just if _POSIX_SOURCE is defined. This makes it
|
1999-03-31 20:02:19 +08:00
|
|
|
* impossible to compile any nontrivial program except with -posix.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-01-18 05:45:29 +08:00
|
|
|
hackname = isc_omits_with_stdc;
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
files = "stdio.h";
|
|
|
|
files = "math.h";
|
|
|
|
files = "ctype.h";
|
|
|
|
files = "sys/limits.h";
|
|
|
|
files = "sys/fcntl.h";
|
|
|
|
files = "sys/dirent.h";
|
2000-05-10 00:21:08 +08:00
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
select = '!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = '!defined(_POSIX_SOURCE)';
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "#if !defined(__STDC__) && !defined(_POSIX_SOURCE) /* ? ! */"
|
|
|
|
"\nint foo;\n#endif";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
2000-05-15 05:20:33 +08:00
|
|
|
* Fix various macros used to define ioctl numbers.
|
|
|
|
* The traditional syntax was:
|
|
|
|
*
|
|
|
|
* #define _IO(n, x) (('n'<<8)+x)
|
|
|
|
* #define TIOCFOO _IO(T, 1)
|
|
|
|
*
|
Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes.
(fix_char_macro_defines, fix_char_macro_uses): New functions.
* fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp.
Recognize Emacs mode markers also.
* fixinc/fixtests.c (else_endif_label): Fix bug in recognition of
C++ comments in C++ headers. Call is_cxx_header only if
necessary.
* fixinc/inclhack.def (avoid_bool): Add select for the problem and
bypass for ncurses.
(bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with...
(io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes):
... these, which use the new C fixes.
(math_exception): Escape literal '+' in bypass expression.
* fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh:
Regenerate.
From-SVN: r31512
2000-01-20 05:41:04 +08:00
|
|
|
* but this does not work with the C standard, which disallows macro
|
|
|
|
* expansion inside strings. We have to rewrite it thus:
|
2000-05-15 05:20:33 +08:00
|
|
|
*
|
|
|
|
* #define _IO(n, x) ((n<<8)+x)
|
|
|
|
* #define TIOCFOO _IO('T', 1)
|
|
|
|
*
|
Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes.
(fix_char_macro_defines, fix_char_macro_uses): New functions.
* fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp.
Recognize Emacs mode markers also.
* fixinc/fixtests.c (else_endif_label): Fix bug in recognition of
C++ comments in C++ headers. Call is_cxx_header only if
necessary.
* fixinc/inclhack.def (avoid_bool): Add select for the problem and
bypass for ncurses.
(bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with...
(io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes):
... these, which use the new C fixes.
(math_exception): Escape literal '+' in bypass expression.
* fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh:
Regenerate.
From-SVN: r31512
2000-01-20 05:41:04 +08:00
|
|
|
* The select expressions match too much, but the c_fix code is cautious.
|
|
|
|
*
|
|
|
|
* _IO might be: _IO DESIO BSD43__IO with W, R, WR, C, ... suffixes.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-15 05:20:33 +08:00
|
|
|
hackname = io_quotes_def;
|
2000-06-17 04:38:42 +08:00
|
|
|
select = "define[ \t]+[A-Z0-9_]+IO[A-Z]*\\([a-zA-Z][,)]";
|
2000-05-15 05:20:33 +08:00
|
|
|
c_fix = char_macro_def;
|
2000-05-12 23:51:55 +08:00
|
|
|
c_fix_arg = "IO";
|
2000-05-21 02:54:45 +08:00
|
|
|
test_text =
|
|
|
|
"#define BSD43__IOWR(n, x) (('n'<<8)+x)\n"
|
|
|
|
"#define _IOWN(x,y,t) (_IOC_IN|(((t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)\n"
|
|
|
|
"#define _IO(x,y) ('x'<<8|y)";
|
2000-06-18 01:50:12 +08:00
|
|
|
test_text =
|
|
|
|
"#define XX_IO(x) ('x'<<8|256)";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes.
(fix_char_macro_defines, fix_char_macro_uses): New functions.
* fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp.
Recognize Emacs mode markers also.
* fixinc/fixtests.c (else_endif_label): Fix bug in recognition of
C++ comments in C++ headers. Call is_cxx_header only if
necessary.
* fixinc/inclhack.def (avoid_bool): Add select for the problem and
bypass for ncurses.
(bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with...
(io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes):
... these, which use the new C fixes.
(math_exception): Escape literal '+' in bypass expression.
* fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh:
Regenerate.
From-SVN: r31512
2000-01-20 05:41:04 +08:00
|
|
|
fix = {
|
2000-05-15 05:20:33 +08:00
|
|
|
hackname = io_quotes_use;
|
|
|
|
select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*"
|
|
|
|
"\\( *[^,']";
|
|
|
|
c_fix = char_macro_use;
|
2000-05-12 23:51:55 +08:00
|
|
|
c_fix_arg = "IO";
|
2000-05-31 04:24:44 +08:00
|
|
|
test_text = "#define TIOCFOO BSD43__IOWR(T, 1)\n"
|
|
|
|
"#define TIOCFOO \\\\\n"
|
|
|
|
"BSD43__IOWR(T, 1) /* Some are multi-line */";
|
Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/Makefile.in: Correct dependencies of fixincl and fixincl.o.
* fixinc/fixfixes.c (IO_use, CTRL_use, IO_defn, CTRL_defn): New fixes.
(fix_char_macro_defines, fix_char_macro_uses): New functions.
* fixinc/fixlib.c (is_cxx_header): Do the text scan with a regexp.
Recognize Emacs mode markers also.
* fixinc/fixtests.c (else_endif_label): Fix bug in recognition of
C++ comments in C++ headers. Call is_cxx_header only if
necessary.
* fixinc/inclhack.def (avoid_bool): Add select for the problem and
bypass for ncurses.
(bsd43_io_macros, io_def_quotes, ioctl_fix_ctrl): Replace with...
(io_def_quotes, io_use_quotes, ctrl_def_quotes, ctrl_use_quotes):
... these, which use the new C fixes.
(math_exception): Escape literal '+' in bypass expression.
* fixinc/fixincl.x, fixinc/fixincl.sh, fixinc/inclhack.sh:
Regenerate.
From-SVN: r31512
2000-01-20 05:41:04 +08:00
|
|
|
};
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-05-16 22:01:34 +08:00
|
|
|
* HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = hpux_maxint;
|
|
|
|
files = sys/param.h;
|
2000-10-18 00:35:12 +08:00
|
|
|
files = values.h;
|
2000-12-01 00:43:00 +08:00
|
|
|
select = "^#[ \t]*define[ \t]+MAXINT[ \t]";
|
|
|
|
bypass = "^#[ \t]*ifndef[ \t]+MAXINT";
|
|
|
|
test =
|
|
|
|
"-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 02:54:45 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef MAXINT\n%0\n#endif";
|
2000-12-01 00:43:00 +08:00
|
|
|
c_fix_arg = "^#[ \t]*define[ \t]+MAXINT[ \t].*";
|
2000-05-21 02:54:45 +08:00
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
test_text = '#define MAXINT 0x7FFFFFFF';
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-05-16 22:01:34 +08:00
|
|
|
* Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = hpux_systime;
|
|
|
|
files = sys/time.h;
|
|
|
|
select = "^extern struct sigevent;";
|
2000-05-21 03:47:41 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "struct sigevent;";
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
test_text = 'extern struct sigevent;';
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-05-16 22:01:34 +08:00
|
|
|
* Check for missing ';' in struct
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = ip_missing_semi;
|
|
|
|
files = netinet/ip.h;
|
|
|
|
select = "}$";
|
|
|
|
sed = "/^struct/,/^};/s/}$/};/";
|
|
|
|
test_text=
|
|
|
|
"struct mumble {\n"
|
|
|
|
" union {\n"
|
|
|
|
" int x;\n"
|
|
|
|
" }\n"
|
|
|
|
"}; /* mumbled struct */\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
1999-08-08 06:42:56 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* IRIX 5.2's <sys/asm.h> contains an asm comment with a contraction
|
|
|
|
* that causes the assembly preprocessor to complain about an
|
|
|
|
* unterminated character constant.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = irix_asm_apostrophe;
|
|
|
|
files = sys/asm.h;
|
1999-08-08 06:42:56 +08:00
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
select = "^[ \t]*#.*[Ww]e're";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1 are";
|
|
|
|
c_fix_arg = "^([ \t]*#.*[Ww]e)'re";
|
|
|
|
test_text = "\t# and we're on vacation";
|
1999-08-08 06:42:56 +08:00
|
|
|
};
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2001-03-16 11:28:28 +08:00
|
|
|
/*
|
|
|
|
* IRIX 5.x's stdio.h declares some functions that take a va_list as
|
|
|
|
* taking char *. However, GCC uses void * for va_list, so
|
|
|
|
* calling vfprintf with a va_list fails in C++. */
|
|
|
|
fix = {
|
|
|
|
hackname = irix_stdio_va_list;
|
|
|
|
files = stdio.h;
|
|
|
|
|
|
|
|
select = '(printf\(.*), /\* va_list \*/ char \*';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1, __gnuc_va_list";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-01-31 10:35:49 +08:00
|
|
|
/*
|
|
|
|
* Non-traditional "const" declaration in Irix's limits.h.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = irix_limits_const;
|
|
|
|
files = limits.h;
|
|
|
|
select = "^extern const ";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "extern __const ";
|
2001-02-07 06:19:50 +08:00
|
|
|
test_text = "extern const char limit; /* test\n\tlimits */";
|
2001-01-31 10:35:49 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
2000-05-16 22:01:34 +08:00
|
|
|
* Fixing ISC fmod declaration
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = isc_fmod;
|
|
|
|
files = math.h;
|
|
|
|
select = 'fmod\(double\)';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "fmod(double, double)";
|
|
|
|
test_text = "extern double fmod(double);";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These files in Sun OS 4.x and ARM/RISCiX and BSD4.3
|
|
|
|
* use / * * / to concatenate tokens.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = kandr_concat;
|
|
|
|
files = "sparc/asm_linkage.h";
|
|
|
|
files = "sun3/asm_linkage.h";
|
|
|
|
files = "sun3x/asm_linkage.h";
|
|
|
|
files = "sun4/asm_linkage.h";
|
|
|
|
files = "sun4c/asm_linkage.h";
|
|
|
|
files = "sun4m/asm_linkage.h";
|
|
|
|
files = "sun4c/debug/asm_linkage.h";
|
|
|
|
files = "sun4m/debug/asm_linkage.h";
|
|
|
|
files = "arm/as_support.h";
|
|
|
|
files = "arm/mc_type.h";
|
|
|
|
files = "arm/xcb.h";
|
|
|
|
files = "dev/chardefmac.h";
|
|
|
|
files = "dev/ps_irq.h";
|
|
|
|
files = "dev/screen.h";
|
|
|
|
files = "dev/scsi.h";
|
|
|
|
files = "sys/tty.h";
|
|
|
|
files = "Xm.acorn/XmP.h";
|
|
|
|
files = bsd43/bsd43_.h;
|
|
|
|
select = '/\*\*/';
|
2000-05-16 22:01:34 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = '##';
|
|
|
|
test_text = "#define __CONCAT__(a,b) a/**/b";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-07-12 06:20:38 +08:00
|
|
|
/*
|
|
|
|
* GNU libc1 string.h does not prototype memcpy and memcmp for gcc
|
2000-07-13 22:47:55 +08:00
|
|
|
* versions > 1. This fix will open up the declaration for all
|
|
|
|
* versions of GCC and for g++.
|
2000-07-12 06:20:38 +08:00
|
|
|
*/
|
2000-07-11 06:37:54 +08:00
|
|
|
fix = {
|
|
|
|
hackname = libc1_ifdefd_memx;
|
|
|
|
|
|
|
|
/* The string.h result is overwritten by AAB_ultrix_string when doing
|
|
|
|
"make check" and will fail. Therefore, we add the following kludgery
|
|
|
|
to insert the test_text into the special testing header. :-} */
|
|
|
|
files = testing.h;
|
|
|
|
files = string.h;
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
select = "' is a built-in function for gcc 2\\.x\\. \\*/";
|
|
|
|
bypass = __cplusplus;
|
2000-07-12 06:20:38 +08:00
|
|
|
c_fix_arg = "%1";
|
|
|
|
c_fix_arg =
|
|
|
|
'/\* `mem...\' is a built-in function for gcc 2\.x\. \*/' "\n"
|
|
|
|
'#if defined\(__STDC__\) && __GNUC__ < 2' "\n"
|
|
|
|
"(/\\* .* \\*/\n"
|
|
|
|
"extern [a-z_]+ mem.*(\n[^#].*)*;)\n"
|
|
|
|
"#endif";
|
2000-07-11 06:37:54 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"/* \\`memcpy' is a built-in function for gcc 2.x. */\n"
|
|
|
|
"#if defined(__STDC__) && __GNUC__ < 2\n"
|
|
|
|
"/* Copy N bytes of SRC to DEST. */\n"
|
|
|
|
"extern __ptr_t memcpy __P ((__ptr_t __dest, __const __ptr_t __src,\n"
|
|
|
|
" size_t __n));\n"
|
|
|
|
"#endif";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* In limits.h, put #ifndefs around things that are supposed to be defined
|
|
|
|
* in float.h to avoid redefinition errors if float.h is included first.
|
|
|
|
* On HP/UX this patch does not work, because on HP/UX limits.h uses
|
|
|
|
* multi line comments and the inserted #endif winds up inside the
|
|
|
|
* comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if
|
|
|
|
* we find a #ifndef FLT_MIN we assume that all the required #ifndefs
|
|
|
|
* are there, and we do not add them ourselves.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = limits_ifndefs;
|
1999-06-04 07:06:30 +08:00
|
|
|
files = "sys/limits.h";
|
2000-06-18 03:43:21 +08:00
|
|
|
files = "limits.h";
|
1998-10-16 15:00:18 +08:00
|
|
|
bypass = "ifndef[ \t]+FLT_MIN";
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
c_fix = format;
|
2000-05-21 03:47:41 +08:00
|
|
|
c_fix_arg = "#ifndef %1\n%0\n#endif";
|
2000-05-16 22:01:34 +08:00
|
|
|
c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+"
|
2000-05-21 03:47:41 +08:00
|
|
|
"((FLT|DBL)_(MIN|MAX|DIG))[ \t].*";
|
2000-05-16 22:01:34 +08:00
|
|
|
test_text = " #\tdefine\tDBL_DIG \t 0 /* somthin' */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Delete the '#define void int' line from curses.h on Lynx
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = lynx_void_int;
|
|
|
|
files = curses.h;
|
|
|
|
select = "#[ \t]*define[ \t]+void[ \t]+int[ \t]*";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "";
|
|
|
|
test_text = "# define\tvoid\tint \t/* curses foiled again */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix fcntl prototype in fcntl.h on LynxOS.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = lynxos_fcntl_proto;
|
|
|
|
files = fcntl.h;
|
|
|
|
select = "fcntl[ \t]*" '\(int, int, int\)';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = '%1...)';
|
|
|
|
c_fix_arg = "(fcntl[ \t]*" '\(int, int, )int\)';
|
|
|
|
test_text = "extern int fcntl(int, int, int);";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
1999-03-31 20:02:19 +08:00
|
|
|
* libm.a on m88k-motorola-sysv3 contains a stupid optimization for
|
|
|
|
* function hypot(), which returns the second argument without even
|
2000-05-16 22:01:34 +08:00
|
|
|
* looking at its value, if the other is 0.0.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = m88k_bad_hypot_opt;
|
|
|
|
mach = "m88k-motorola-sysv3*";
|
|
|
|
files = "math.h";
|
|
|
|
select = "^extern double hypot\\(\\);\n";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%0"
|
|
|
|
"/* Workaround a stupid Motorola optimization if one\n"
|
|
|
|
" of x or y is 0.0 and the other is negative! */\n"
|
|
|
|
"#ifdef __STDC__\n"
|
|
|
|
"static __inline__ double fake_hypot (double x, double y)\n"
|
|
|
|
"#else\n"
|
|
|
|
"static __inline__ double fake_hypot (x, y)\n"
|
|
|
|
"\tdouble x, y;\n"
|
|
|
|
"#endif\n"
|
|
|
|
"{\n"
|
|
|
|
"\treturn fabs (hypot (x, y));\n"
|
|
|
|
"}\n"
|
1998-10-16 15:00:18 +08:00
|
|
|
"#define hypot\tfake_hypot\n";
|
2000-05-16 22:01:34 +08:00
|
|
|
test_text = "extern double hypot();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
1999-03-31 20:02:19 +08:00
|
|
|
* Fix incorrect S_IF* definitions on m88k-sysv3.
|
|
|
|
*/
|
1998-10-16 15:00:18 +08:00
|
|
|
fix = {
|
|
|
|
hackname = m88k_bad_s_if;
|
|
|
|
mach = "m88k-*-sysv3*";
|
|
|
|
files = sys/stat.h;
|
2000-05-16 22:01:34 +08:00
|
|
|
select = "#define[ \t]+S_IS[A-Z]+\\(m\\)[ \t]+\\(m[ \t]*&";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = '#define %1(m) (((m) & S_IFMT) == %2)';
|
|
|
|
c_fix_arg = "#define[ \t]+(S_IS[A-Z]+)\\(m\\)[ \t]+"
|
|
|
|
"\\(m[ \t]*&[ \t]*"
|
|
|
|
"(S_IF[A-Z][A-Z][A-Z]+|0[0-9]+)"
|
|
|
|
"[ \t]*\\)";
|
|
|
|
test_text = '#define S_ISREG(m) (m & S_IFREG) /* is regular? */';
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Put cpp wrappers around these include files to avoid redeclaration
|
|
|
|
* errors during multiple inclusion on m88k-tektronix-sysv3.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = m88k_multi_incl;
|
|
|
|
mach = "m88k-tektronix-sysv3*";
|
|
|
|
files = "time.h";
|
|
|
|
bypass = "#ifndef";
|
2000-05-19 22:15:24 +08:00
|
|
|
c_fix = wrap;
|
|
|
|
test_text = "";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-01-25 16:06:23 +08:00
|
|
|
/*
|
|
|
|
* Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_.
|
2000-12-06 02:08:09 +08:00
|
|
|
*
|
|
|
|
* On NetBSD, machine is a symbolic link to an architecture specific
|
|
|
|
* directory name, so we can't match a specific file name here.
|
2000-01-25 16:06:23 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = machine_ansi_h_va_list;
|
2000-05-21 03:47:41 +08:00
|
|
|
select = "define[ \t]+_BSD_VA_LIST_[ \t]";
|
2000-01-25 16:06:23 +08:00
|
|
|
bypass = '__builtin_va_list';
|
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1__builtin_va_list";
|
|
|
|
c_fix_arg = "(define[ \t]+_BSD_VA_LIST_[ \t]+).*";
|
|
|
|
|
|
|
|
test_text = " # define _BSD_VA_LIST_\tchar**";
|
2000-01-25 16:06:23 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
1999-03-31 20:02:19 +08:00
|
|
|
* Fix non-ansi machine name defines
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-15 05:20:33 +08:00
|
|
|
hackname = machine_name;
|
|
|
|
c_test = machine_name;
|
|
|
|
c_fix = machine_name;
|
2000-05-21 05:32:42 +08:00
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
test_text = "/* MACH_DIFF: */\n"
|
2000-05-21 05:32:42 +08:00
|
|
|
"#if defined( i386 ) || defined( sparc ) || defined( vax )"
|
2000-05-21 03:47:41 +08:00
|
|
|
"\n/* no uniform test, so be careful :-) */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Some math.h files define struct exception, which conflicts with
|
|
|
|
* the class exception defined in the C++ file std/stdexcept.h. We
|
|
|
|
* redefine it to __math_exception. This is not a great fix, but I
|
|
|
|
* haven't been able to think of anything better.
|
2000-02-02 07:51:38 +08:00
|
|
|
* Note that we have to put the #ifdef/#endif blocks at beginning
|
|
|
|
* and end of file, because fixproto runs after us and may insert
|
|
|
|
* additional references to struct exception.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-15 03:29:02 +08:00
|
|
|
hackname = math_exception;
|
|
|
|
files = math.h;
|
|
|
|
select = "struct exception";
|
2000-05-21 03:47:41 +08:00
|
|
|
bypass = 'We have a problem when using C\+\+';
|
2000-05-15 03:29:02 +08:00
|
|
|
c_fix = wrap;
|
|
|
|
|
|
|
|
c_fix_arg = "#ifdef __cplusplus\n"
|
|
|
|
"#define exception __math_exception\n"
|
|
|
|
"#endif\n";
|
|
|
|
|
|
|
|
c_fix_arg = "#ifdef __cplusplus\n"
|
|
|
|
"#undef exception\n"
|
|
|
|
"#endif\n";
|
|
|
|
|
|
|
|
test_text = "typedef struct exception t_math_exception;";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* This looks pretty broken to me. ``dbl_max_def'' will contain
|
|
|
|
* "define DBL_MAX " at the start, when what we really want is just
|
|
|
|
* the value portion. Can't figure out how to write a test case
|
|
|
|
* for this either :-(
|
|
|
|
*/
|
1998-10-16 15:00:18 +08:00
|
|
|
fix = {
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
hackname = math_huge_val_from_dbl_max;
|
1998-10-16 15:00:18 +08:00
|
|
|
files = math.h;
|
2000-07-13 22:47:55 +08:00
|
|
|
|
1999-03-31 20:02:19 +08:00
|
|
|
/*
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
* IF HUGE_VAL is defined to be DBL_MAX *and* DBL_MAX is _not_ defined
|
|
|
|
* in math.h, this fix applies.
|
1999-03-31 20:02:19 +08:00
|
|
|
*/
|
2000-07-13 22:47:55 +08:00
|
|
|
select = "define[ \t]+HUGE_VAL[ \t]+DBL_MAX";
|
|
|
|
bypass = "define[ \t]+DBL_MAX";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
shell =
|
1999-03-31 20:02:19 +08:00
|
|
|
/*
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
* See if we have a definition for DBL_MAX in float.h.
|
|
|
|
* If we do, we will replace the one in math.h with that one.
|
1999-03-31 20:02:19 +08:00
|
|
|
*/
|
1998-10-16 15:00:18 +08:00
|
|
|
|
1999-03-31 20:02:19 +08:00
|
|
|
"\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h "
|
2000-07-13 22:47:55 +08:00
|
|
|
"| sed 's/.*DBL_MAX[ \t]*//' 2>/dev/null`\n\n"
|
1998-10-16 15:00:18 +08:00
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
"\tif ( test -n \"${dbl_max_def}\" ) > /dev/null 2>&1\n"
|
|
|
|
"\tthen sed -e '/define[ \t]*HUGE_VAL[ \t]*DBL_MAX/"
|
2000-07-13 22:47:55 +08:00
|
|
|
"s@DBL_MAX@'\"$dbl_max_def@\"\n"
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
"\telse cat\n"
|
|
|
|
"\tfi";
|
2000-07-13 22:47:55 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"`echo '#define DBL_MAX\t3.1415e+9 /* really big */' >> float.h`\n"
|
|
|
|
"#define HUGE_VAL DBL_MAX";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
/*
|
|
|
|
* In any case, put #ifndef .. #endif around #define HUGE_VAL in math.h.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = math_huge_val_ifndef;
|
2000-05-21 03:47:41 +08:00
|
|
|
files = math.h;
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
files = math/math.h;
|
2000-05-21 03:47:41 +08:00
|
|
|
select = "define[ \t]+HUGE_VAL";
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef HUGE_VAL\n%0\n#endif";
|
|
|
|
c_fix_arg = "^[ \t]*#[ \t]*define[ \t]+HUGE_VAL[ \t].*";
|
|
|
|
|
|
|
|
test_text = "# define\tHUGE_VAL 3.4e+40";
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
};
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix nested comments in Motorola's <limits.h> and <sys/limits.h>
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = nested_motorola;
|
|
|
|
mach = "m68k-motorola-sysv*";
|
|
|
|
files = sys/limits.h;
|
2000-06-18 03:43:21 +08:00
|
|
|
files = limits.h;
|
2000-07-13 22:47:55 +08:00
|
|
|
select = "max # bytes atomic in write|error value returned by Math lib";
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
sed = "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*"
|
|
|
|
"/\\* max # bytes atomic in write to a\\)$@\\1 */@";
|
|
|
|
sed = "s@\\(/\\*#define\tHUGE_VAL\t3.[0-9e+]* \\)"
|
|
|
|
"\\(/\\*error value returned by Math lib\\*/\\)$@\\1*/ \\2@";
|
2000-07-13 22:47:55 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"#undef PIPE_BUF /* max # bytes atomic in write to a\n"
|
|
|
|
"\t\t/* PIPE */\n"
|
|
|
|
"/*#define\tHUGE_VAL\t3.9e+9 /*error value returned by Math lib*/";
|
2000-05-16 22:01:34 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fixing nested comments in ISC <sys/limits.h>
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = nested_sys_limits;
|
|
|
|
files = sys/limits.h;
|
|
|
|
select = CHILD_MAX;
|
|
|
|
sed = "/CHILD_MAX/s,/\\* Max, Max,";
|
|
|
|
sed = "/OPEN_MAX/s,/\\* Max, Max,";
|
|
|
|
test_text = "/*\n#define CHILD_MAX 20 /* Max, Max, ... */ /*\n"
|
|
|
|
"#define OPEN_MAX 20 /* Max, Max, ... */\n";
|
|
|
|
};
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* nested comment
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = nested_auth_des;
|
|
|
|
files = rpc/rpc.h;
|
|
|
|
select = '(/\*.*rpc/auth_des\.h>.*)/\*';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1*/ /*";
|
|
|
|
test_text = "/*#include <rpc/auth_des.h> /* skip this */";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* fix bogus recursive stdlib.h in NEWS-OS 4.0C
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = news_os_recursion;
|
|
|
|
files = stdlib.h;
|
2000-05-21 05:32:42 +08:00
|
|
|
select = "[ \t]*#include <stdlib\\.h>.*";
|
2000-05-21 03:47:41 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifdef BOGUS_RECURSION\n%0\n#endif";
|
|
|
|
test_text = "#include <stdlib.h>";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NeXT 3.2 adds const prefix to some math functions.
|
|
|
|
* These conflict with the built-in functions.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 03:47:41 +08:00
|
|
|
hackname = next_math_prefix;
|
|
|
|
files = ansi/math.h;
|
|
|
|
select = "^extern[ \t]+double[ \t]+__const__[ \t]";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "extern double %1(";
|
|
|
|
c_fix_arg = "^extern[ \t]+double[ \t]+__const__[ \t]+([a-z]+)\\(";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
test_text = "extern\tdouble\t__const__\tmumble();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NeXT 3.2 uses the word "template" as a parameter for some
|
|
|
|
* functions. GCC reports an invalid use of a reserved key word
|
2000-05-21 03:47:41 +08:00
|
|
|
* with the built-in functions.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = next_template;
|
|
|
|
files = bsd/libc.h;
|
2000-05-21 03:47:41 +08:00
|
|
|
select = "[ \t]template\\)";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "(%1)";
|
|
|
|
c_fix_arg = "\\(([^)]*)[ \t]template\\)";
|
|
|
|
test_text = "extern mumble( char * template); /* fix */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NeXT 3.2 includes the keyword volatile in the abort() and exit()
|
|
|
|
* function prototypes. That conflicts with the built-in functions.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = next_volitile;
|
|
|
|
files = ansi/stdlib.h;
|
2000-05-21 03:47:41 +08:00
|
|
|
select = "^extern[ \t]+volatile[ \t]+void[ \t]";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "extern void %1(";
|
|
|
|
c_fix_arg = "^extern[ \t]+volatile[ \t]+void[ \t]+(exit|abort)\\(";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 03:47:41 +08:00
|
|
|
test_text = "extern\tvolatile\tvoid\tabort();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NeXT 2.0 defines 'int wait(union wait*)', which conflicts with Posix.1.
|
|
|
|
* Note that version 3 of the NeXT system has wait.h in a different directory,
|
|
|
|
* so that this code won't do anything. But wait.h in version 3 has a
|
|
|
|
* conditional, so it doesn't need this fix. So everything is okay.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = next_wait_union;
|
|
|
|
files = sys/wait.h;
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
select = 'wait\(union wait';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "wait(void";
|
|
|
|
test_text = "extern pid_d wait(union wait*);";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* a missing semi-colon at the end of the nodeent structure definition.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = nodeent_syntax;
|
|
|
|
files = netdnet/dnetdb.h;
|
|
|
|
select = "char[ \t]*\\*na_addr[ \t]*$";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%0;";
|
|
|
|
test_text = "char *na_addr\t";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by
|
|
|
|
* defining regex.h related types. This causes libg++ build and usage
|
|
|
|
* failures. Fixing this correctly requires checking and modifying 3 files.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = osf_namespace_a;
|
|
|
|
files = reg_types.h;
|
|
|
|
files = sys/lc_core.h;
|
1999-03-31 20:02:19 +08:00
|
|
|
test = " -r reg_types.h";
|
|
|
|
test = " -r sys/lc_core.h";
|
|
|
|
test = " -n \"`grep '} regex_t;' reg_types.h`\"";
|
|
|
|
test = " -z \"`grep __regex_t regex.h`\"";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "__%0";
|
2000-06-02 19:45:57 +08:00
|
|
|
c_fix_arg = "reg(ex|off|match)_t";
|
2000-05-21 05:32:42 +08:00
|
|
|
|
2000-05-31 22:26:57 +08:00
|
|
|
test_text = "`touch sys/lc_core.h`"
|
2000-05-21 05:32:42 +08:00
|
|
|
"typedef struct {\n int stuff, mo_suff;\n} regex_t;\n"
|
|
|
|
"extern regex_t re;\n"
|
|
|
|
"extern regoff_t ro;\n"
|
|
|
|
"extern regmatch_t rm;\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = osf_namespace_c;
|
1998-10-16 15:00:18 +08:00
|
|
|
files = regex.h;
|
1999-03-31 20:02:19 +08:00
|
|
|
test = " -r reg_types.h";
|
|
|
|
test = " -r sys/lc_core.h";
|
|
|
|
test = " -n \"`grep '} regex_t;' reg_types.h`\"";
|
|
|
|
test = " -z \"`grep __regex_t regex.h`\"";
|
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
select = "#include <reg_types\.h>.*";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%0\n"
|
|
|
|
"typedef __regex_t\tregex_t;\n"
|
|
|
|
"typedef __regoff_t\tregoff_t;\n"
|
|
|
|
"typedef __regmatch_t\tregmatch_t;";
|
|
|
|
|
|
|
|
test_text = "#include <reg_types.h>";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix __page_size* declarations in pthread.h AIX 4.1.[34].
|
|
|
|
* The original ones fail if uninitialized externs are not common.
|
|
|
|
* This is the default for all ANSI standard C++ compilers.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = pthread_page_size;
|
|
|
|
files = pthread.h;
|
|
|
|
select = "^int __page_size";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "extern %0";
|
|
|
|
test_text = "int __page_size;";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix return type of fread and fwrite on sysV68
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = read_ret_type;
|
|
|
|
files = stdio.h;
|
1999-06-23 20:29:01 +08:00
|
|
|
select = "extern int\t.*, fread\\(\\), fwrite\\(\\)";
|
2000-05-21 05:32:42 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "extern unsigned int fread(), fwrite();\n%1%2";
|
|
|
|
c_fix_arg = "(extern int\t.*), fread\\(\\), fwrite\\(\\)(.*)";
|
|
|
|
|
|
|
|
test_text = "extern int\tfclose(), fflush(), fread(), fwrite(), foo();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* function class(double x) conflicts with C++ keyword on rs/6000
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = rs6000_double;
|
|
|
|
files = math.h;
|
|
|
|
select = '[^a-zA-Z_]class\(';
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
|
|
|
|
c_fix_arg = '^.*[^a-zA-Z_]class\(.*';
|
|
|
|
|
|
|
|
test_text = "extern int class();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Wrong fchmod prototype on RS/6000.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = rs6000_fchmod;
|
|
|
|
files = sys/stat.h;
|
|
|
|
select = 'fchmod\(char \*';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "fchmod(int";
|
|
|
|
test_text = "extern int fchmod(char *, mode_t);";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* parameters conflict with C++ new on rs/6000
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = rs6000_param;
|
|
|
|
files = "stdio.h";
|
|
|
|
files = "unistd.h";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
select = 'rename\(const char \*old, const char \*new\)';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = 'rename(const char *_old, const char *_new)';
|
|
|
|
|
|
|
|
test_text = 'extern int rename(const char *old, const char *new);';
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-01 07:30:15 +08:00
|
|
|
/*
|
|
|
|
* The static functions lstat() and fchmod() in <sys/stat.h>
|
|
|
|
* cause G++ grief since they're not wrapped in "if __cplusplus".
|
|
|
|
*
|
|
|
|
* On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains
|
|
|
|
* tiny static wrappers that aren't C++ safe.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sco_static_func;
|
|
|
|
files = sys/stat.h;
|
|
|
|
mach = "i?86-*-sco3.2*";
|
|
|
|
select = "^static int";
|
|
|
|
|
|
|
|
sed = "/^static int/i\\\n"
|
|
|
|
"#if __cplusplus\\\n"
|
|
|
|
"extern \"C\" {\\\n"
|
|
|
|
"#endif /* __cplusplus */";
|
|
|
|
|
|
|
|
sed = "/^}$/a\\\n"
|
|
|
|
"#if __cplusplus\\\n"
|
|
|
|
" }\\\n"
|
|
|
|
"#endif /* __cplusplus */";
|
2000-05-21 05:32:42 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"#ifdef __STDC__\n"
|
|
|
|
"static int\tstat(const char *__f, struct stat *__p) {\n"
|
|
|
|
"\treturn __stat32(__f, __p);\n"
|
|
|
|
"}\n\n# else /* !__STDC__ */\n"
|
|
|
|
|
|
|
|
"static int\tstat(__f, __p)\n"
|
|
|
|
"\tchar *__f;\n"
|
|
|
|
"\tstruct stat *__p;\n"
|
|
|
|
"{\n"
|
|
|
|
"\treturn __stat32(__f, __p);\n"
|
|
|
|
"}\n"
|
|
|
|
"#endif";
|
2000-05-01 07:30:15 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2001-02-17 02:26:40 +08:00
|
|
|
/*
|
|
|
|
* "!__STDC__" or "__STDC__==0" or "__STDC__!=1" or "__STDC__-0==0"
|
|
|
|
* is "!defined( __STRICT_ANSI__ )"
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = strict_ansi_not;
|
|
|
|
select = "^([ \t]*#[ \t]*if.*)"
|
|
|
|
"(!__STDC__"
|
|
|
|
"|__STDC__[ \t]*==[ \t]*0"
|
|
|
|
"|__STDC__[ \t]*!=[ \t]*1"
|
|
|
|
"|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
|
|
|
|
")(.*)";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
|
|
|
|
|
2001-02-22 04:01:24 +08:00
|
|
|
test_text = "#if !__STDC__ \n"
|
|
|
|
"#if __STDC__ == 0\n"
|
|
|
|
"#if __STDC__ != 1\n"
|
|
|
|
"#if __STDC__ - 0 == 0"
|
2001-02-17 02:26:40 +08:00
|
|
|
"/* not std C */\nint foo;\n#endif";
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* "__STDC__-0==0"
|
|
|
|
* is "!defined( __STRICT_ANSI__ )" on continued #if-s
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = strict_ansi_not_ctd;
|
|
|
|
files="limits.h";
|
|
|
|
files="math.h";
|
|
|
|
files="stdio.h";
|
|
|
|
files="signal.h";
|
|
|
|
files="stdlib.h";
|
|
|
|
files="time.h";
|
|
|
|
select = "^([ \t]*[|&][|&][ \t(]*)"
|
|
|
|
"(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
|
|
|
|
")(.*)";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
|
|
|
|
|
|
|
|
test_text = "#if 1\\\n"
|
|
|
|
"|| __STDC__ - 0 == 0 /* not std C */\nint foo;\n#endif";
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1"
|
|
|
|
* is "defined( __STRICT_ANSI__ )"
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = strict_ansi_only;
|
|
|
|
select = "^([ \t]*#[ \t]*if.*)"
|
|
|
|
"(__STDC__[ \t]*!=[ \t]*0"
|
|
|
|
"|__STDC__[ \t]*==[ \t]*1"
|
|
|
|
"|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*1"
|
|
|
|
"|__STDC__[ \t]*-[ \t]*0[ \t]*!=[ \t]*0"
|
|
|
|
")(.*)";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1 defined(__STRICT_ANSI__)%3";
|
|
|
|
|
|
|
|
test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif";
|
|
|
|
};
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
|
2000-05-01 07:30:15 +08:00
|
|
|
/*
|
|
|
|
* Fix prototype declaration of utime in sys/times.h.
|
|
|
|
* In 3.2v4.0 the const is missing.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = sco_utime;
|
|
|
|
files = sys/times.h;
|
|
|
|
mach = "i?86-*-sco3.2v4*";
|
|
|
|
|
|
|
|
select = '\(const char \*, struct utimbuf \*\);';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = '(const char *, const struct utimbuf *);';
|
|
|
|
|
|
|
|
test_text = "extern int utime(const char *, struct utimbuf *);";
|
2000-05-01 07:30:15 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Sony NEWSOS 5.0 does not support the complete ANSI C standard.
|
|
|
|
*/
|
|
|
|
#ifdef SONY
|
|
|
|
fix = {
|
|
|
|
hackname = sony_ctype;
|
|
|
|
files = ctype.h;
|
1999-03-31 20:02:19 +08:00
|
|
|
test = " -x /bin/sony";
|
|
|
|
test = " ! -z \"`if /bin/sony ; then echo true ; fi`\"";
|
1998-10-16 15:00:18 +08:00
|
|
|
sed = "s/__ctype/_ctype/g";
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Sony NEWSOS 5.0 does not support the complete ANSI C standard.
|
|
|
|
*/
|
|
|
|
#ifdef SONY
|
|
|
|
fix = {
|
|
|
|
hackname = sony_stdio;
|
|
|
|
files = stdio.h;
|
1999-03-31 20:02:19 +08:00
|
|
|
test = " -x /bin/sony";
|
|
|
|
test = " ! -z \"`if /bin/sony ; then echo true ; fi`\"";
|
1998-10-16 15:00:18 +08:00
|
|
|
sed = "s/__filbuf/_filbuf/g\n"
|
|
|
|
"s/__flsbuf/_flsbuf/g\n"
|
|
|
|
"s/__iob/_iob/g";
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Add a `static' declaration of `getrnge' into <regexp.h>.
|
|
|
|
*
|
|
|
|
* Don't do this if there is already a `static void getrnge' declaration
|
|
|
|
* present, since this would cause a redeclaration error. Solaris 2.x has
|
|
|
|
* such a declaration.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = static_getrnge;
|
|
|
|
files = regexp.h;
|
|
|
|
bypass = "static void getrnge";
|
|
|
|
sed = "/^static int[ \t]*size;/c\\\n"
|
|
|
|
"static int size ;\\\n\\\n"
|
|
|
|
"static int getrnge ();";
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2000-01-25 16:06:23 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* a missing semi-colon at the end of the statsswtch structure definition.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = statsswtch;
|
|
|
|
files = rpcsvc/rstat.h;
|
|
|
|
select = "boottime$";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "boottime;";
|
|
|
|
test_text = "struct statswtch {\n int boottime\n};";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-01-25 16:06:23 +08:00
|
|
|
/*
|
|
|
|
* Arrange for stdio.h to use stdarg.h to define __gnuc_va_list.
|
|
|
|
* On 4BSD-derived systems, stdio.h defers to machine/ansi.h; that's
|
|
|
|
* OK too.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = stdio_stdarg_h;
|
|
|
|
files = stdio.h;
|
|
|
|
bypass = "include.*(stdarg\.h|machine/ansi\.h)";
|
|
|
|
|
2000-05-15 03:29:02 +08:00
|
|
|
c_fix = wrap;
|
2000-01-25 16:06:23 +08:00
|
|
|
|
2000-05-15 03:29:02 +08:00
|
|
|
c_fix_arg = "#define __need___va_list\n#include <stdarg.h>\n";
|
|
|
|
|
|
|
|
test_text = "";
|
2000-01-25 16:06:23 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Don't use or define the name va_list in stdio.h.
|
|
|
|
* This is for ANSI and also to interoperate properly with gcc's varargs.h.
|
2000-01-25 16:06:23 +08:00
|
|
|
* Note _BSD_VA_LIST_ is dealt with elsewhere.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = stdio_va_list;
|
|
|
|
files = stdio.h;
|
2000-12-14 14:11:40 +08:00
|
|
|
bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list';
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Use __gnuc_va_list in arg types in place of va_list.
|
|
|
|
* On 386BSD use __gnuc_va_list instead of _VA_LIST_. We're hoping the
|
|
|
|
* trailing parentheses and semicolon save all other systems from this.
|
2000-01-25 16:06:23 +08:00
|
|
|
* Define __not_va_list__ (something harmless and unused)
|
|
|
|
* instead of va_list.
|
1998-10-16 15:00:18 +08:00
|
|
|
* Don't claim to have defined va_list.
|
|
|
|
*/
|
2000-01-25 16:06:23 +08:00
|
|
|
sed = "s@ va_list @ __gnuc_va_list @\n"
|
|
|
|
"s@ va_list)@ __gnuc_va_list)@\n"
|
|
|
|
"s@ _VA_LIST_));@ __gnuc_va_list));@\n"
|
|
|
|
"s@ va_list@ __not_va_list__@\n"
|
|
|
|
"s@\\*va_list@*__not_va_list__@\n"
|
|
|
|
"s@ __va_list)@ __gnuc_va_list)@\n"
|
2000-02-21 07:15:32 +08:00
|
|
|
"s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;"
|
|
|
|
"@typedef \\1 __not_va_list__;@\n"
|
2000-01-25 16:06:23 +08:00
|
|
|
"s@GNUC_VA_LIST@GNUC_Va_LIST@\n"
|
|
|
|
"s@_NEED___VA_LIST@_NEED___Va_LIST@\n"
|
|
|
|
"s@VA_LIST@DUMMY_VA_LIST@\n"
|
|
|
|
"s@_Va_LIST@_VA_LIST@";
|
2000-07-13 22:47:55 +08:00
|
|
|
test_text = "extern void mumble( va_list);";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-16 22:01:34 +08:00
|
|
|
/*
|
|
|
|
* IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s
|
|
|
|
* in prototype without previous definition.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = struct_file;
|
|
|
|
files = rpc/xdr.h;
|
|
|
|
select = '^.*xdrstdio_create.*struct __file_s';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "struct __file_s;\n%0";
|
|
|
|
test_text = "extern void xdrstdio_create( struct __file_s* );";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr
|
|
|
|
* in prototype without previous definition.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = struct_sockaddr;
|
|
|
|
files = rpc/auth.h;
|
|
|
|
select = "^.*authdes_create.*struct sockaddr";
|
|
|
|
bypass = "<sys/socket\.h>";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "struct sockaddr;\n%0";
|
|
|
|
test_text = "extern AUTH* authdes_create( struct sockaddr* );";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-05-01 07:30:15 +08:00
|
|
|
/*
|
|
|
|
* Apply fix this to all OSs since this problem seems to effect
|
|
|
|
* more than just SunOS.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sun_auth_proto;
|
|
|
|
files = rpc/auth.h;
|
|
|
|
files = rpc/clnt.h;
|
|
|
|
files = rpc/svc.h;
|
|
|
|
files = rpc/xdr.h;
|
|
|
|
/*
|
|
|
|
* Select those files containing '(*name)()'.
|
|
|
|
*/
|
2000-05-21 05:32:42 +08:00
|
|
|
select = '\(\*[a-z][a-z_]*\)\(\)';
|
2000-05-01 07:30:15 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifdef __cplusplus\n%1(...);%2\n"
|
|
|
|
"#else\n%1();%2\n#endif";
|
|
|
|
c_fix_arg = '(.*\(\*[a-z][a-z_]*\))\(\);(.*)';
|
2000-05-01 07:30:15 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
test_text =
|
|
|
|
"struct auth_t {\n"
|
|
|
|
" int (*name)(); /* C++ bad */\n"
|
|
|
|
"};";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix bogus #ifdef on SunOS 4.1.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = sun_bogus_ifdef;
|
|
|
|
files = "hsfs/hsfs_spec.h";
|
|
|
|
files = "hsfs/iso_spec.h";
|
|
|
|
select = '#ifdef(.*\|\|.*)';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#if%1";
|
|
|
|
|
|
|
|
test_text = "#ifdef __i386__ || __vax__ || __sun4c__";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix the CAT macro in SunOS memvar.h.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = sun_catmacro;
|
|
|
|
files = pixrect/memvar.h;
|
|
|
|
select = "^#define[ \t]+CAT\\(a,b\\).*";
|
|
|
|
c_fix = format;
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
c_fix_arg =
|
|
|
|
"#ifdef __STDC__\n"
|
|
|
|
"# define CAT(a,b) a##b\n"
|
|
|
|
"#else\n%0\n#endif";
|
|
|
|
|
|
|
|
test_text =
|
|
|
|
"#define CAT(a,b)\ta/**/b";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix return type of free and {c,m,re}alloc in <malloc.h> on SunOS 4.1.
|
|
|
|
* Also fix return type of {m,re}alloc in <malloc.h> on sysV68
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sun_malloc;
|
|
|
|
files = malloc.h;
|
|
|
|
|
|
|
|
sed = "s/typedef[ \t]char \\*\tmalloc_t/typedef void \\*\tmalloc_t/g";
|
|
|
|
sed = "s/int[ \t][ \t]*free/void\tfree/g";
|
|
|
|
sed = "s/char\\([ \t]*\\*[ \t]*malloc\\)/void\\1/g";
|
|
|
|
sed = "s/char\\([ \t]*\\*[ \t]*realloc\\)/void\\1/g";
|
2000-05-22 12:02:14 +08:00
|
|
|
sed = "s/char\\([ \t]*\\*[ \t]*calloc\\)/void\\1/g";
|
2000-05-21 05:32:42 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"typedef char *\tmalloc_t;\n"
|
|
|
|
"int \tfree();\n"
|
|
|
|
"char*\tmalloc();\n"
|
2000-05-22 12:02:14 +08:00
|
|
|
"char*\tcalloc();\n"
|
2000-05-21 05:32:42 +08:00
|
|
|
"char*\trealloc();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Check for yet more missing ';' in struct (in SunOS 4.0.x)
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sun_rusers_semi;
|
|
|
|
files = rpcsvc/rusers.h;
|
|
|
|
select = "_cnt$";
|
|
|
|
sed = "/^struct/,/^};/s/_cnt$/_cnt;/";
|
2000-05-21 05:32:42 +08:00
|
|
|
test_text = "struct mumble\n int _cnt\n};";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* signal.h on SunOS defines signal using (),
|
|
|
|
* which causes trouble when compiling with g++ -pedantic.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sun_signal;
|
|
|
|
files = sys/signal.h;
|
|
|
|
files = signal.h;
|
2000-05-21 05:32:42 +08:00
|
|
|
select = "^void\t" '\(\*signal\(\)\)\(\);.*';
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg =
|
|
|
|
"#ifdef __cplusplus\n"
|
|
|
|
"void\t(*signal(...))(...);\n"
|
|
|
|
"#else\n%0\n#endif";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
test_text = "void\t(*signal())();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* math.h on SunOS 4 puts the declaration of matherr before the definition
|
|
|
|
* of struct exception, so the prototype (added by fixproto) causes havoc.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-21 05:32:42 +08:00
|
|
|
hackname = sunos_matherr_decl;
|
|
|
|
files = math.h;
|
|
|
|
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
/* If matherr has a prototype already, the header needs no fix. */
|
2000-11-12 12:16:07 +08:00
|
|
|
bypass = 'matherr.*(struct exception|__MATH_EXCEPTION)';
|
2000-05-21 05:32:42 +08:00
|
|
|
select = matherr;
|
|
|
|
|
|
|
|
c_fix = wrap;
|
|
|
|
c_fix_arg = "struct exception;\n";
|
|
|
|
|
|
|
|
test_text = "extern int matherr();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Correct the return type for strlen in strings.h in SunOS 4.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sunos_strlen;
|
|
|
|
files = strings.h;
|
2000-05-21 05:32:42 +08:00
|
|
|
select = "int[ \t]*strlen\\(\\);(.*)";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "__SIZE_TYPE__ strlen();%1";
|
|
|
|
test_text = " int\tstrlen(); /* string length */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Solaris math.h and floatingpoint.h define __P without protection,
|
|
|
|
* which conflicts with the fixproto definition. The fixproto
|
|
|
|
* definition and the Solaris definition are used the same way.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = svr4__p;
|
|
|
|
files = math.h;
|
|
|
|
files = floatingpoint.h;
|
2000-05-21 05:32:42 +08:00
|
|
|
select = "^#define[ \t]+__P.*";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __P\n%0\n#endif";
|
|
|
|
|
|
|
|
test_text = "#define __P(a) a";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
2000-05-21 05:32:42 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Disable apparent native compiler optimization cruft in SVR4.2 <string.h>
|
|
|
|
* that is visible to any ANSI compiler using this include. Simply
|
|
|
|
* delete the lines that #define some string functions to internal forms.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_disable_opt;
|
|
|
|
files = string.h;
|
|
|
|
select = '#define.*__std_hdr_';
|
|
|
|
sed = '/#define.*__std_hdr_/d';
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
1999-11-15 22:47:53 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Conditionalize some of <sys/endian.h> on __GNUC__ and __GNUG__.
|
1999-11-15 22:47:53 +08:00
|
|
|
* On some systems (UnixWare 2, UnixWare 7), the file is byteorder.h
|
|
|
|
* but we still "hijack" it and redirect it to the GNU byteorder.h..
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
1999-11-15 22:47:53 +08:00
|
|
|
#ifdef SVR5
|
1998-10-16 15:00:18 +08:00
|
|
|
fix = {
|
|
|
|
hackname = svr4_endian;
|
|
|
|
files = sys/endian.h;
|
1999-11-15 22:47:53 +08:00
|
|
|
#ifdef LATER
|
|
|
|
/*
|
|
|
|
* since we emit our own sys/byteorder.h,
|
|
|
|
* this fix can never be applied to that file.
|
|
|
|
*/
|
|
|
|
files = sys/byteorder.h;
|
|
|
|
#endif
|
1998-10-16 15:00:18 +08:00
|
|
|
bypass = '__GNUC__';
|
|
|
|
|
|
|
|
sed = "/#\tifdef\t__STDC__/i\\\n"
|
|
|
|
"# if !defined (__GNUC__) && !defined (__GNUG__)\n";
|
|
|
|
|
|
|
|
sed = "/#\t\tinclude\t<sys\\/byteorder.h>/s/\t\t/ /";
|
|
|
|
|
|
|
|
sed = "/# include\t<sys\\/byteorder.h>/i\\\n"
|
|
|
|
"# endif /* !defined (__GNUC__) && !defined (__GNUG__) */\n";
|
|
|
|
};
|
1999-11-15 22:47:53 +08:00
|
|
|
#endif /* SVR5 */
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Remove useless extern keyword from struct forward declarations
|
|
|
|
* in <sys/stream.h> and <sys/strsubr.h>
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_extern_struct;
|
|
|
|
files = sys/stream.h;
|
|
|
|
files = sys/strsubr.h;
|
|
|
|
select = 'extern struct [a-z_]*;';
|
|
|
|
sed = 's/extern struct \([a-z][a-z_]*\)/struct \1/';
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix declarations of `ftw' and `nftw' in <ftw.h>. On some/most SVR4
|
|
|
|
* systems the file <ftw.h> contains extern declarations of these
|
|
|
|
* functions followed by explicitly `static' definitions of these
|
|
|
|
* functions... and that's not allowed according to ANSI C. (Note
|
|
|
|
* however that on Solaris, this header file glitch has been pre-fixed by
|
|
|
|
* Sun. In the Solaris version of <ftw.h> there are no static
|
|
|
|
* definitions of any function so we don't need to do any of this stuff
|
|
|
|
* when on Solaris.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
#ifndef SOLARIS
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_ftw;
|
|
|
|
files = ftw.h;
|
|
|
|
select = '^extern int ftw\(const';
|
|
|
|
|
|
|
|
sed = '/^extern int ftw(const/i' "\\\n"
|
|
|
|
"#if !defined(_STYPES)\\\n"
|
|
|
|
"static\\\n"
|
|
|
|
"#else\\\n"
|
|
|
|
"extern\\\n"
|
|
|
|
"#endif";
|
|
|
|
sed = 's/extern \(int ftw(const.*\)$/\1/';
|
|
|
|
sed = "/^extern int nftw/i\\\n"
|
|
|
|
"#if defined(_STYPES)\\\n"
|
|
|
|
"static\\\n"
|
|
|
|
"#else\\\n"
|
|
|
|
"extern\\\n"
|
|
|
|
"#endif";
|
|
|
|
sed = 's/extern \(int nftw.*\)$/\1/';
|
|
|
|
sed = "/^extern int ftw(),/c\\\n"
|
|
|
|
"#if !defined(_STYPES)\\\n"
|
|
|
|
"static\\\n"
|
|
|
|
"#else\\\n"
|
|
|
|
"extern\\\n"
|
|
|
|
"#endif\\\n"
|
|
|
|
" int ftw();\\\n"
|
|
|
|
"#if defined(_STYPES)\\\n"
|
|
|
|
"static\\\n"
|
|
|
|
"#else\\\n"
|
|
|
|
"extern\\\n"
|
|
|
|
"#endif\\\n"
|
|
|
|
" int nftw();";
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix broken decl of getcwd present on some svr4 systems.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_getcwd;
|
|
|
|
files = stdlib.h;
|
|
|
|
files = unistd.h;
|
2000-05-01 07:30:15 +08:00
|
|
|
files = prototypes.h;
|
1998-10-16 15:00:18 +08:00
|
|
|
select = 'getcwd\(char \*, int\)';
|
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "getcwd(char *, size_t)";
|
|
|
|
|
|
|
|
test_text = "extern char* getcwd(char *, int);";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
2000-05-01 07:30:15 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* set ifdef _KERNEL
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_kernel;
|
|
|
|
files = fs/rfs/rf_cache.h;
|
|
|
|
files = sys/erec.h;
|
|
|
|
files = sys/err.h;
|
|
|
|
files = sys/char.h;
|
|
|
|
files = sys/getpages.h;
|
|
|
|
files = sys/map.h;
|
|
|
|
files = sys/cmn_err.h;
|
|
|
|
files = sys/kdebugger.h;
|
|
|
|
bypass = '_KERNEL';
|
2000-05-15 03:29:02 +08:00
|
|
|
c_fix = wrap;
|
|
|
|
|
|
|
|
c_fix_arg = "#ifdef _KERNEL\n";
|
|
|
|
c_fix_arg = "#endif /* _KERNEL */\n";
|
|
|
|
test_text = "";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Delete any #defines of `__i386' which may be present in <ieeefp.h>. They
|
|
|
|
* tend to conflict with the compiler's own definition of this symbol. (We
|
|
|
|
* will use the compiler's definition.)
|
|
|
|
* Likewise __sparc, for Solaris, and __i860, and a few others
|
|
|
|
* (guessing it is necessary for all of them).
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_mach_defines;
|
|
|
|
files = ieeefp.h;
|
|
|
|
select = "#define[ \t]*__(i386|i860|mips|sparc|m88k|m68k)[ \t]";
|
|
|
|
sed = "/#define[ \t]*__\\(i386|i860|mips|sparc|m88k|m68k\\)[ \t]/d";
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
1999-11-15 22:47:53 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Fix declarations of `makedev', `major', and `minor' in <sys/mkdev.h>.
|
1999-11-15 22:47:53 +08:00
|
|
|
* They are declared as non-static then immediately redeclared as static.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
1999-11-15 22:47:53 +08:00
|
|
|
#ifdef SVR5
|
1998-10-16 15:00:18 +08:00
|
|
|
fix = {
|
|
|
|
hackname = svr4_mkdev;
|
|
|
|
files = sys/mkdev.h;
|
1999-11-15 22:47:53 +08:00
|
|
|
select = '^static';
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
sed = "/^dev_t makedev(/s/^/static /";
|
|
|
|
sed = "/^major_t major(/s/^/static /";
|
|
|
|
sed = "/^minor_t minor(/s/^/static /";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
1999-11-15 22:47:53 +08:00
|
|
|
#endif /* SVR5 */
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix reference to NC_NPI_RAW in <sys/netcspace.h>.
|
|
|
|
* Also fix types of array initializers.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_netcspace;
|
|
|
|
files = sys/netcspace.h;
|
|
|
|
select = 'NC_NPI_RAW';
|
|
|
|
sed = 's/NC_NPI_RAW/NC_TPI_RAW/g';
|
|
|
|
sed = 's/NC_/(unsigned long) NC_/';
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix reference to NMSZ in <sys/adv.h>.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_nmsz;
|
|
|
|
files = sys/adv.h;
|
|
|
|
select = '\[NMSZ\]';
|
|
|
|
sed = 's/\[NMSZ\]/\[RFS_NMSZ\]/g';
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2000-05-01 07:30:15 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Fix broken decl of profil present on some svr4 systems.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_profil;
|
|
|
|
files = stdlib.h;
|
|
|
|
files = unistd.h;
|
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
select =
|
|
|
|
'profil\(unsigned short \*, unsigned int, unsigned int, unsigned int\)';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = 'profil(unsigned short *, size_t, int, unsigned int)';
|
|
|
|
|
|
|
|
test_text =
|
|
|
|
'profil(unsigned short *, unsigned int, unsigned int, unsigned int);';
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
2000-05-01 07:30:15 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Convert functions to prototype form, and fix arg names in <sys/stat.h>.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_proto_form;
|
|
|
|
files = sys/stat.h;
|
|
|
|
select = 'const extern';
|
|
|
|
|
|
|
|
sed = "/^stat([ \t]*[^c]/ {\nN\nN\n"
|
|
|
|
"s/(.*)\\n/( /\n"
|
|
|
|
"s/;\\n/, /\n"
|
|
|
|
"s/;$/)/\n" "}";
|
|
|
|
|
|
|
|
sed = "/^lstat([ \t]*[^c]/ {\nN\nN\n"
|
|
|
|
"s/(.*)\\n/( /\n"
|
|
|
|
"s/;\\n/, /\n"
|
|
|
|
"s/;$/)/\n" "}";
|
|
|
|
|
|
|
|
sed = "/^fstat([ \t]*[^i]/ {\nN\nN\n"
|
|
|
|
"s/(.*)\\n/( /\n"
|
|
|
|
"s/;\\n/, /\n"
|
|
|
|
"s/;$/)/\n" "}";
|
|
|
|
|
|
|
|
sed = "/^mknod([ \t]*[^c]/{\nN\nN\nN\n"
|
|
|
|
"s/(.*)\\n/( /\n"
|
|
|
|
"s/;\\n/, /g\n"
|
|
|
|
"s/;$/)/\n" "}";
|
|
|
|
|
|
|
|
sed = "1,$s/\\([^A-Za-z]\\)path\\([^A-Za-z]\\)/\\1__path\\2/g";
|
|
|
|
sed = "1,$s/\\([^A-Za-z]\\)buf\\([^A-Za-z]\\)/\\1__buf\\2/g";
|
|
|
|
sed = "1,$s/\\([^A-Za-z]\\)fd\\([^A-Za-z]\\)/\\1__fd\\2/g";
|
|
|
|
sed = "1,$s/ret\\([^u]\\)/__ret\\1/g";
|
|
|
|
sed = "1,$s/\\([^_]\\)mode\\([^_]\\)/\\1__mode\\2/g";
|
|
|
|
sed = "1,$s/\\([^_r]\\)dev\\([^_]\\)/\\1__dev\\2/g";
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Add a prototyped declaration of mmap to <sys/mman.h>.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_proto_mmap;
|
|
|
|
files = sys/mman.h;
|
|
|
|
select = '^extern caddr_t mmap();$';
|
|
|
|
sed = '/^extern caddr_t mmap();$/c' "\\\n"
|
|
|
|
"#ifdef __STDC__\\\n"
|
|
|
|
"extern caddr_t mmap (caddr_t, size_t, int, int, int, off_t);\\\n"
|
|
|
|
"#else /* !defined(__STDC__) */\\\n"
|
|
|
|
"extern caddr_t mmap ();\\\n"
|
|
|
|
"#endif /* !defined(__STDC__) */\\\n";
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Add a #define of _SIGACTION_ into <sys/signal.h>.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_sigaction;
|
|
|
|
files = sys/signal.h;
|
|
|
|
sed = "/^struct sigaction {/i\\\n"
|
|
|
|
"#define _SIGACTION_";
|
|
|
|
sed = 's/(void *(\*)())/(void (*)(int))/';
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Put storage class at start of decl, to avoid warning.
|
|
|
|
*/
|
|
|
|
#ifdef SVR4
|
|
|
|
fix = {
|
|
|
|
hackname = svr4_storage_class;
|
|
|
|
files = rpc/types.h;
|
|
|
|
select = 'const extern';
|
|
|
|
sed = 's/const extern/extern const/g';
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
1999-11-15 22:47:53 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Like svr4_mach_defines, but with newfangled syntax.
|
|
|
|
* Source lines are of #define __i386 #machine(i386). Delete them.
|
|
|
|
*/
|
|
|
|
#ifdef SVR5
|
|
|
|
fix = {
|
|
|
|
hackname = svr5_mach_defines;
|
|
|
|
files = ieeefp.h;
|
|
|
|
select = "#define[ \t]*__i386.*\(i386\)";
|
|
|
|
sed = "/#define[ \t]*__i386.*/d";
|
|
|
|
};
|
|
|
|
#endif /* SVR5 */
|
|
|
|
|
2000-05-01 07:30:15 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix these files to use the same types that we think they should.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-07-13 22:47:55 +08:00
|
|
|
hackname = gnu_types;
|
1998-10-16 15:00:18 +08:00
|
|
|
files = "sys/types.h";
|
|
|
|
files = "stdlib.h";
|
|
|
|
files = "sys/stdtypes.h";
|
|
|
|
files = "stddef.h";
|
|
|
|
files = "memory.h";
|
|
|
|
files = "unistd.h";
|
2000-07-13 22:47:55 +08:00
|
|
|
bypass = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
|
|
|
|
select = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
|
|
|
|
c_fix = gnu_type;
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-07-13 22:47:55 +08:00
|
|
|
test_text = "typedef long int ptrdiff_t; /* long int */\n"
|
|
|
|
"typedef uint_t size_t; /* uint_t */\n"
|
|
|
|
"typedef ushort_t wchar_t; /* ushort_t */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-01-25 16:06:23 +08:00
|
|
|
* Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
|
|
|
|
* in string.h on sysV68
|
|
|
|
* Correct the return type for strlen in string.h on Lynx.
|
|
|
|
* Correct the argument type for ffs in string.h on Alpha OSF/1 V2.0.
|
|
|
|
* Add missing const for strdup on OSF/1 V3.0.
|
|
|
|
* On sysV88 layout is slightly different.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sysv68_string;
|
2000-07-13 22:47:55 +08:00
|
|
|
files = testing.h;
|
1998-10-16 15:00:18 +08:00
|
|
|
files = string.h;
|
|
|
|
|
|
|
|
sed = "s/extern[ \t]*int[ \t]*strlen();/extern unsigned int strlen();/";
|
|
|
|
sed = "s/extern[ \t]*int[ \t]*ffs[ \t]*(long);/extern int ffs(int);/";
|
|
|
|
sed = "s/strdup(char \\*s1);/strdup(const char *s1);/";
|
2000-07-13 22:47:55 +08:00
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
sed = "/^extern char$/N";
|
|
|
|
sed = "s/^extern char\\(\\n\t\\*memccpy(),\\)$/extern void\\1/";
|
2000-07-13 22:47:55 +08:00
|
|
|
|
2000-08-23 22:03:47 +08:00
|
|
|
sed = "/^extern int$/N";
|
|
|
|
sed = "s/^extern int\\(\\n\tstrlen(),\\)/extern size_t\\1/";
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
sed = "/^\tstrncmp(),$/N";
|
2000-07-13 22:47:55 +08:00
|
|
|
sed = 's/^\(' "\t" 'strncmp()\),\n\(' "\t" 'strlen(),\)$/'
|
|
|
|
'\1;' "\\\nextern unsigned int\\\n\\2/";
|
|
|
|
|
|
|
|
test_text =
|
|
|
|
"extern int strlen();\n"
|
|
|
|
|
|
|
|
"extern int ffs(long);\n"
|
|
|
|
|
|
|
|
"extern char\n"
|
|
|
|
"\t*memccpy(),\n"
|
|
|
|
"\tmemcpy();\n"
|
|
|
|
|
|
|
|
"extern int\n"
|
2000-08-23 22:03:47 +08:00
|
|
|
"\tstrcmp(),\n"
|
2000-07-13 22:47:55 +08:00
|
|
|
"\tstrncmp(),\n"
|
|
|
|
"\tstrlen(),\n"
|
|
|
|
"\tstrspn();\n"
|
|
|
|
|
|
|
|
"extern int\n"
|
|
|
|
"\tstrlen(), strspn();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-05-21 05:32:42 +08:00
|
|
|
* Fix return type of calloc, malloc, realloc, bsearch and exit
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = sysz_stdlib_for_sun;
|
|
|
|
files = stdlib.h;
|
|
|
|
|
2000-05-21 05:32:42 +08:00
|
|
|
select = "char[ \t]*\\*[ \t]*(calloc|malloc|realloc|bsearch)[ \t]*\\(";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "void *\t%1(";
|
|
|
|
|
|
|
|
test_text =
|
|
|
|
"extern char*\tcalloc(size_t);\n"
|
|
|
|
"extern char*\tmalloc(size_t);\n"
|
|
|
|
"extern char*\trealloc(void*,size_t);\n"
|
|
|
|
"extern char*\tbsearch(void*,size_t,size_t);\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
* if the #if says _cplusplus, not the double underscore __cplusplus
|
|
|
|
* that it should be
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = tinfo_cplusplus;
|
|
|
|
files = tinfo.h;
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
select = "[ \t]_cplusplus";
|
2000-05-31 22:26:57 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = " __cplusplus";
|
|
|
|
test_text = "#ifdef _cplusplus\nint bogus;\n#endif";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = ultrix_atof_param;
|
|
|
|
files = math.h;
|
fixtests.c (is_cxx_header): New fn, split out of double_slash_test.
1999-12-17 13:21 -0800 Zack Weinberg <zack@rabi.columbia.edu>
* fixtests.c (is_cxx_header): New fn, split out of
double_slash_test.
(else_endif_label): Allow "#endif // comment" in C++ headers,
as determined by is_cxx_header.
* fixfixes.c (else_endif_label_fix): Update comment.
* fixincl.c: Don't output VERB_PROGRESS lines if stdout is not
a tty.
* genfixes: Correct double thinko in commandline parsing.
* hackshell.tpl: Generate correct sh syntax for bypass
entries.
* inclhack.def (all): Whenever an inserted preprocessor
conditional is split over multiple lines, use double
backslashes in this file so the fixed header will be readable.
(AAB_fd_zero_glibc_1_0): Rename to AAB_fd_zero_asm_posix_types_h
and add bypass entry for correct version of this header.
(AAB_fd_zero_glibc_1_x): Rename to AAB_fd_zero_gnu_types_h.
(AAB_fd_zero_glibc_2_0): Rename to AAB_fd_zero_selectbits_h.
(hpux8_bogus_inlines): New fix, split from...
(ultrix_atof_param) ... here.
(math_expression): Add bypass entry keyed to glibc comment
indicating the problem has been dealt with; disable
unnecessary sed operations; update commentary.
(math_gcc_ifndefs): Rename to math_huge_val_from_dbl_max,
add select and bypass entries, simplify shell operation.
(math_huge_val_ifndef): Split from math_gcc_ifndefs.
(ip_missing_semi, rs6000_param, tinfo_cplusplus,
ultrix_atof_param): Add select entry.
(stdio_va_list, sunos_mather_decl): Add bypass entry.
(systypes_for_aix, sysv86_string, tinfo_cplusplus): Put the
comments with the fixes they describe.
* fixincl.x, fixincl.sh, inclhack.sh: Regen.
From-SVN: r30999
1999-12-18 05:49:30 +08:00
|
|
|
select = "atof\\([ \t]*char";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-06-06 01:44:07 +08:00
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "atof(const char";
|
|
|
|
|
|
|
|
test_text = "extern double atof( char *__nptr);\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* parameters not const on DECstation Ultrix V4.0 and OSF/1.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-31 22:26:57 +08:00
|
|
|
hackname = ultrix_const;
|
|
|
|
files = stdio.h;
|
|
|
|
select = 'perror\( char \*';
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1 const %3 *__";
|
|
|
|
c_fix_arg = "([ \t*](perror|fputs|fwrite|scanf|fscanf)\\(.*)"
|
|
|
|
"[ \t]+(char|void) \\*__";
|
|
|
|
|
|
|
|
test_text =
|
|
|
|
"extern void perror( char *__s );\n"
|
|
|
|
"extern int fputs( char *__s, FILE *);\n"
|
|
|
|
"extern size_t fwrite( void *__ptr, size_t, size_t, FILE *);\n"
|
|
|
|
"extern int fscanf( FILE *__stream, char *__format, ...);\n"
|
|
|
|
"extern int scanf( char *__format, ...);\n";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* parameters not const on DECstation Ultrix V4.0 and OSF/1.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = ultrix_const2;
|
|
|
|
files = stdio.h;
|
|
|
|
|
|
|
|
select = '\*fopen\( char \*';
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1( const char *%3, const char *";
|
|
|
|
c_fix_arg = "([ \t*](fopen|sscanf|popen|tempnam))\\("
|
|
|
|
"[ \t]*char[ \t]*\\*([^,]*),"
|
|
|
|
"[ \t]*char[ \t]*\\*[ \t]*";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-31 22:26:57 +08:00
|
|
|
test_text =
|
|
|
|
"extern FILE *fopen( char *__filename, char *__type );\n"
|
|
|
|
"extern int sscanf( char *__s, char *__format, ...);\n"
|
|
|
|
"extern FILE *popen(char *, char *);\n"
|
|
|
|
"extern char *tempnam(char*,char*);\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-05-16 22:01:34 +08:00
|
|
|
* Ultrix V4.[35] puts the declaration of uname before the definition
|
|
|
|
* of struct utsname, so the prototype (added by fixproto) causes havoc.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = ultrix_fix_fixproto;
|
|
|
|
files = sys/utsname.h;
|
|
|
|
select = ULTRIX;
|
2000-06-06 01:44:07 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "struct utsname;\n%0";
|
2000-06-06 01:49:33 +08:00
|
|
|
c_fix_arg = "^[ \t]*extern[ \t]*int[ \t]*uname\\(\\);";
|
2000-05-31 22:26:57 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"/* ULTRIX's uname */\nextern\tint\tuname();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-05-16 22:01:34 +08:00
|
|
|
* Check for bad #ifdef line (in Ultrix 4.1)
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-16 22:01:34 +08:00
|
|
|
hackname = ultrix_ifdef;
|
2000-06-06 01:44:07 +08:00
|
|
|
select = "^#ifdef KERNEL[ \t]+&&";
|
2000-05-16 22:01:34 +08:00
|
|
|
files = sys/file.h;
|
2000-06-06 01:44:07 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#if defined(KERNEL) &&";
|
2000-05-31 22:26:57 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"#ifdef KERNEL\t&& defined( mumbojumbo )\nint oops;\n#endif";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2000-06-06 01:44:07 +08:00
|
|
|
/*
|
|
|
|
* Strip "|| CC$gfloat" from Ultrix math headers.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-06-18 03:43:21 +08:00
|
|
|
hackname = ultrix_math_ifdef;
|
|
|
|
files = sys/limits.h;
|
|
|
|
files = float.h;
|
|
|
|
files = math.h;
|
|
|
|
select = "^(#if.*)\\|\\|[ \t]+CC\\$[a-z]+";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "%1";
|
|
|
|
|
2000-06-06 01:44:07 +08:00
|
|
|
test_text = '#if defined(__GFLOAT) || CC\$gfloat';
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Avoid nested comments on Ultrix 4.3.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = ultrix_nested_ioctl;
|
|
|
|
files = sys/ioctl.h;
|
|
|
|
select = "^/\\* #define SIOCSCREEN";
|
|
|
|
sed = "/^\\/\\* #define SIOCSCREEN/s@/\\* screend@*//* screend@";
|
|
|
|
test_text =
|
|
|
|
"/* #define SIOCSCREENON _IOWR('i', 49, int)"
|
|
|
|
"/* screend, net/gw_screen.h */\n";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
fix = {
|
|
|
|
hackname = ultrix_nested_svc;
|
|
|
|
files = rpc/svc.h;
|
|
|
|
select = "^ \\*[ \t]*int protocol; */\\*";
|
|
|
|
sed = "s@^\\( \\*\tint protocol; \\)/\\*@\\1*/ /*@";
|
|
|
|
test_text =
|
|
|
|
" *\tint protocol; /* like TCP or UDP\n";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Add missing prototype for lstat and define for S_ISLNK
|
|
|
|
* in Ultrix V4.3 sys/stat.h.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = ultrix_stat;
|
|
|
|
files = sys/stat.h;
|
|
|
|
select = "@\\(#\\)stat\\.h.*6\\.1.*\\(ULTRIX\\)";
|
|
|
|
sed = "/^#define[ \t]S_IFPORT[ \t]*S_IFIFO$/a\\\n"
|
|
|
|
"\\\n"
|
|
|
|
"/* macro to test for symbolic link */\\\n"
|
|
|
|
"#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)\\\n"
|
|
|
|
"\n";
|
|
|
|
sed = "/^[ \t]*fstat(),$/a\\\n"
|
|
|
|
"\tlstat(),\n";
|
|
|
|
test_text =
|
|
|
|
"@(#)stat.h 6.1 (ULTRIX)\n"
|
|
|
|
"#define S_IFPORT S_IFIFO\n"
|
|
|
|
"\tfstat(),\n";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Check for superfluous `static' (in Ultrix 4.2)
|
|
|
|
* On Ultrix 4.3, includes of other files (r3_cpu.h,r4_cpu.h) is broken.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = ultrix_static;
|
|
|
|
files = machine/cpu.h;
|
|
|
|
select = '#include "r[34]_cpu';
|
|
|
|
sed = "s/^static struct tlb_pid_state/struct tlb_pid_state/";
|
|
|
|
sed = 's/^#include "r3_cpu\.h"$/#include <machine\/r3_cpu\.h>/';
|
|
|
|
sed = 's/^#include "r4_cpu\.h"$/#include <machine\/r4_cpu\.h>/';
|
2000-06-06 01:44:07 +08:00
|
|
|
test_text =
|
|
|
|
"static struct tlb_pid_state {\n"
|
|
|
|
"#include \"r3_cpu.h\"\n";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Add once-only latch to Ultrix V4.3 strings.h.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = ultrix_strings;
|
|
|
|
files = strings.h;
|
|
|
|
select = "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)";
|
|
|
|
c_fix = wrap;
|
|
|
|
test_text =
|
|
|
|
"@(#)strings.h 6.1 (ULTRIX)\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
2000-05-15 05:20:33 +08:00
|
|
|
* Fix multiple defines for NULL. Sometimes, we stumble into \r\n
|
|
|
|
* terminated lines, so accommodate these. Test both ways.
|
1998-10-16 15:00:18 +08:00
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-15 05:20:33 +08:00
|
|
|
hackname = undefine_null;
|
|
|
|
select = "^#[ \t]*define[ \t]+NULL[ \t]";
|
|
|
|
bypass = "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef NULL%2\n#define NULL%1%2\n#endif%2\n";
|
|
|
|
c_fix_arg = "^#[ \t]*define[ \t]*[ \t]NULL([^\r\n]+)([\r]*)\n";
|
|
|
|
|
|
|
|
test_text = "#define NULL 0UL\r\n#define NULL\t((void*)0)\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-11-15 22:47:53 +08:00
|
|
|
/*
|
|
|
|
* If arpa/inet.h prototypes are incompatible with the ones we just
|
|
|
|
* installed in <sys/byteorder.h>, just remove the protos.
|
|
|
|
* Because of this close association, this patch must be applied only
|
|
|
|
* on those systems where the replacement byteorder header is installed.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-07-13 22:47:55 +08:00
|
|
|
hackname = uw7_byteorder_fix;
|
1999-11-15 22:47:53 +08:00
|
|
|
files = arpa/inet.h;
|
|
|
|
select = "in_port_t";
|
2000-07-13 22:47:55 +08:00
|
|
|
test = "-f $DESTDIR/sys/byteorder.h";
|
1999-11-15 22:47:53 +08:00
|
|
|
#ifndef SVR5
|
|
|
|
mach = "*-*-sysv4*";
|
2000-05-31 04:24:44 +08:00
|
|
|
mach = "i?86-*-sysv5*";
|
|
|
|
mach = "i?86-*-udk*";
|
|
|
|
mach = "i?86-*-solaris2.[0-4]";
|
1999-11-15 22:47:53 +08:00
|
|
|
mach = "powerpcle-*-solaris2.[0-4]";
|
|
|
|
mach = "sparc-*-solaris2.[0-4]";
|
|
|
|
#endif /* SVR5 */
|
2000-07-13 22:47:55 +08:00
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "";
|
|
|
|
c_fix_arg = "^extern.*(htons|ntohs).*\\(in_port_t\\).*\n";
|
|
|
|
|
|
|
|
test_text = "extern htons(in_port_t);"
|
|
|
|
"`[ ! -d $DESTDIR/sys ] && mkdir $DESTDIR/sys\n"
|
|
|
|
"echo '/* DUMMY */' >> sys/byteorder.h\n"
|
|
|
|
"touch $DESTDIR/sys/byteorder.h`";
|
1999-11-15 22:47:53 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1998-10-16 15:00:18 +08:00
|
|
|
/*
|
|
|
|
* Fix definitions of macros used by va-i960.h in VxWorks header file.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-31 22:26:57 +08:00
|
|
|
hackname = va_i960_macro;
|
|
|
|
files = arch/i960/archI960.h;
|
|
|
|
select = "__(vsiz|vali|vpad|alignof__)";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "__vx%1";
|
|
|
|
|
|
|
|
test_text =
|
|
|
|
"extern int __vsiz vsiz;\n"
|
|
|
|
"extern int __vali vali;\n"
|
|
|
|
"extern int __vpad vpad;\n"
|
|
|
|
"#define __alignof__(x) ...";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* AIX headers define NULL to be cast to a void pointer,
|
|
|
|
* which is illegal in ANSI C++.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-31 22:26:57 +08:00
|
|
|
hackname = void_null;
|
|
|
|
files = curses.h;
|
|
|
|
files = dbm.h;
|
|
|
|
files = locale.h;
|
|
|
|
files = stdio.h;
|
|
|
|
files = stdlib.h;
|
|
|
|
files = string.h;
|
|
|
|
files = time.h;
|
|
|
|
files = unistd.h;
|
|
|
|
files = sys/dir.h;
|
|
|
|
files = sys/param.h;
|
|
|
|
files = sys/types.h;
|
|
|
|
select = "^#[ \t]*define[ \t]+NULL[ \t]+\\(\\(void[ \t]*\\*\\)0\\)";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#define NULL 0";
|
|
|
|
test_text = "# define\tNULL \t((void *)0) /* typed NULL */";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Make VxWorks header which is almost gcc ready fully gcc ready.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = vxworks_gcc_problem;
|
|
|
|
files = types/vxTypesBase.h;
|
|
|
|
select = "__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__";
|
|
|
|
|
|
|
|
sed = "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/"
|
|
|
|
"#if 1/";
|
|
|
|
|
|
|
|
sed = "/[ \t]size_t/i\\\n"
|
|
|
|
"#ifndef _GCC_SIZE_T\\\n"
|
|
|
|
"#define _GCC_SIZE_T\n";
|
|
|
|
|
|
|
|
sed = "/[ \t]size_t/a\\\n"
|
|
|
|
"#endif\n";
|
|
|
|
|
|
|
|
sed = "/[ \t]ptrdiff_t/i\\\n"
|
|
|
|
"#ifndef _GCC_PTRDIFF_T\\\n"
|
|
|
|
"#define _GCC_PTRDIFF_T\n";
|
|
|
|
|
|
|
|
sed = "/[ \t]ptrdiff_t/a\\\n"
|
|
|
|
"#endif\n";
|
|
|
|
|
|
|
|
sed = "/[ \t]wchar_t/i\\\n"
|
|
|
|
"#ifndef _GCC_WCHAR_T\\\n"
|
|
|
|
"#define _GCC_WCHAR_T\n";
|
|
|
|
|
|
|
|
sed = "/[ \t]wchar_t/a\\\n"
|
|
|
|
"#endif\n";
|
2000-05-31 22:26:57 +08:00
|
|
|
|
|
|
|
test_text =
|
|
|
|
"#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__\n"
|
|
|
|
"typedef unsigned int size_t;\n"
|
|
|
|
"typedef long ptrdiff_t;\n"
|
|
|
|
"typedef unsigned short wchar_t;\n"
|
|
|
|
"#endif /* __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__ */\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix VxWorks <time.h> to not require including <vxTypes.h>.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-05-31 22:26:57 +08:00
|
|
|
hackname = vxworks_needs_vxtypes;
|
|
|
|
files = time.h;
|
|
|
|
select = "uint_t([ \t]+_clocks_per_sec)";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "unsigned int%1";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "uint_t\t_clocks_per_sec;";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Fix VxWorks <sys/stat.h> to not require including <vxWorks.h>.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = vxworks_needs_vxworks;
|
|
|
|
files = sys/stat.h;
|
1999-03-31 20:02:19 +08:00
|
|
|
test = " -r types/vxTypesOld.h";
|
|
|
|
test = " -n \"`egrep '#include' $file`\"";
|
|
|
|
test = " -n \"`egrep ULONG $file`\"";
|
2000-05-31 22:26:57 +08:00
|
|
|
select = "#[ \t]define[ \t]+__INCstath";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
|
|
|
sed = "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n"
|
|
|
|
"#include <types/vxTypesOld.h>\n";
|
2000-05-31 22:26:57 +08:00
|
|
|
|
|
|
|
test_text = "`touch types/vxTypesOld.h`"
|
|
|
|
"#include </dev/null> /* ULONG */\n"
|
|
|
|
"# define\t__INCstath <sys/stat.h>";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Another bad dependency in VxWorks 5.2 <time.h>.
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = vxworks_time;
|
|
|
|
files = time.h;
|
1999-03-31 20:02:19 +08:00
|
|
|
test = " -r vxWorks.h";
|
1998-10-16 15:00:18 +08:00
|
|
|
|
2000-05-31 22:26:57 +08:00
|
|
|
select = "#[ \t]*define[ \t]+VOIDFUNCPTR[ \t].*";
|
|
|
|
c_fix = format;
|
|
|
|
|
|
|
|
c_fix_arg =
|
|
|
|
"#ifndef __gcc_VOIDFUNCPTR_defined\n"
|
|
|
|
"#ifdef __cplusplus\n"
|
|
|
|
"typedef void (*__gcc_VOIDFUNCPTR) (...);\n"
|
|
|
|
"#else\n"
|
|
|
|
"typedef void (*__gcc_VOIDFUNCPTR) ();\n"
|
|
|
|
"#endif\n"
|
|
|
|
"#define __gcc_VOIDFUNCPTR_defined\n"
|
|
|
|
"#endif\n"
|
|
|
|
"#define VOIDFUNCPTR __gcc_VOIDFUNCPTR";
|
|
|
|
|
|
|
|
test_text = "`touch vxWorks.h`"
|
|
|
|
"#define VOIDFUNCPTR (void(*)())";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* There are several name conflicts with C++ reserved words in X11 header
|
|
|
|
* files. These are fixed in some versions, so don't do the fixes if
|
|
|
|
* we find __cplusplus in the file. These were found on the RS/6000.
|
|
|
|
*/
|
|
|
|
fix = {
|
2000-06-18 03:43:21 +08:00
|
|
|
hackname = x11_class;
|
|
|
|
files = X11/ShellP.h;
|
|
|
|
bypass = __cplusplus;
|
|
|
|
select = "^([ \t]*char \\*)class;(.*)";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifdef __cplusplus\n%1c_class;%2\n"
|
|
|
|
"#else\n%1class;%2\n#endif";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text =
|
|
|
|
"struct {\n"
|
|
|
|
" char *class;\n"
|
|
|
|
"} mumble;\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* class in Xm/BaseClassI.h
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = x11_class_usage;
|
|
|
|
files = Xm/BaseClassI.h;
|
|
|
|
bypass = "__cplusplus";
|
2000-05-31 22:26:57 +08:00
|
|
|
|
|
|
|
select = " class\\)";
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = " c_class)";
|
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "extern mumble (int class);\n";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* new in Xm/Traversal.h
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = x11_new;
|
|
|
|
files = Xm/Traversal.h;
|
|
|
|
bypass = __cplusplus;
|
|
|
|
|
|
|
|
sed = "/Widget\told, new;/i\\\n"
|
|
|
|
"#ifdef __cplusplus\\\n"
|
|
|
|
"\tWidget\told, c_new;\\\n"
|
|
|
|
"#else\n";
|
|
|
|
|
|
|
|
sed = "/Widget\told, new;/a\\\n"
|
|
|
|
"#endif\n";
|
|
|
|
|
|
|
|
sed = "s/Widget new,/Widget c_new,/g";
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text =
|
|
|
|
"struct wedge {\n"
|
|
|
|
" Widget\told, new; /* fix the new */\n"
|
|
|
|
"};\nextern Wedged( Widget new, Widget old );";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Incorrect sprintf declaration in X11/Xmu.h
|
|
|
|
*/
|
|
|
|
fix = {
|
|
|
|
hackname = x11_sprintf;
|
2000-01-18 05:45:29 +08:00
|
|
|
files = X11/Xmu.h;
|
|
|
|
files = X11/Xmu/Xmu.h;
|
2000-05-31 22:26:57 +08:00
|
|
|
select = "^extern char \\*\tsprintf\\(\\);$";
|
|
|
|
|
|
|
|
c_fix = format;
|
|
|
|
c_fix_arg = "#ifndef __STDC__\n%0\n#endif /* !defined __STDC__ */";
|
2000-01-18 05:45:29 +08:00
|
|
|
|
2000-05-10 00:21:08 +08:00
|
|
|
test_text = "extern char *\tsprintf();";
|
1998-10-16 15:00:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/*EOF*/
|