If something is only supposed to be included if we have libpcap, don't
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 14 May 2010 02:47:13 +0000 (02:47 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 14 May 2010 02:47:13 +0000 (02:47 +0000)
put #ifdef HAVE_LIBPCAP in it.

Add multiple-inclusion protection to capture_errs.h.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32803 f5534014-38df-0310-8fa8-9805f1628bb7

capture-pcap-util-int.h
capture.h
capture_errs.h
capture_ifinfo.h
ringbuffer.h

index 426595d3414aa0916b1582bf9f28941ccb363d4f..e5a1303d64088a387bab80a38da19510ac39610b 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef __PCAP_UTIL_INT_H__
 #define __PCAP_UTIL_INT_H__
 
-#ifdef HAVE_LIBPCAP
-
 extern if_info_t *if_info_new(char *name, char *description);
 extern void if_info_add_address(if_info_t *if_info, struct sockaddr *addr);
 #ifdef HAVE_PCAP_FINDALLDEVS
@@ -44,6 +42,4 @@ extern GList *get_interface_list_findalldevs(int *err, char **err_str);
  */
 extern gchar *cant_get_if_list_error_message(const char *err_str);
 
-#endif /* HAVE_LIBPCAP */
-
 #endif /* __PCAP_UTIL_INT_H__ */
index 3465d40c4c57d4e003c6d9d256e656cd916bb353..f3107fc0132251a3fbd0a2d271502dd2b542792c 100644 (file)
--- a/capture.h
+++ b/capture.h
@@ -101,8 +101,6 @@ extern void capture_input_cfilter_error_message(capture_options *capture_opts, c
  */
 extern void capture_input_closed(capture_options *capture_opts);
 
-#ifdef HAVE_LIBPCAP
-
 struct if_stat_cache_s;
 typedef struct if_stat_cache_s if_stat_cache_t;
 
@@ -123,6 +121,5 @@ extern gboolean capture_stats(if_stat_cache_t *sc, char *ifname, struct pcap_sta
  * Stop gathering capture statistics.
  */
 void capture_stat_stop(if_stat_cache_t *sc);
-#endif /* HAVE_LIBPCAP */
 
 #endif /* capture.h */
index 80c4c2c5aa9092f16d0ebb138de104192444c0e5..a9f2f51dde88420ecb31176fc8e5b2e76d3cc4ed 100644 (file)
@@ -23,7 +23,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
-#ifdef HAVE_LIBPCAP
+#ifndef __CAPTURE_ERRS_H__
+#define __CAPTURE_ERRS_H__
 
 #ifdef _WIN32
 /* error message, if WinPcap couldn't be loaded */
@@ -31,4 +32,4 @@
 extern char *cant_load_winpcap_err(const char *app_name);
 #endif /* _WIN32 */
 
-#endif /* HAVE_LIBPCAP */
+#endif /* __CAPTURE_ERRS_H__ */
index e0cec1db7f0ebbd940a907e24dd85c733ad6c612..31414c74ae2e7763b0b03d16528b09cfa0e26caa 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef __CAPTURE_IFINFO_H__
 #define __CAPTURE_IFINFO_H__
 
-#ifdef HAVE_LIBPCAP
-
 /*
  * The list of interfaces returned by "get_interface_list()" is
  * a list of these structures.
@@ -94,6 +92,4 @@ capture_get_if_capabilities(const char *devname, gboolean monitor_mode,
 
 void free_if_capabilities(if_capabilities_t *caps);
 
-#endif /* HAVE_LIBPCAP */
-
 #endif /* __CAPTURE_IFINFO_H__ */
index a0c3cc6a8aec25e5b2377fbe1496b19271829b46..b4ef7a42f1976ee24aac2de1d850b39448c3be86 100644 (file)
@@ -25,8 +25,6 @@
 #ifndef __RINGBUFFER_H__
 #define __RINGBUFFER_H__
 
-#ifdef HAVE_LIBPCAP
-
 #include <stdio.h>
 #include "file.h"
 #include "wiretap/wtap.h"
@@ -47,6 +45,4 @@ gboolean ringbuf_libpcap_dump_close(gchar **save_file, int *err);
 void ringbuf_free(void);
 void ringbuf_error_cleanup(void);
 
-#endif /* HAVE_LIBPCAP */
-
 #endif /* ringbuffer.h */