api: ifdef out fmtmsg.c and ndbm.c, fix stupid gcc messages
authornsz <nsz@port70.net>
Mon, 22 Oct 2012 16:26:45 +0000 (18:26 +0200)
committernsz <nsz@port70.net>
Mon, 22 Oct 2012 16:26:45 +0000 (18:26 +0200)
src/api/Makefile
src/api/fmtmsg.c
src/api/ndbm.c

index be3671a..50dfdd7 100644 (file)
@@ -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:
index b9ee758..0371a5f 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef _XOPEN_SOURCE
+#if 0
 #include <fmtmsg.h>
 #define C(n) switch(n){case n:;}
 static void f()
index f68a5e4..a4bfdd8 100644 (file)
@@ -1,3 +1,4 @@
+#if 0
 #include <ndbm.h>
 #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