Browse Source

Remove CFLAGS-OMIT support, rename getline to get testregex compile w/ -D_GNU_SOURCE

Peter S. Mazinger 18 years ago
parent
commit
7725acc031
3 changed files with 4 additions and 13 deletions
  1. 2 2
      test/Test.mak
  2. 0 9
      test/regex/Makefile
  3. 2 2
      test/regex/testregex.c

+ 2 - 2
test/Test.mak

@@ -73,7 +73,7 @@ endef
 
 $(U_TARGETS):
 	$(showlink)
-	$(Q)$(CC) $(filter-out $(CFLAGS-OMIT_$@),$(CFLAGS)) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c $@.c -o $@.o
+	$(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$@) -c $@.c -o $@.o
 	$(Q)$(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$@)
 ifeq ($(COMPILE_ONLY),)
 	$(exec_test)
@@ -82,7 +82,7 @@ endif
 
 $(G_TARGETS):
 	$(showlink)
-	$(Q)$(HOSTCC) $(filter-out $(CFLAGS-OMIT_$(patsubst %_glibc,%,$@)),$(HOST_CFLAGS)) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o
+	$(Q)$(HOSTCC) $(HOST_CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(patsubst %_glibc,%,$@)) -c $(patsubst %_glibc,%,$@).c -o $@.o
 	$(Q)$(HOSTCC) $(HOST_LDFLAGS) $@.o -o $@ $(EXTRA_LDFLAGS) $(LDFLAGS_$(patsubst %_glibc,%,$@))
 ifeq ($(COMPILE_ONLY),)
 	$(exec_test)

+ 0 - 9
test/regex/Makefile

@@ -7,15 +7,6 @@ include ../Test.mak
 
 CFLAGS_tst-regex2 := -std=c99
 
-CFLAGS-OMIT_testregex := -D_GNU_SOURCE
-CFLAGS-OMIT_testregexc := -D_GNU_SOURCE
-CFLAGS-OMIT_testregexf := -D_GNU_SOURCE
-CFLAGS-OMIT_testregexi := -D_GNU_SOURCE
-CFLAGS-OMIT_testregexl := -D_GNU_SOURCE
-CFLAGS-OMIT_testregexn := -D_GNU_SOURCE
-CFLAGS-OMIT_testregexp := -D_GNU_SOURCE
-CFLAGS-OMIT_testregexr := -D_GNU_SOURCE
-
 OPTS_testregex := < basic.dat
 OPTS_testregexc := < categorize.dat
 OPTS_testregexf := < forcedassoc.dat

+ 2 - 2
test/regex/testregex.c

@@ -985,7 +985,7 @@ gotcha(int sig)
 }
 
 static char*
-getline(FILE* fp)
+my_getline(FILE* fp)
 {
 	static char	buf[32 * 1024];
 
@@ -1343,7 +1343,7 @@ main(int argc, char** argv)
 			signal(SIGBUS, gotcha);
 			signal(SIGSEGV, gotcha);
 		}
-		while (p = getline(fp))
+		while (p = my_getline(fp))
 		{
 
 		/* parse: */