summaryrefslogtreecommitdiff
path: root/sample/libnet_test.h
diff options
context:
space:
mode:
Diffstat (limited to 'sample/libnet_test.h')
-rw-r--r--sample/libnet_test.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/sample/libnet_test.h b/sample/libnet_test.h
index 00e6c54..e7d2323 100644
--- a/sample/libnet_test.h
+++ b/sample/libnet_test.h
@@ -1,6 +1,4 @@
/*
- * $Id: libnet_test.h,v 1.3 2004/01/29 21:17:16 mike Exp $
- *
* libnet_test.h
*
* Copyright (c) 1998 - 2001 Mike D. Schiffman <mike@infonexus.com>
@@ -15,8 +13,7 @@
#include "../include/libnet.h"
-#if (_WIN32) || (__CYGWIN__)
-#else
+#if !defined(__WIN32__)
# include <netinet/in.h>
#endif
@@ -44,21 +41,23 @@ u_char org_code[3] = {0x00, 0x00, 0x00};
void usage(char *);
#if defined(__WIN32__)
-#include <getopt.h>
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#ifndef _WIN32
-#include <sys/time.h>
-#endif
-#if defined(__GNUC__) /* mingw compiler */
-extern __attribute__((dllimport)) char *optarg;
-#else /* assume msvc */
-#ifndef _WIN32
-extern __dllspec(dllimport) char *optarg;
-#endif
-#endif
+ #include <getopt.h> /* For non-MingW, this is a local libnet/win32/getopt.h */
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
+
+ #ifndef _MSC_VER
+ #include <sys/time.h>
+ #endif
+
+// FIXME: weido... see #define LIBNET_API __declspec(dllexport) in win32/libnet.h...
+//#if defined(__GNUC__) /* mingw compiler */
+//extern __attribute__((dllimport)) char *optarg;
+//#else /* assume msvc */
+//extern __dllspec(dllimport) char *optarg;
+//#endif
+
#endif /* __WIN32__ */
#endif /* __LIBNET_TEST_H */
-/* EOF */
+/* EOF */ \ No newline at end of file