nntpcache-2.4.0b5/libproff/list_test.c uses warnx(3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some systems don't provide warnx(3).  Maybe fprintf(3) should be used
instead?

Drew

Index: list_test.c
===================================================================
RCS file: /cvs/root/syssoft/systools/tabloid/nntpcache/libproff/list_test.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 list_test.c
--- list_test.c	2000/07/21 14:12:57	1.1.1.1
+++ list_test.c	2000/07/21 16:40:42
@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <err.h>
+#include <errno.h>
 
 #define PLIST_ALLOC malloc
 
@@ -13,7 +13,7 @@
     char *data;
 };
 
-#define a(x) if(!(x)) {warnx("failed assertion(%s)", #x); fails++;}
+#define a(x) if(!(x)) {fprintf(stderr, "list_test: failed assertion(%s): %s", #x, strerror(errno)); fails++;}
 
 static struct strl *
 strl_new(char *data)


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux