summaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-17 19:43:21 +0000
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-17 19:43:21 +0000
commite7ae439715a4024a922b10b71457e948fd9b9dee (patch)
treede9e9e08bbe4f6a23deae5f24b4a3fb806eac942 /gcc/fixinc
parent4c6f2eda084a70a2e164aeed89499a20e89196b5 (diff)
downloadgcc-e7ae439715a4024a922b10b71457e948fd9b9dee.tar.gz
reorder some files= entries
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34582 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixincl.x44
-rw-r--r--gcc/fixinc/inclhack.def34
2 files changed, 43 insertions, 35 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index 30d574423d1..df7023ddc7b 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -2267,7 +2267,7 @@ tSCC zLimits_IfndefsName[] =
* File name selection pattern
*/
tSCC zLimits_IfndefsList[] =
- "|limits.h|sys/limits.h|";
+ "|sys/limits.h|limits.h|";
/*
* Machine/OS name selection pattern
*/
@@ -2715,7 +2715,7 @@ tSCC zNested_MotorolaName[] =
* File name selection pattern
*/
tSCC zNested_MotorolaList[] =
- "|limits.h|sys/limits.h|";
+ "|sys/limits.h|limits.h|";
/*
* Machine/OS name selection pattern
*/
@@ -4529,7 +4529,7 @@ tSCC zUltrix_Math_IfdefName[] =
* File name selection pattern
*/
tSCC zUltrix_Math_IfdefList[] =
- "|float.h|math.h|sys/limits.h|";
+ "|sys/limits.h|float.h|math.h|";
/*
* Machine/OS name selection pattern
*/
@@ -4539,7 +4539,7 @@ tSCC zUltrix_Math_IfdefList[] =
* content selection pattern - do fix if pattern found
*/
tSCC zUltrix_Math_IfdefSelect0[] =
- "^#if.*\\|\\|[ \t]+CC\\$[a-z]+";
+ "^(#if.*)\\|\\|[ \t]+CC\\$[a-z]+";
#define ULTRIX_MATH_IFDEF_TEST_CT 1
tTestDesc aUltrix_Math_IfdefTests[] = {
@@ -4548,8 +4548,9 @@ tTestDesc aUltrix_Math_IfdefTests[] = {
/*
* Fix Command Arguments for Ultrix_Math_Ifdef
*/
-const char* apzUltrix_Math_IfdefPatch[] = { "sed",
- "-e", "/^#if/s/||[ \t][ \t]*CC$[a-z][a-z]*//",
+const char* apzUltrix_Math_IfdefPatch[] = {
+ "format",
+ "%1",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -5101,25 +5102,32 @@ tSCC zX11_ClassList[] =
#define apzX11_ClassMachs (const char**)NULL
/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zX11_ClassSelect0[] =
+ "^([ \t]*char \\*)class;(.*)";
+
+/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zX11_ClassBypass0[] =
"__cplusplus";
-#define X11_CLASS_TEST_CT 1
+#define X11_CLASS_TEST_CT 2
tTestDesc aX11_ClassTests[] = {
- { TT_NEGREP, zX11_ClassBypass0, (regex_t*)NULL }, };
+ { TT_NEGREP, zX11_ClassBypass0, (regex_t*)NULL },
+ { TT_EGREP, zX11_ClassSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for X11_Class
*/
-const char* apzX11_ClassPatch[] = { "sed",
- "-e", "/char \\*class;/i\\\n\
-#ifdef __cplusplus\\\n\
-\tchar *c_class;\\\n\
-#else\n",
- "-e", "/char \\*class;/a\\\n\
-#endif\n",
+const char* apzX11_ClassPatch[] = {
+ "format",
+ "#ifdef __cplusplus\n\
+%1c_class;%2\n\
+#else\n\
+%1class;%2\n\
+#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -5249,7 +5257,7 @@ const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 129
+#define REGEX_COUNT 130
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 130
@@ -5816,7 +5824,7 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
{ zUltrix_Math_IfdefName, zUltrix_Math_IfdefList,
apzUltrix_Math_IfdefMachs,
- ULTRIX_MATH_IFDEF_TEST_CT, FD_MACH_ONLY,
+ ULTRIX_MATH_IFDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aUltrix_Math_IfdefTests, apzUltrix_Math_IfdefPatch },
{ zUltrix_Nested_IoctlName, zUltrix_Nested_IoctlList,
@@ -5886,7 +5894,7 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
{ zX11_ClassName, zX11_ClassList,
apzX11_ClassMachs,
- X11_CLASS_TEST_CT, FD_MACH_ONLY,
+ X11_CLASS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aX11_ClassTests, apzX11_ClassPatch },
{ zX11_Class_UsageName, zX11_Class_UsageList,
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index d98bfce3f49..7ede690621c 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -1305,8 +1305,8 @@ fix = {
*/
fix = {
hackname = limits_ifndefs;
- files = "limits.h";
files = "sys/limits.h";
+ files = "limits.h";
bypass = "ifndef[ \t]+FLT_MIN";
c_fix = format;
@@ -1520,8 +1520,8 @@ fix = {
fix = {
hackname = nested_motorola;
mach = "m68k-motorola-sysv*";
- files = limits.h;
files = sys/limits.h;
+ files = limits.h;
sed = "s@^\\(#undef[ \t][ \t]*PIPE_BUF[ \t]*"
"/\\* max # bytes atomic in write to a\\)$@\\1 */@";
sed = "s@\\(/\\*#define\tHUGE_VAL\t3.[0-9e+]* \\)"
@@ -2761,12 +2761,14 @@ fix = {
* Strip "|| CC$gfloat" from Ultrix math headers.
*/
fix = {
- hackname = ultrix_math_ifdef;
- files = float.h;
- files = math.h;
- files = sys/limits.h;
- select = "^#if.*\\|\\|[ \t]+CC\\$[a-z]+";
- sed = "/^#if/s/||[ \t][ \t]*CC$[a-z][a-z]*//";
+ 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";
+
test_text = '#if defined(__GFLOAT) || CC\$gfloat';
};
@@ -3037,15 +3039,13 @@ fix = {
* we find __cplusplus in the file. These were found on the RS/6000.
*/
fix = {
- hackname = x11_class;
- files = X11/ShellP.h;
- bypass = __cplusplus;
- sed = "/char \\*class;/i\\\n"
- "#ifdef __cplusplus\\\n"
- "\tchar *c_class;\\\n"
- "#else\n";
- sed = "/char \\*class;/a\\\n"
- "#endif\n";
+ 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";
test_text =
"struct {\n"
" char *class;\n"