serf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1700679 - /serf/trunk/test/MockHTTPinC/MockHTTP_private.h
Date Tue, 01 Sep 2015 22:25:19 GMT
Author: rhuijben
Date: Tue Sep  1 22:25:19 2015
New Revision: 1700679

URL: http://svn.apache.org/r1700679
Log:
Fix compilation of the test framework with Visual Studio 2015.

* test/MockHTTPinC/MockHTTP_private.h
  Don't redefine the C99 standard type 'bool' for recent Visual Studio versions.

Modified:
    serf/trunk/test/MockHTTPinC/MockHTTP_private.h

Modified: serf/trunk/test/MockHTTPinC/MockHTTP_private.h
URL: http://svn.apache.org/viewvc/serf/trunk/test/MockHTTPinC/MockHTTP_private.h?rev=1700679&r1=1700678&r2=1700679&view=diff
==============================================================================
--- serf/trunk/test/MockHTTPinC/MockHTTP_private.h (original)
+++ serf/trunk/test/MockHTTPinC/MockHTTP_private.h Tue Sep  1 22:25:19 2015
@@ -23,6 +23,15 @@
 #include <apr_time.h>
 #include <apr_thread_proc.h>
 
+#if !defined(HAVE_STDBOOL_H) && defined(_MSC_VER) && (_MSC_VER >= 1800)
+/* VS 2015 errors out when redefining bool */
+#define HAVE_STDBOOL_H 1
+#endif
+
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+
 #include "MockHTTP.h"
 
 #ifdef __cplusplus
@@ -49,7 +58,10 @@ extern "C" {
 
 #define MH_STATUS_INCOMPLETE_REQUEST (MH_STATUS_START + 1)
 
+#ifndef HAVE_STDBOOL_H
 typedef short int bool;
+#endif
+
 static const bool YES = 1;
 static const bool NO = 0;
 



Mime
View raw message