summaryrefslogtreecommitdiff
path: root/databases/sqlrelay/patches/patch-src_api_php_sql__relay.cpp
blob: 48f3acf8c4f8812e47526bb9dbf36d963489698e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$NetBSD: patch-src_api_php_sql__relay.cpp,v 1.4 2016/07/01 17:02:39 fhajny Exp $

--- src/api/php/sql_relay.cpp.orig	2016-03-13 19:20:25.000000000 +0000
+++ src/api/php/sql_relay.cpp
@@ -24,39 +24,15 @@
 	#define ZTS 1
 #endif
 
-extern "C" {
-	#ifndef WIN32
-
-		// On some platforms (solaris), stdio.h must be included prior
-		// to including math.h or FILE will get redefined.
-		#include <stdio.h>
-
-		// php.h ultimately includes math.h and on some platforms,
-		// __cplusplus to be defined when including it.  Manually
-		// including it prior to including php.h solves this problem.
-		#include <math.h>
-
-		#ifdef __cplusplus
-			#undef __cplusplus
-			#define cpluspluswasdefined
-		#endif
-		#ifndef HAVE_SOCKLEN_T
-			#define HAVE_SOCKLEN_T
-		#endif
-		#ifndef _WCHAR_T_DECLARED
-			#define _WCHAR_T_DECLARED
-		#endif
-		#ifndef _WCHAR_T_DEFINED_
-			#define _WCHAR_T_DEFINED_
-		#endif
-	#endif
-	#include <php.h>
-	#ifndef WIN32
-		#ifdef cpluspluswasdefined
-			#define __cplusplus
-		#endif
-	#endif
-}
+// On some platforms (solaris), stdio.h must be included prior
+// to including math.h or FILE will get redefined.
+#include <stdio.h>
+
+// php.h ultimately includes math.h and on some platforms,
+// __cplusplus to be defined when including it.  Manually
+// including it prior to including php.h solves this problem.
+#include <math.h>
+#include <php.h>
 
 #include <config.h>