--- embedaddon/libnet/sample/libnet_test.h 2012/02/21 22:14:23 1.1.1.1 +++ embedaddon/libnet/sample/libnet_test.h 2023/09/27 11:11:38 1.1.1.2 @@ -1,6 +1,4 @@ /* - * $Id: libnet_test.h,v 1.1.1.1 2012/02/21 22:14:23 misho Exp $ - * * libnet_test.h * * Copyright (c) 1998 - 2001 Mike D. Schiffman @@ -9,11 +7,14 @@ #ifndef __LIBNET_TEST_H #define __LIBNET_TEST_H -#ifndef _WIN32 +#if (HAVE_CONFIG_H) +#include "../include/config.h" +#endif + #include "../include/libnet.h" -#else -#include "../include/win32/libnet.h" -#include "../include/win32/getopt.h" + +#if !defined(__WIN32__) +# include #endif #define libnet_timersub(tvp, uvp, vvp) \ @@ -40,21 +41,22 @@ u_char org_code[3] = {0x00, 0x00, 0x00}; void usage(char *); #if defined(__WIN32__) -#include -#include -#include -#ifndef _WIN32 -#include -#endif -#if defined(__GNUC__) /* mingw compiler */ -extern __attribute__((dllimport)) char *optarg; -#else /* assume msvc */ -#ifndef _WIN32 -extern __dllspec(dllimport) char *optarg; -#endif -#endif + #include /* For non-MingW, this is a local libnet/win32/getopt.h */ + #include + #include + + #ifndef _MSC_VER + #include + #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 */