From 522e481aa536f70534dd1a4fa6cf23988bd9ef15 Mon Sep 17 00:00:00 2001 From: nsz Date: Mon, 22 Oct 2012 18:26:45 +0200 Subject: [PATCH] api: ifdef out fmtmsg.c and ndbm.c, fix stupid gcc messages --- src/api/Makefile | 4 ++-- src/api/fmtmsg.c | 2 +- src/api/ndbm.c | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) 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 -- 2.20.1