From 8bb8dfe39958d0aa69cfd52b973e11fa4fe3f852 Mon Sep 17 00:00:00 2001 From: yitam Date: Mon, 6 Feb 2017 16:55:39 -0800 Subject: [PATCH 1/2] define SQL_GUID for PECL --- source/shared/core_sqlsrv.h | 3 +++ source/shared/typedefs_for_linux.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/shared/core_sqlsrv.h b/source/shared/core_sqlsrv.h index 9b6c2d2d..1e36e7bc 100644 --- a/source/shared/core_sqlsrv.h +++ b/source/shared/core_sqlsrv.h @@ -131,6 +131,9 @@ OACR_WARNING_POP #include #endif // _WIN32 +//From sqlext.h, add this constant for PECL +#define SQL_GUID (-11) + #if !defined(WC_ERR_INVALID_CHARS) // imported from winnls.h as it isn't included by 5.3.0 #define WC_ERR_INVALID_CHARS 0x00000080 // error for invalid chars diff --git a/source/shared/typedefs_for_linux.h b/source/shared/typedefs_for_linux.h index 45798b86..15113d85 100644 --- a/source/shared/typedefs_for_linux.h +++ b/source/shared/typedefs_for_linux.h @@ -95,9 +95,6 @@ typedef struct _SYSTEMTIME { typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */ -//From sqlext.h -#define SQL_GUID (-11) - size_t mplat_wcslen( const WCHAR * ); #endif // __linux_typedefs__ From 8df3d00f0267a4e6762e8845756e2b6d5420b159 Mon Sep 17 00:00:00 2001 From: yitam Date: Wed, 8 Feb 2017 14:28:04 -0800 Subject: [PATCH 2/2] check if constant defined first --- source/shared/core_sqlsrv.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/shared/core_sqlsrv.h b/source/shared/core_sqlsrv.h index 1e36e7bc..26d96b33 100644 --- a/source/shared/core_sqlsrv.h +++ b/source/shared/core_sqlsrv.h @@ -131,8 +131,10 @@ OACR_WARNING_POP #include #endif // _WIN32 -//From sqlext.h, add this constant for PECL +#if !defined(SQL_GUID) +// imported from sqlext.h #define SQL_GUID (-11) +#endif #if !defined(WC_ERR_INVALID_CHARS) // imported from winnls.h as it isn't included by 5.3.0