From: Amos Jeffries Date: Sun, 7 Aug 2011 09:22:28 +0000 (+1200) Subject: Windows: shuffle win32lib into libcompat X-Git-Tag: take08~55^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0a1238e76c7a5f5fa5c57df95e7ab9280c54c982;p=thirdparty%2Fsquid.git Windows: shuffle win32lib into libcompat --- diff --git a/compat/Makefile.am b/compat/Makefile.am index f3e11fb387..cb60e69580 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -56,8 +56,9 @@ libcompat_squid_a_SOURCES = \ os/freebsd.h \ os/hpux.h \ os/linux.h \ - os/mswin.h \ os/macosx.h \ + os/mswin.h \ + mswin.cc \ os/netbsd.h \ os/next.h \ os/openbsd.h \ diff --git a/lib/win32lib.c b/compat/mswin.cc similarity index 99% rename from lib/win32lib.c rename to compat/mswin.cc index 41ad5b78cd..7538299ea7 100644 --- a/lib/win32lib.c +++ b/compat/mswin.cc @@ -38,8 +38,8 @@ #include "util.h" /* The following code section is part of an EXPERIMENTAL native */ -/* Windows NT/2000 Squid port - Compiles only on MS Visual C++ */ -#if defined(_SQUID_MSWIN_) +/* Windows NT/2000 Squid port - Compiles only on MS Visual C++ or MinGW */ +#if _SQUID_MSWIN_ || _SQUID_MINGW_ #undef strerror #define sys_nerr _sys_nerr diff --git a/lib/Makefile.am b/lib/Makefile.am index 11bbba253f..1dcf63564b 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -20,10 +20,8 @@ install-strip: all if ENABLE_WIN32SPECIFIC LIBSSPWIN32=libsspwin32.la -WIN32SRC = win32lib.c else LIBSSPWIN32= -WIN32SRC= EXTRA_LTLIBRARIES = \ libsspwin32.la endif @@ -40,8 +38,7 @@ noinst_LTLIBRARIES = \ EXTRA_libmiscutil_la_SOURCES = \ dirent.c \ encrypt.c \ - getopt.c \ - win32lib.c + getopt.c libmiscencoding_la_SOURCES = \ base64.c \ @@ -72,8 +69,7 @@ libmiscutil_la_SOURCES = \ Splay.cc \ stub_memaccount.c \ util.c \ - xusleep.c \ - $(WIN32SRC) + xusleep.c # $(top_srcdir)/include/version.h should be a dependency libsspwin32_la_SOURCES = \