]> 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:26:51 +0000 (22:26 +0000)
committerguy <guy>
Sat, 23 Apr 2005 22:26:51 +0000 (22:26 +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 e742b4931da41508ca5f6dbc3e096cb52440f6c5..55abe6829a0755de78d351414c3e141afe0d26bc 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.232 2005-04-20 18:23:09 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.233 2005-04-23 22:26:51 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 f6e0523a208e259c1502c3f41e0a51e48bf07dfa..6c3ebf9d22aac2eca18b4b7e066232b166c976c9 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.61 2005-04-19 04:25:00 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.62 2005-04-23 22:26:52 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 *);