diff --git a/configure.in b/configure.in index 0417daf..c69d23e 100644 --- a/configure.in +++ b/configure.in @@ -118,13 +118,6 @@ dnl ########### AC_TYPE_SIZE_T AC_TYPE_SSIZE_T -AC_CHECK_TYPES(struct timeval, , , -[ -#ifdef HAVE_SYS_TIME_H -# include -#endif -]) - dnl ############### dnl ## LIBRARIES ####################################################### diff --git a/src/compat.c b/src/compat.c index 11efc72..dbb266f 100644 --- a/src/compat.c +++ b/src/compat.c @@ -10,10 +10,6 @@ # include #endif /* HAVE_LIBGEN_H && !__linux__ */ -#ifndef PATH_MAX -# define PATH_MAX 256 -#endif /* !PATH_MAX */ - #ifndef PATH_SEPARATORS # define PATH_SEPARATORS "/" #endif /* !PATH_SEPARATORS */ diff --git a/src/ezstream.h b/src/ezstream.h index 5a8b002..d76de68 100644 --- a/src/ezstream.h +++ b/src/ezstream.h @@ -57,6 +57,10 @@ # endif /* WIN32 */ #endif /* !_PATH_DEVNULL */ +#ifndef PATH_MAX +# define PATH_MAX 256 +#endif /* !PATH_MAX */ + #if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE) # define pclose _pclose #endif /* !HAVE_PCLOSE && HAVE__PCLOSE */ @@ -92,13 +96,6 @@ # define sleep(a) Sleep((a) * 1000) #endif /* WIN32 */ -#ifndef HAVE_STRUCT_TIMEVAL -struct timeval { - long tv_sec; - long tv_usec; -}; -#endif - /* * For compat.c and getopt.c: */ diff --git a/src/strtonum.c b/src/strtonum.c index 5d71616..39ff6a8 100644 --- a/src/strtonum.c +++ b/src/strtonum.c @@ -22,11 +22,12 @@ # include "config.h" #endif +#include "ezstream.h" + #include #include #include #include "strfctns.h" -#include "compat.h" #define INVALID 1 #define TOOSMALL 2 diff --git a/win32/compat.h b/win32/compat.h index 427b49a..e63818a 100644 --- a/win32/compat.h +++ b/win32/compat.h @@ -9,25 +9,8 @@ #define inline __inline -#define popen _popen -#define pclose _pclose -#define snprintf _snprintf -#define stat _stat -#define strncasecmp strnicmp -#ifndef __GNUC__ -# define strtoll _strtoi64 -#endif /* !__GNUC__ */ - -#define sleep(a) Sleep((a) * 1000) - #define va_copy(dst, src) memcpy(&(dst), &(src), sizeof(va_list)) -#define S_IRGRP 0 -#define S_IROTH 0 -#define S_IWGRP 0 -#define S_IWOTH 0 -#define S_IXGRP 0 -#define S_IXOTH 0 #define PATH_SEPARATORS "\\/" #ifndef ssize_t diff --git a/win32/config.h b/win32/config.h index 54be404..18cca8d 100644 --- a/win32/config.h +++ b/win32/config.h @@ -8,9 +8,12 @@ #define HAVE_LOCALE_H 1 #define HAVE_STAT 1 +#define HAVE__PCLOSE 1 +#define HAVE__POPEN 1 +#define HAVE__SNPRINTF 1 +#define HAVE__STRTOI64 1 -#define HAVE_STRUCT_TIMEVAL 1 - +#define HAVE_ICONV 1 #define ICONV_CONST #include