From 267995977d1b2f0008cd7071a68e13e9114be02b Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 11 Oct 2012 01:19:02 -0600 Subject: [PATCH] Windows: better wrap C++-specific code in compat layer --- compat/os/mswindows.h | 2 +- include/squid.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 */ -- 2.47.3