From 0e2f8c8892e9fb0611cc2ccf5e184dd89e0b07ec Mon Sep 17 00:00:00 2001 From: assar Date: Tue, 11 Jul 2000 00:37:04 +0000 Subject: [PATCH] add config.h, remove gnuc.h. remove __dead --- acconfig.h | 10 ++++++++++ bpf_image.c | 7 +++++-- etherent.c | 7 +++++-- gencode.c | 10 +++++++--- gencode.h | 9 +++------ grammar.y | 7 +++++-- inet.c | 7 +++++-- nametoaddr.c | 7 +++++-- optimize.c | 7 +++++-- pcap-bpf.c | 7 +++++-- pcap-dlpi.c | 7 +++++-- pcap-enet.c | 6 +++++- pcap-linux.c | 4 ++++ pcap-nit.c | 7 +++++-- pcap-null.c | 7 +++++-- pcap-pf.c | 7 +++++-- pcap-snit.c | 7 +++++-- pcap-snoop.c | 7 +++++-- pcap.c | 7 +++++-- savefile.c | 7 +++++-- scanner.l | 7 +++++-- 21 files changed, 109 insertions(+), 42 deletions(-) create mode 100644 acconfig.h diff --git a/acconfig.h b/acconfig.h new file mode 100644 index 0000000..0963da8 --- /dev/null +++ b/acconfig.h @@ -0,0 +1,10 @@ +@TOP@ + +/* Define __P() macro, if necessary */ +#ifndef __P +#if __STDC__ +#define __P(protos) protos +#else +#define __P(protos) () +#endif +#endif diff --git a/bpf_image.c b/bpf_image.c index c7d3aae..ab225ed 100644 --- a/bpf_image.c +++ b/bpf_image.c @@ -21,7 +21,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.23 2000-04-27 09:11:11 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.24 2000-07-11 00:37:04 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -32,7 +36,6 @@ static const char rcsid[] = #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/etherent.c b/etherent.c index c34834c..a13a6f5 100644 --- a/etherent.c +++ b/etherent.c @@ -21,7 +21,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/etherent.c,v 1.20 1999-10-07 23:46:40 mcr Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/etherent.c,v 1.21 2000-07-11 00:37:04 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -35,7 +39,6 @@ static const char rcsid[] = #include -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/gencode.c b/gencode.c index 92f8391..6eab6ce 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,11 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.112 2000-07-01 03:32:50 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.113 2000-07-11 00:37:04 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -54,7 +58,6 @@ struct rtentry; #include #endif /*INET6*/ -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif @@ -73,8 +76,9 @@ int pcap_fddipad; #endif /* VARARGS */ -__dead void +void bpf_error(const char *fmt, ...) + { va_list ap; diff --git a/gencode.h b/gencode.h index 570fc3c..c458911 100644 --- a/gencode.h +++ b/gencode.h @@ -18,12 +18,9 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.39 2000-07-01 03:33:48 assar Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.40 2000-07-11 00:37:07 assar Exp $ (LBL) */ -/*XXX*/ -#include "gnuc.h" - /* Address qualifiers. */ #define Q_HOST 1 @@ -177,9 +174,9 @@ struct block *gen_multicast(int); struct block *gen_inbound(int); void bpf_optimize(struct block **); -__dead void bpf_error(const char *, ...) +void bpf_error(const char *, ...) #if HAVE___ATTRIBUTE__ - __attribute__((volatile, format (printf, 1, 2))) + __attribute__((noreturn, format (printf, 1, 2))) #endif ; diff --git a/grammar.y b/grammar.y index fab97e5..7420814 100644 --- a/grammar.y +++ b/grammar.y @@ -22,7 +22,11 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.58 2000-06-03 16:29:43 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.59 2000-07-11 00:37:08 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -47,7 +51,6 @@ struct rtentry; #include "gencode.h" #include -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/inet.c b/inet.c index 7279409..0df30e5 100644 --- a/inet.c +++ b/inet.c @@ -33,7 +33,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/inet.c,v 1.33 2000-07-01 03:34:10 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/inet.c,v 1.34 2000-07-11 00:37:04 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -63,7 +67,6 @@ struct rtentry; #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/nametoaddr.c b/nametoaddr.c index 89b3873..cca3e2e 100644 --- a/nametoaddr.c +++ b/nametoaddr.c @@ -24,7 +24,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.53 2000-07-01 03:35:08 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.54 2000-07-11 00:37:05 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -55,7 +59,6 @@ struct rtentry; #include "gencode.h" #include -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/optimize.c b/optimize.c index ee22e06..b78ae70 100644 --- a/optimize.c +++ b/optimize.c @@ -22,7 +22,11 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/optimize.c,v 1.62 2000-04-27 09:11:12 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/optimize.c,v 1.63 2000-07-11 00:37:05 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -36,7 +40,6 @@ static const char rcsid[] = #include "gencode.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap-bpf.c b/pcap-bpf.c index 8c11b51..566e586 100644 --- a/pcap-bpf.c +++ b/pcap-bpf.c @@ -20,7 +20,11 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.34 2000-07-10 04:50:05 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-bpf.c,v 1.35 2000-07-11 00:37:05 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include /* optionally get BSD define */ @@ -42,7 +46,6 @@ static const char rcsid[] = #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap-dlpi.c b/pcap-dlpi.c index bb1548d..cf7615a 100644 --- a/pcap-dlpi.c +++ b/pcap-dlpi.c @@ -38,7 +38,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.57 2000-07-06 01:50:36 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.58 2000-07-11 00:37:05 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -80,7 +84,6 @@ static const char rcsid[] = #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap-enet.c b/pcap-enet.c index 56daa0f..243c762 100644 --- a/pcap-enet.c +++ b/pcap-enet.c @@ -8,7 +8,11 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-enet.c,v 1.2 2000-01-10 18:42:59 fenner Exp $"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-enet.c,v 1.3 2000-07-11 00:37:06 assar Exp $"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include diff --git a/pcap-linux.c b/pcap-linux.c index c85955f..e792ba6 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -47,6 +47,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "pcap-int.h" #include diff --git a/pcap-nit.c b/pcap-nit.c index 2e3074a..1538b0c 100644 --- a/pcap-nit.c +++ b/pcap-nit.c @@ -20,7 +20,11 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.34 2000-04-27 14:24:12 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.35 2000-07-11 00:37:06 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -49,7 +53,6 @@ static const char rcsid[] = #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap-null.c b/pcap-null.c index 39ec04f..588c4d3 100644 --- a/pcap-null.c +++ b/pcap-null.c @@ -20,14 +20,17 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.11 2000-06-26 05:12:11 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-null.c,v 1.12 2000-07-11 00:37:06 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include /* optionally get BSD define */ #include -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap-pf.c b/pcap-pf.c index 1333a13..fd60aec 100644 --- a/pcap-pf.c +++ b/pcap-pf.c @@ -24,7 +24,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-pf.c,v 1.57 2000-07-01 03:35:08 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-pf.c,v 1.58 2000-07-11 00:37:06 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -59,7 +63,6 @@ struct rtentry; #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap-snit.c b/pcap-snit.c index 1601a9a..730a53b 100644 --- a/pcap-snit.c +++ b/pcap-snit.c @@ -25,7 +25,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.49 2000-07-01 03:35:07 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.50 2000-07-11 00:37:07 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -62,7 +66,6 @@ static const char rcsid[] = #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap-snoop.c b/pcap-snoop.c index a862300..c0029ee 100644 --- a/pcap-snoop.c +++ b/pcap-snoop.c @@ -20,7 +20,11 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap-snoop.c,v 1.25 2000-04-30 07:32:56 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap-snoop.c,v 1.26 2000-07-11 00:37:07 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -50,7 +54,6 @@ static const char rcsid[] = #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/pcap.c b/pcap.c index f4ef1fa..848a03a 100644 --- a/pcap.c +++ b/pcap.c @@ -33,7 +33,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.31 2000-06-26 04:58:04 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/pcap.c,v 1.32 2000-07-11 00:37:07 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -43,7 +47,6 @@ static const char rcsid[] = #include #include -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/savefile.c b/savefile.c index 50ea33c..78ab7bb 100644 --- a/savefile.c +++ b/savefile.c @@ -30,7 +30,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.39 2000-04-27 09:11:14 itojun Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.40 2000-07-11 00:37:07 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -44,7 +48,6 @@ static const char rcsid[] = #include "pcap-int.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif diff --git a/scanner.l b/scanner.l index 7246f69..c6d789b 100644 --- a/scanner.l +++ b/scanner.l @@ -22,7 +22,11 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.63 2000-06-10 14:42:27 assar Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/scanner.l,v 1.64 2000-07-11 00:37:08 assar Exp $ (LBL)"; +#endif + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif #include @@ -46,7 +50,6 @@ static const char rcsid[] = #endif /*INET6*/ #include "tokdefs.h" -#include "gnuc.h" #ifdef HAVE_OS_PROTO_H #include "os-proto.h" #endif