]> The Tcpdump Group git mirrors - libpcap/commitdiff
From Albert Chin: just define __attribute__ as an empty macro if we
authorguy <guy>
Sat, 23 Apr 2005 22:27:37 +0000 (22:27 +0000)
committerguy <guy>
Sat, 23 Apr 2005 22:27:37 +0000 (22:27 +0000)
don't have __attribute__ support in the compiler.

While we're at it, get rid of the declaration of bpf_error() in
gencode.c, as it's already declared in gencode.h.

gencode.c
gencode.h

index 60c2339765c36391917a6420158c48715b5382cf..37b022254f37d3e425573818d8ed9bb80716a0ae 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -21,7 +21,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.221.2.6 2005-04-20 18:23:42 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.221.2.7 2005-04-23 22:27:37 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -108,8 +108,6 @@ static u_int        orig_linktype = -1U, orig_nl = -1U;
 static int     pcap_fddipad;
 #endif
 
-void   bpf_error(const char *fmt, ...) __attribute__((noreturn));
-
 /* VARARGS */
 void
 bpf_error(const char *fmt, ...)
index eb9ac3da480768bf4920c815b99551ffcfcb701b..394bd10541553acfdb587b13096157f66d4fad24 100644 (file)
--- a/gencode.h
+++ b/gencode.h
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.60.2.1 2005-04-19 04:26:07 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.60.2.2 2005-04-23 22:27:38 guy Exp $ (LBL)
  */
 
 /*
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef HAVE___ATTRIBUTE__
+#define __attribute__(x)
+#endif /* HAVE___ATTRIBUTE__ */
+
 /* Address qualifiers. */
 
 #define Q_HOST         1
@@ -290,10 +294,7 @@ struct block *gen_pf_dir(int);
 
 void bpf_optimize(struct block **);
 void bpf_error(const char *, ...)
-#if HAVE___ATTRIBUTE__
-    __attribute__((noreturn, format (printf, 1, 2)))
-#endif
-;
+    __attribute__((noreturn, format (printf, 1, 2)));
 
 void finish_parse(struct block *);
 char *sdup(const char *);