From: Amos Jeffries Date: Thu, 11 Oct 2012 07:19:02 +0000 (-0600) Subject: Windows: better wrap C++-specific code in compat layer X-Git-Tag: SQUID_3_4_0_1~577 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=267995977d1b2f0008cd7071a68e13e9114be02b;p=thirdparty%2Fsquid.git Windows: better wrap C++-specific code in compat layer --- diff --git a/compat/os/mswindows.h b/compat/os/mswindows.h index 5644a28945..9f400e9b82 100644 --- a/compat/os/mswindows.h +++ b/compat/os/mswindows.h @@ -388,7 +388,7 @@ SQUIDCEXTERN int _free_osfhnd(int); SQUIDCEXTERN THREADLOCAL int ws32_result; -#ifdef __cplusplus +#if defined(__cplusplus) inline int close(int fd) diff --git a/include/squid.h b/include/squid.h index b844bddf18..2e9c7d52f6 100644 --- a/include/squid.h +++ b/include/squid.h @@ -114,8 +114,8 @@ /* temp hack: needs to be pre-defined for now. */ #define SQUID_MAXPATHLEN 256 -// TODO: determine if this is required. OR if compat/os/mswin.h works -#if _SQUID_WINDOWS_ +// TODO: determine if this is required. OR if compat/os/mswindows.h works +#if _SQUID_WINDOWS_ && defined(__cplusplus) /** \cond AUTODOCS-IGNORE */ using namespace Squid; /** \endcond */