aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>2004-01-23 20:40:52 +0000
committerRainer Orth <ro@gcc.gnu.org>2004-01-23 20:40:52 +0000
commitf6c930a38a5633c4880f572feaddfce14b45951b (patch)
treefe9c6882bca9064f4e6acd558827b753e9cc8d42 /gcc/fixinc
parent30cab86985cd901aee1ec78580b3a6f912c624db (diff)
downloadgcc-f6c930a38a5633c4880f572feaddfce14b45951b.zip
gcc-f6c930a38a5633c4880f572feaddfce14b45951b.tar.gz
gcc-f6c930a38a5633c4880f572feaddfce14b45951b.tar.bz2
inclhack.def (bad_lval): Renamed to ...
* fixinc/inclhack.def (bad_lval): Renamed to ... (alpha_bad_lval): ... this. Removed file list. Restrict to alpha*-dec-osf*. * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/dirent.h: Remove, moving test ... * fixinc/tests/base/testing.h: ... here, reflecting new name. From-SVN: r76450
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixincl.x85
-rw-r--r--gcc/fixinc/inclhack.def87
-rw-r--r--gcc/fixinc/tests/base/dirent.h16
-rw-r--r--gcc/fixinc/tests/base/testing.h7
4 files changed, 81 insertions, 114 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index f0cecc2..620c934 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Wednesday January 21, 2004 at 03:05:26 PM EST
+ * It has been AutoGen-ed Thursday January 22, 2004 at 08:36:55 PM MET
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jan 21 15:05:26 EST 2004
+/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jan 22 20:36:56 MET 2004
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -866,6 +866,41 @@ static const char* apzAlpha_AssertPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Alpha_Bad_Lval fix
+ */
+tSCC zAlpha_Bad_LvalName[] =
+ "alpha_bad_lval";
+
+/*
+ * File name selection pattern
+ */
+#define zAlpha_Bad_LvalList (char*)NULL
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAlpha_Bad_LvalMachs[] = {
+ "alpha*-dec-osf*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAlpha_Bad_LvalSelect0[] =
+ "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix";
+
+#define ALPHA_BAD_LVAL_TEST_CT 1
+static tTestDesc aAlpha_Bad_LvalTests[] = {
+ { TT_EGREP, zAlpha_Bad_LvalSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Alpha_Bad_Lval
+ */
+static const char* apzAlpha_Bad_LvalPatch[] = { "sed",
+ "-e", "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Alpha_Getopt fix
*/
tSCC zAlpha_GetoptName[] =
@@ -1225,40 +1260,6 @@ static const char* apzAvoid_Wchar_T_TypePatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Bad_Lval fix
- */
-tSCC zBad_LvalName[] =
- "bad_lval";
-
-/*
- * File name selection pattern
- */
-tSCC zBad_LvalList[] =
- "|dirent.h|ftw.h|grp.h|libgen.h|ndbm.h|pthread.h|pwd.h|signal.h|standards.h|stdio.h|stdlib.h|string.h|stropts.h|sys/mount.h|sys/resource.h|sys/signal.h|sys/socket.h|sys/stat.h|sys/stropts.h|sys/uio.h|time.h|unistd.h|utmp.h|utmpx.h|wchar.h|";
-/*
- * Machine/OS name selection pattern
- */
-#define apzBad_LvalMachs (const char**)NULL
-
-/*
- * content selection pattern - do fix if pattern found
- */
-tSCC zBad_LvalSelect0[] =
- "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix";
-
-#define BAD_LVAL_TEST_CT 1
-static tTestDesc aBad_LvalTests[] = {
- { TT_EGREP, zBad_LvalSelect0, (regex_t*)NULL }, };
-
-/*
- * Fix Command Arguments for Bad_Lval
- */
-static const char* apzBad_LvalPatch[] = { "sed",
- "-e", "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Bad_Struct_Term fix
*/
tSCC zBad_Struct_TermName[] =
@@ -6847,6 +6848,7 @@ typedef enum {
ALPHA___EXTERN_PREFIX_STANDARDS_FIXIDX,
ALPHA___EXTERN_PREFIX_SYS_STAT_FIXIDX,
ALPHA_ASSERT_FIXIDX,
+ ALPHA_BAD_LVAL_FIXIDX,
ALPHA_GETOPT_FIXIDX,
ALPHA_PARENS_FIXIDX,
ALPHA_PTHREAD_FIXIDX,
@@ -6856,7 +6858,6 @@ typedef enum {
AVOID_BOOL_DEFINE_FIXIDX,
AVOID_BOOL_TYPE_FIXIDX,
AVOID_WCHAR_T_TYPE_FIXIDX,
- BAD_LVAL_FIXIDX,
BAD_STRUCT_TERM_FIXIDX,
BADQUOTE_FIXIDX,
BROKEN_ASSERT_STDIO_FIXIDX,
@@ -7094,6 +7095,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ALPHA_ASSERT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAlpha_AssertTests, apzAlpha_AssertPatch, 0 },
+ { zAlpha_Bad_LvalName, zAlpha_Bad_LvalList,
+ apzAlpha_Bad_LvalMachs,
+ ALPHA_BAD_LVAL_TEST_CT, FD_MACH_ONLY,
+ aAlpha_Bad_LvalTests, apzAlpha_Bad_LvalPatch, 0 },
+
{ zAlpha_GetoptName, zAlpha_GetoptList,
apzAlpha_GetoptMachs,
ALPHA_GETOPT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
@@ -7139,11 +7145,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AVOID_WCHAR_T_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAvoid_Wchar_T_TypeTests, apzAvoid_Wchar_T_TypePatch, 0 },
- { zBad_LvalName, zBad_LvalList,
- apzBad_LvalMachs,
- BAD_LVAL_TEST_CT, FD_MACH_ONLY,
- aBad_LvalTests, apzBad_LvalPatch, 0 },
-
{ zBad_Struct_TermName, zBad_Struct_TermList,
apzBad_Struct_TermMachs,
BAD_STRUCT_TERM_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index a052274..78dda4b 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -592,6 +592,37 @@ fix = {
/*
+ * 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'.
+ *
+ * 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...
+ */
+fix = {
+ hackname = alpha_bad_lval;
+
+ select = "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix";
+ mach = "alpha*-dec-osf*";
+
+ sed =
+ "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*"
+ "\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/";
+
+ test_text = '#pragma extern_prefix "_FOO"'"\n"
+ "#define something(x,y,z) _FOOsomething(x,y,z)\n"
+ "#define mumble _FOOmumble";
+};
+
+
+/*
* Fix getopt declarations in stdio.h and stdlib.h on Alpha OSF/1 and AIX.
*/
fix = {
@@ -757,62 +788,6 @@ fix = {
/*
- * 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'.
- *
- * 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...
- */
-fix = {
- hackname = bad_lval;
-
- select = "^[ \t]*#[ \t]*pragma[ \t]+extern_prefix";
-
- files = dirent.h;
- files = ftw.h;
- files = grp.h;
- files = libgen.h;
- files = ndbm.h;
- files = pthread.h;
- files = pwd.h;
- files = signal.h;
- files = standards.h;
- files = stdio.h;
- files = stdlib.h;
- files = string.h;
- files = stropts.h;
- files = sys/mount.h;
- files = sys/resource.h;
- files = sys/signal.h;
- files = sys/socket.h;
- files = sys/stat.h;
- files = sys/stropts.h;
- files = sys/uio.h;
- files = time.h;
- files = unistd.h;
- files = utmp.h;
- files = utmpx.h;
- files = wchar.h;
-
- sed =
- "s/^[ \t]*#[ \t]*define[ \t][ \t]*\\([^(]*\\)\\(([^)]*)\\)[ \t]*"
- "\\(_.*\\)\\1\\2[ \t]*$/#define \\1 \\3\\1/";
-
- test_text = '#pragma extern_prefix "_FOO"'"\n"
- "#define something(x,y,z) _FOOsomething(x,y,z)\n"
- "#define mumble _FOOmumble";
-};
-
-
-/*
* Fix `typedef struct term;' on hppa1.1-hp-hpux9.
*/
fix = {
diff --git a/gcc/fixinc/tests/base/dirent.h b/gcc/fixinc/tests/base/dirent.h
deleted file mode 100644
index 55a76d1..0000000
--- a/gcc/fixinc/tests/base/dirent.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* DO NOT EDIT THIS FILE.
-
- It has been auto-edited by fixincludes from:
-
- "fixinc/tests/inc/dirent.h"
-
- This had to be done to correct non-standard usages in the
- original, manufacturer supplied header file. */
-
-
-
-#if defined( BAD_LVAL_CHECK )
-#pragma extern_prefix "_FOO"
-#define something _FOOsomething
-#define mumble _FOOmumble
-#endif /* BAD_LVAL_CHECK */
diff --git a/gcc/fixinc/tests/base/testing.h b/gcc/fixinc/tests/base/testing.h
index 81caa06..0530cdf 100644
--- a/gcc/fixinc/tests/base/testing.h
+++ b/gcc/fixinc/tests/base/testing.h
@@ -19,6 +19,13 @@
#endif /* ALPHA___EXTERN_PREFIX_CHECK */
+#if defined( ALPHA_BAD_LVAL_CHECK )
+#pragma extern_prefix "_FOO"
+#define something _FOOsomething
+#define mumble _FOOmumble
+#endif /* ALPHA_BAD_LVAL_CHECK */
+
+
#if defined( AVOID_WCHAR_T_TYPE_CHECK )
#ifndef __cplusplus
typedef unsigned short wchar_t ;