mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-05 13:51:57 +08:00
reorganize inclhacks and apply fix to fixtests.c
From-SVN: r42663
This commit is contained in:
parent
f71aebba8e
commit
7b78a14a37
@ -1,3 +1,19 @@
|
||||
2001-05-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* fixinc/fixtests.c: Declare entries in ENV_TABLE.
|
||||
|
||||
2001-05-27 Bruce Korb <bkorb@gnu.org>
|
||||
|
||||
* fixinc/check.tpl(HACK) add and use a Scheme variable
|
||||
(has no test text): error out if no "test_text" is defined
|
||||
* fixinc/fixincl.tpl: likewise
|
||||
(FIXIDX): make it an enumeration so we minimize diffs
|
||||
* fixinc/inclhack.def: re-alphabetize and add sort instructions
|
||||
* fixinc/fixincl.x: regenerate
|
||||
* fixinc/tests/base/stdio.h: test output got moved due to
|
||||
the alphabetizing
|
||||
* README-fixinc: rewrite (mostly)
|
||||
|
||||
2001-05-27 Neil Booth <neil@daikokuya.demon.co.uk>
|
||||
|
||||
* cpplib.c (run_directive): Set pfile->directive.
|
||||
|
@ -1,9 +1,14 @@
|
||||
This README file is copied into the directory for GCC-only header files
|
||||
when fixincludes is run by the makefile for GCC.
|
||||
|
||||
Many of the files in this directory were made from the standard system
|
||||
header files of this system by the shell script `fixincludes'.
|
||||
They are system-specific, and will not work on any other kind of system.
|
||||
They are also not part of GCC. The reason for making the files here
|
||||
is to fix the places in the header files which use constructs
|
||||
that are incompatible with ANSI C.
|
||||
Many of the files in this directory were automatically edited from the
|
||||
standard system header files by the fixincludes process. They are
|
||||
system-specific, and will not work on any other kind of system. They
|
||||
are also not part of GCC. The reason we have to do this is because
|
||||
GCC requires ANSI C headers and many vendors supply ANSI-incompatible
|
||||
headers.
|
||||
|
||||
Because this is an automated process, sometimes headers get "fixed"
|
||||
that do not, strictly speaking, need a fix. As long as nothing is broken
|
||||
by the process, it is just an unfortunate collateral inconvenience.
|
||||
We would like to rectify it, if it is not "too inconvenient".
|
||||
|
@ -40,12 +40,13 @@ mkdir ${DESTDIR} ${SRCDIR}
|
||||
cd inc
|
||||
[=
|
||||
(define sfile "")
|
||||
(define HACK "")
|
||||
(define dfile "") =][=
|
||||
|
||||
FOR fix =][=
|
||||
|
||||
IF (> (count "test_text") 1) =][=
|
||||
|
||||
(set! HACK (string-upcase! (get "hackname")))
|
||||
(set! sfile (if (exist? "files") (get "files[]") "testing.h"))
|
||||
(set! dfile (string-append
|
||||
(if (*==* sfile "/")
|
||||
@ -58,9 +59,9 @@ FOR fix =][=
|
||||
cat >> [=(. sfile)=] <<_HACK_EOF_
|
||||
|
||||
|
||||
#if defined( [=(string-upcase! (get "hackname"))=]_CHECK_[=(for-index)=] )
|
||||
#if defined( [=(. HACK)=]_CHECK_[=(for-index)=] )
|
||||
[=test_text=]
|
||||
#endif /* [=(string-upcase! (get "hackname"))=]_CHECK_[=(for-index)=] */
|
||||
#endif /* [=(. HACK)=]_CHECK_[=(for-index)=] */
|
||||
_HACK_EOF_
|
||||
echo [=(. sfile)=] | ../../fixincl
|
||||
mv -f [=(. sfile)=] [=(. dfile)=]-[=(for-index)=].h
|
||||
@ -75,17 +76,15 @@ ENDFOR fix
|
||||
|
||||
=][=
|
||||
|
||||
FOR fix =][=
|
||||
FOR fix =][=
|
||||
(set! HACK (string-upcase! (get "hackname"))) =][=
|
||||
|
||||
IF (not (exist? "test_text")) =][=
|
||||
IF (not (exist? "replace")) =]
|
||||
echo No test for [=hackname=] in inc/[=
|
||||
IF (exist? "files") =][=
|
||||
files[0] =][=
|
||||
ELSE =]testing.h[=
|
||||
ENDIF =][=
|
||||
ENDIF =][=
|
||||
ELSE =]
|
||||
(if (not (exist? "replace"))
|
||||
(error (sprintf "include fix '%s' has no test text"
|
||||
(get "hackname") )) )
|
||||
=][=
|
||||
ELSE =]
|
||||
cat >> [=
|
||||
IF (exist? "files") =][=
|
||||
files[0] =][=
|
||||
@ -93,9 +92,9 @@ cat >> [=
|
||||
ENDIF =] <<_HACK_EOF_
|
||||
|
||||
|
||||
#if defined( [=(string-upcase! (get "hackname"))=]_CHECK )
|
||||
#if defined( [=(. HACK)=]_CHECK )
|
||||
[=test_text=]
|
||||
#endif /* [=(string-upcase! (get "hackname"))=]_CHECK */
|
||||
#endif /* [=(. HACK)=]_CHECK */
|
||||
_HACK_EOF_
|
||||
[=ENDIF =][=
|
||||
|
||||
@ -103,7 +102,7 @@ ENDFOR fix
|
||||
|
||||
=]
|
||||
|
||||
find . -type f | sed 's;\./;;' | sort | ../../fixincl
|
||||
find . -type f | sed 's;^\./;;' | sort | ../../fixincl
|
||||
cd ${DESTDIR}
|
||||
|
||||
exitok=true
|
||||
|
@ -30,14 +30,6 @@ Here are the rules:
|
||||
This may be useful, for example, if there are interesting strings
|
||||
or pre-compiled regular expressions stored there.
|
||||
|
||||
It is also possible to access fix descriptions by using the
|
||||
index of a known fix, "my_fix_name" for example:
|
||||
|
||||
tFixDesc* p_desc = fixDescList + MY_FIX_NAME_FIXIDX;
|
||||
tTestDesc* p_tlist = p_desc->p_test_desc;
|
||||
|
||||
regexec (p_tlist->p_test_regex, ...)
|
||||
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -26,6 +26,8 @@ FOR fix =]
|
||||
* Description of [=
|
||||
(set! Hack (string-capitalize! (get "hackname")))
|
||||
(set! HACK (string-upcase! (get "hackname")))
|
||||
(if (and (not (exist? "test_text")) (not (exist? "replace")))
|
||||
(error (sprintf "include fix '%s' has no test text" Hack )) )
|
||||
(. Hack)=] fix
|
||||
*/[=
|
||||
|
||||
@ -33,7 +35,6 @@ FOR fix =]
|
||||
some C fix wishes to refer to the regexps it is paired with.
|
||||
See commentary at the top of fixfixes.c.
|
||||
=]
|
||||
#define [=(sprintf "%-32s" (string-append HACK "_FIXIDX"))=] [=(for-index)=]
|
||||
tSCC z[=(. Hack)=]Name[] =
|
||||
"[=hackname=]";
|
||||
|
||||
@ -181,6 +182,18 @@ static const char* apz[=(. Hack)=]Patch[] = {[=
|
||||
#define MACH_LIST_SIZE_LIMIT [= (+ 128 max-mach) =]
|
||||
#define FIX_COUNT [= (count "fix") =]
|
||||
|
||||
/*
|
||||
* Enumerate the fixes[= # in a way that minimizes diffs :-) =]
|
||||
*/
|
||||
typedef enum {[=
|
||||
|
||||
FOR fix "," =]
|
||||
[=(string-upcase! (get "hackname"))=]_FIXIDX[=
|
||||
ENDFOR
|
||||
|
||||
=]
|
||||
} t_fixinc_idx;
|
||||
|
||||
tFixDesc fixDescList[ FIX_COUNT ] = {[=
|
||||
|
||||
|
||||
|
1218
gcc/fixinc/fixincl.x
1218
gcc/fixinc/fixincl.x
File diff suppressed because it is too large
Load Diff
@ -47,6 +47,10 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "fixlib.h"
|
||||
|
||||
#define _ENV_(v,m,n,t) extern tCC* v;
|
||||
ENV_TABLE
|
||||
#undef _ENV_
|
||||
|
||||
typedef apply_fix_p_t t_test_proc PARAMS(( tCC* file, tCC* text ));
|
||||
|
||||
typedef struct {
|
||||
|
@ -6,6 +6,15 @@ autogen definitions fixincl;
|
||||
/* Define all the fixes we know about for repairing damaged headers.
|
||||
Please see the README before adding or changing entries in this file.
|
||||
|
||||
This is the sort command:
|
||||
|
||||
blocksort output=XXX \
|
||||
pattern='^/\*$' \
|
||||
start='DO +NOT +DO +BROKEN +FIXES' \
|
||||
trailer='^/\*EOF\*[/]' \
|
||||
input=inclhack.def \
|
||||
key='hackname[ ]*=[ ]*(.*);'
|
||||
|
||||
Set up a debug test so we can make the templates emit special
|
||||
code while debugging these fixes: */
|
||||
|
||||
@ -16,12 +25,15 @@ FIXINC_DEBUG = yes;
|
||||
/* DO NOT DO BROKEN FIXES (empty replacement fixes) */
|
||||
|
||||
/*
|
||||
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
||||
* 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_ki_iface;
|
||||
files = sys/ki_iface.h;
|
||||
select = 'These definitions are for HP Internal developers';
|
||||
hackname = AAA_bad_fixes;
|
||||
files = sundev/ipi_error.h;
|
||||
/* shouldn't there be a select expression here??? */
|
||||
replace; /* empty replacement -> no fixing the file */
|
||||
};
|
||||
|
||||
@ -59,6 +71,17 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
||||
*/
|
||||
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 */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Tru64 UNIX V4.0F/V5.1 <standards.h> defines _NO_PROTO and _NONSTD_TYPES
|
||||
* correctly for GCC, but strict_ansi_not breaks it.
|
||||
@ -71,20 +94,6 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* 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 */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Purge some HP-UX 11 files that are only broken after they are "fixed".
|
||||
*/
|
||||
@ -332,6 +341,29 @@ extern int memcmp();
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
/*
|
||||
* Completely replace <sys/byteorder.h>; with a file that implements gcc's
|
||||
* optimized byteswapping. Restricted to "SVR4" machines until either
|
||||
@ -495,29 +527,6 @@ ntohs (unsigned int __arg)
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
/*
|
||||
* Cancel out ansi_compat.h on Ultrix. Replace it with an empty file.
|
||||
*/
|
||||
@ -1082,6 +1091,27 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix these files to use the same types that we think they should.
|
||||
*/
|
||||
fix = {
|
||||
hackname = gnu_types;
|
||||
files = "sys/types.h";
|
||||
files = "stdlib.h";
|
||||
files = "sys/stdtypes.h";
|
||||
files = "stddef.h";
|
||||
files = "memory.h";
|
||||
files = "unistd.h";
|
||||
bypass = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
|
||||
select = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
|
||||
c_fix = gnu_type;
|
||||
|
||||
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 */";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix HP & Sony's use of "../machine/xxx.h"
|
||||
* to refer to: <machine/xxx.h>
|
||||
@ -1139,7 +1169,7 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition
|
||||
* 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
|
||||
@ -1147,7 +1177,7 @@ fix = {
|
||||
* 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
|
||||
* 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
|
||||
@ -1183,6 +1213,41 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
|
||||
*/
|
||||
fix = {
|
||||
hackname = hpux_maxint;
|
||||
files = sys/param.h;
|
||||
files = values.h;
|
||||
select = "^#[ \t]*define[ \t]+MAXINT[ \t]";
|
||||
bypass = "^#[ \t]*ifndef[ \t]+MAXINT";
|
||||
test =
|
||||
"-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "#ifndef MAXINT\n%0\n#endif";
|
||||
c_fix_arg = "^#[ \t]*define[ \t]+MAXINT[ \t].*";
|
||||
|
||||
test_text = '#define MAXINT 0x7FFFFFFF';
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
|
||||
*/
|
||||
fix = {
|
||||
hackname = hpux_systime;
|
||||
files = sys/time.h;
|
||||
select = "^extern struct sigevent;";
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "struct sigevent;";
|
||||
|
||||
test_text = 'extern struct sigevent;';
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix return type of abort and free
|
||||
*/
|
||||
@ -1200,30 +1265,6 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
* impossible to compile any nontrivial program except with -posix.
|
||||
*/
|
||||
fix = {
|
||||
hackname = isc_omits_with_stdc;
|
||||
|
||||
files = "stdio.h";
|
||||
files = "math.h";
|
||||
files = "ctype.h";
|
||||
files = "sys/limits.h";
|
||||
files = "sys/fcntl.h";
|
||||
files = "sys/dirent.h";
|
||||
|
||||
select = '!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)';
|
||||
c_fix = format;
|
||||
c_fix_arg = '!defined(_POSIX_SOURCE)';
|
||||
test_text = "#if !defined(__STDC__) && !defined(_POSIX_SOURCE) /* ? ! */"
|
||||
"\nint foo;\n#endif";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix various macros used to define ioctl numbers.
|
||||
* The traditional syntax was:
|
||||
@ -1266,41 +1307,6 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
|
||||
*/
|
||||
fix = {
|
||||
hackname = hpux_maxint;
|
||||
files = sys/param.h;
|
||||
files = values.h;
|
||||
select = "^#[ \t]*define[ \t]+MAXINT[ \t]";
|
||||
bypass = "^#[ \t]*ifndef[ \t]+MAXINT";
|
||||
test =
|
||||
"-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "#ifndef MAXINT\n%0\n#endif";
|
||||
c_fix_arg = "^#[ \t]*define[ \t]+MAXINT[ \t].*";
|
||||
|
||||
test_text = '#define MAXINT 0x7FFFFFFF';
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix hpux10.20 <sys/time.h> to avoid invalid forward decl
|
||||
*/
|
||||
fix = {
|
||||
hackname = hpux_systime;
|
||||
files = sys/time.h;
|
||||
select = "^extern struct sigevent;";
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "struct sigevent;";
|
||||
|
||||
test_text = 'extern struct sigevent;';
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Check for missing ';' in struct
|
||||
*/
|
||||
@ -1335,9 +1341,22 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Non-traditional "const" declaration in Irix's limits.h.
|
||||
*/
|
||||
fix = {
|
||||
hackname = irix_limits_const;
|
||||
files = fixinc-test-limits.h, limits.h;
|
||||
select = "^extern const ";
|
||||
c_fix = format;
|
||||
c_fix_arg = "extern __const ";
|
||||
test_text = "extern const char limit; /* test limits */";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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;
|
||||
@ -1351,19 +1370,6 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Non-traditional "const" declaration in Irix's limits.h.
|
||||
*/
|
||||
fix = {
|
||||
hackname = irix_limits_const;
|
||||
files = fixinc-test-limits.h, limits.h;
|
||||
select = "^extern const ";
|
||||
c_fix = format;
|
||||
c_fix_arg = "extern __const ";
|
||||
test_text = "extern const char limit; /* test limits */";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fixing ISC fmod declaration
|
||||
*/
|
||||
@ -1377,6 +1383,30 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
* impossible to compile any nontrivial program except with -posix.
|
||||
*/
|
||||
fix = {
|
||||
hackname = isc_omits_with_stdc;
|
||||
|
||||
files = "stdio.h";
|
||||
files = "math.h";
|
||||
files = "ctype.h";
|
||||
files = "sys/limits.h";
|
||||
files = "sys/fcntl.h";
|
||||
files = "sys/dirent.h";
|
||||
|
||||
select = '!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)';
|
||||
c_fix = format;
|
||||
c_fix_arg = '!defined(_POSIX_SOURCE)';
|
||||
test_text = "#if !defined(__STDC__) && !defined(_POSIX_SOURCE) /* ? ! */"
|
||||
"\nint foo;\n#endif";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* These files in Sun OS 4.x and ARM/RISCiX and BSD4.3
|
||||
* use / * * / to concatenate tokens.
|
||||
@ -1556,7 +1586,7 @@ fix = {
|
||||
|
||||
/*
|
||||
* Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_.
|
||||
*
|
||||
*
|
||||
* On NetBSD, machine is a symbolic link to an architecture specific
|
||||
* directory name, so we can't match a specific file name here.
|
||||
*/
|
||||
@ -1670,6 +1700,19 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* nested comment
|
||||
*/
|
||||
fix = {
|
||||
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 */";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix nested comments in Motorola's <limits.h> and <sys/limits.h>
|
||||
*/
|
||||
@ -1705,19 +1748,6 @@ fix = {
|
||||
"#define OPEN_MAX 20 /* Max, Max, ... */\n";
|
||||
};
|
||||
|
||||
/*
|
||||
* nested comment
|
||||
*/
|
||||
fix = {
|
||||
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 */";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* fix bogus recursive stdlib.h in NEWS-OS 4.0C
|
||||
*/
|
||||
@ -1888,7 +1918,7 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* function class(double x) conflicts with C++ keyword on rs/6000
|
||||
* function class(double x) conflicts with C++ keyword on rs/6000
|
||||
*/
|
||||
fix = {
|
||||
hackname = rs6000_double;
|
||||
@ -1917,7 +1947,7 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* parameters conflict with C++ new on rs/6000
|
||||
* parameters conflict with C++ new on rs/6000
|
||||
*/
|
||||
fix = {
|
||||
hackname = rs6000_param;
|
||||
@ -1933,7 +1963,7 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* The static functions lstat() and fchmod() in <sys/stat.h>
|
||||
* 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
|
||||
@ -1971,71 +2001,6 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* "!__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_test = stdc_0_in_system_headers;
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
|
||||
|
||||
test_text = "#if !__STDC__ \n"
|
||||
"#if __STDC__ == 0\n"
|
||||
"#if __STDC__ != 1\n"
|
||||
"#if __STDC__ - 0 == 0"
|
||||
"/* not std C */\nint foo;\n"
|
||||
"\n#end-end-end-end-if :-)";
|
||||
};
|
||||
|
||||
/*
|
||||
* "__STDC__-0==0"
|
||||
* is "!defined( __STRICT_ANSI__ )" on continued #if-s
|
||||
*/
|
||||
fix = {
|
||||
hackname = strict_ansi_not_ctd;
|
||||
files = math.h, limits.h, stdio.h, signal.h, stdlib.h, time.h;
|
||||
select = "^([ \t]*[|&][|&][ \t(]*)"
|
||||
"(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
|
||||
")(.*)";
|
||||
c_test = stdc_0_in_system_headers;
|
||||
|
||||
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_test = stdc_0_in_system_headers;
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "%1 defined(__STRICT_ANSI__)%3";
|
||||
|
||||
test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix prototype declaration of utime in sys/times.h.
|
||||
* In 3.2v4.0 the const is missing.
|
||||
@ -2187,6 +2152,71 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* "!__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_test = stdc_0_in_system_headers;
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "%1 !defined(__STRICT_ANSI__)%3";
|
||||
|
||||
test_text = "#if !__STDC__ \n"
|
||||
"#if __STDC__ == 0\n"
|
||||
"#if __STDC__ != 1\n"
|
||||
"#if __STDC__ - 0 == 0"
|
||||
"/* not std C */\nint foo;\n"
|
||||
"\n#end-end-end-end-if :-)";
|
||||
};
|
||||
|
||||
/*
|
||||
* "__STDC__-0==0"
|
||||
* is "!defined( __STRICT_ANSI__ )" on continued #if-s
|
||||
*/
|
||||
fix = {
|
||||
hackname = strict_ansi_not_ctd;
|
||||
files = math.h, limits.h, stdio.h, signal.h, stdlib.h, time.h;
|
||||
select = "^([ \t]*[|&][|&][ \t(]*)"
|
||||
"(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0"
|
||||
")(.*)";
|
||||
c_test = stdc_0_in_system_headers;
|
||||
|
||||
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_test = stdc_0_in_system_headers;
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "%1 defined(__STRICT_ANSI__)%3";
|
||||
|
||||
test_text = "#if __STDC__ == 1 /* is std C\n */\nint foo;\n#endif";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s
|
||||
* in prototype without previous definition.
|
||||
@ -2688,7 +2718,7 @@ fix = {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Like svr4_mach_defines, but with newfangled syntax.
|
||||
* Source lines are of #define __i386 #machine(i386). Delete them.
|
||||
*/
|
||||
@ -2702,27 +2732,6 @@ fix = {
|
||||
#endif /* SVR5 */
|
||||
|
||||
|
||||
/*
|
||||
* Fix these files to use the same types that we think they should.
|
||||
*/
|
||||
fix = {
|
||||
hackname = gnu_types;
|
||||
files = "sys/types.h";
|
||||
files = "stdlib.h";
|
||||
files = "sys/stdtypes.h";
|
||||
files = "stddef.h";
|
||||
files = "memory.h";
|
||||
files = "unistd.h";
|
||||
bypass = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
|
||||
select = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
|
||||
c_fix = gnu_type;
|
||||
|
||||
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 */";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
|
||||
* in string.h on sysV68
|
||||
|
@ -19,6 +19,11 @@ extern int getopt(int, char *const[], const char *);
|
||||
#endif /* ALPHA_GETOPT_CHECK */
|
||||
|
||||
|
||||
#if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK )
|
||||
extern int printf( const char *, __gnuc_va_list );
|
||||
#endif /* IRIX_STDIO_DUMMY_VA_LIST_CHECK */
|
||||
|
||||
|
||||
#if defined( ISC_OMITS_WITH_STDC_CHECK )
|
||||
#if !defined(_POSIX_SOURCE) /* ? ! */
|
||||
int foo;
|
||||
@ -26,11 +31,6 @@ int foo;
|
||||
#endif /* ISC_OMITS_WITH_STDC_CHECK */
|
||||
|
||||
|
||||
#if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK )
|
||||
extern int printf( const char *, __gnuc_va_list );
|
||||
#endif /* IRIX_STDIO_DUMMY_VA_LIST_CHECK */
|
||||
|
||||
|
||||
#if defined( READ_RET_TYPE_CHECK )
|
||||
extern unsigned int fread(), fwrite();
|
||||
extern int fclose(), fflush(), foo();
|
||||
|
Loading…
Reference in New Issue
Block a user