From: nsz Date: Mon, 22 Oct 2012 16:26:45 +0000 (+0200) Subject: api: ifdef out fmtmsg.c and ndbm.c, fix stupid gcc messages X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=522e481aa536f70534dd1a4fa6cf23988bd9ef15;p=libc-test api: ifdef out fmtmsg.c and ndbm.c, fix stupid gcc messages --- diff --git a/src/api/Makefile b/src/api/Makefile index be3671a..50dfdd7 100644 --- a/src/api/Makefile +++ b/src/api/Makefile @@ -3,8 +3,8 @@ CFLAGS+=-std=c99 -pedantic-errors -Wall -Werror -Wno-unused -D_POSIX_C_SOURCE=20 all: for i in *.c; do \ - $(CC) $(CFLAGS) -c $$i 2>&1; \ - done + LC_ALL=C $(CC) $(CFLAGS) -c $$i 2>&1; \ + done |grep -v 'Each undeclared identifier is reported only once' |grep -v 'for each function it appears in' $(CC) $(LDFLAGS) -lcrypt -ldl -lm -lpthread -lrt *.o -o main clean: diff --git a/src/api/fmtmsg.c b/src/api/fmtmsg.c index b9ee758..0371a5f 100644 --- a/src/api/fmtmsg.c +++ b/src/api/fmtmsg.c @@ -1,4 +1,4 @@ -#ifdef _XOPEN_SOURCE +#if 0 #include #define C(n) switch(n){case n:;} static void f() diff --git a/src/api/ndbm.c b/src/api/ndbm.c index f68a5e4..a4bfdd8 100644 --- a/src/api/ndbm.c +++ b/src/api/ndbm.c @@ -1,3 +1,4 @@ +#if 0 #include #define T(t) (t*)0; #define F(t,n) {t *y = &x.n;} @@ -23,3 +24,4 @@ C(DBM_REPLACE) {DBM*(*p)(const char*,int,mode_t) = dbm_open;} {int(*p)(DBM*,datum,datum,int) = dbm_store;} } +#endif