+2001-05-25 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * fixinc/inclhack.def (strict_ansi_not, strict_ansi_not_ctd,
+ strict_ansi_only): Don't run if stdc_0_in_system_headers.
+ * fixinc/fixincl.x: Regenerate.
+ * fixinc/fixtests.c (stdc_0_in_system_headers_test): New function.
+ (FIX_TEST_TABLE): Declare it.
+ * fixinc/fixlib.h: Include config.h.
+
2001-05-25 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* fixinc/inclhack.def (alpha___assert): Change char * args to
tSCC zStrict_Ansi_NotSelect0[] =
"^([ \t]*#[ \t]*if.*)(!__STDC__|__STDC__[ \t]*==[ \t]*0|__STDC__[ \t]*!=[ \t]*1|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)(.*)";
-#define STRICT_ANSI_NOT_TEST_CT 1
+/*
+ * perform the C function call test
+ */
+tSCC zStrict_Ansi_NotFTst0[] = "stdc_0_in_system_headers";
+
+#define STRICT_ANSI_NOT_TEST_CT 2
static tTestDesc aStrict_Ansi_NotTests[] = {
+ { TT_FUNCTION, zStrict_Ansi_NotFTst0, 0 /* unused */ },
{ TT_EGREP, zStrict_Ansi_NotSelect0, (regex_t*)NULL }, };
/*
tSCC zStrict_Ansi_Not_CtdSelect0[] =
"^([ \t]*[|&][|&][ \t(]*)(__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)(.*)";
-#define STRICT_ANSI_NOT_CTD_TEST_CT 1
+/*
+ * perform the C function call test
+ */
+tSCC zStrict_Ansi_Not_CtdFTst0[] = "stdc_0_in_system_headers";
+
+#define STRICT_ANSI_NOT_CTD_TEST_CT 2
static tTestDesc aStrict_Ansi_Not_CtdTests[] = {
+ { TT_FUNCTION, zStrict_Ansi_Not_CtdFTst0, 0 /* unused */ },
{ TT_EGREP, zStrict_Ansi_Not_CtdSelect0, (regex_t*)NULL }, };
/*
tSCC zStrict_Ansi_OnlySelect0[] =
"^([ \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)(.*)";
-#define STRICT_ANSI_ONLY_TEST_CT 1
+/*
+ * perform the C function call test
+ */
+tSCC zStrict_Ansi_OnlyFTst0[] = "stdc_0_in_system_headers";
+
+#define STRICT_ANSI_ONLY_TEST_CT 2
static tTestDesc aStrict_Ansi_OnlyTests[] = {
+ { TT_FUNCTION, zStrict_Ansi_OnlyFTst0, 0 /* unused */ },
{ TT_EGREP, zStrict_Ansi_OnlySelect0, (regex_t*)NULL }, };
/*
} test_entry_t;
#define FIX_TEST_TABLE \
- _FT_( "machine_name", machine_name_test )
+ _FT_( "machine_name", machine_name_test ) \
+ _FT_( "stdc_0_in_system_headers", stdc_0_in_system_headers_test )
#define TEST_FOR_FIX_PROC_HEAD( test ) \
static apply_fix_p_t test PARAMS(( tCC* file, tCC* text )); \
}
+TEST_FOR_FIX_PROC_HEAD( stdc_0_in_system_headers_test )
+{
+#ifdef STDC_0_IN_SYSTEM_HEADERS
+ return SKIP_FIX;
+#else
+ return APPLY_FIX;
+#endif
+}
+
+
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
test for fix selector
"|__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";
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";
"|__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";