diff --git a/source/sqlsrv/conn.cpp b/source/sqlsrv/conn.cpp index 84d246fa..59a2479f 100644 --- a/source/sqlsrv/conn.cpp +++ b/source/sqlsrv/conn.cpp @@ -19,12 +19,6 @@ #include "php_sqlsrv.h" -#ifndef __linux__ -#include -#include -#include -#endif - #include #include diff --git a/source/sqlsrv/php_sqlsrv.h b/source/sqlsrv/php_sqlsrv.h index e598fb91..1aadb95b 100644 --- a/source/sqlsrv/php_sqlsrv.h +++ b/source/sqlsrv/php_sqlsrv.h @@ -67,14 +67,6 @@ typedef int socklen_t; #define HAVE_SOCKLEN_T #endif -#ifndef __linux__ -#include "php.h" -#include "php_globals.h" -#include "php_ini.h" -#include "ext/standard/php_standard.h" -#include "ext/standard/info.h" -#endif - #if defined(_MSC_VER) #pragma warning(pop) #endif @@ -461,16 +453,10 @@ public: //********************************************************************************************************************************* // Logging //********************************************************************************************************************************* -#ifdef __linux__ -#define LOG_FUNCTION( function_name ) \ - const char* _FN_ = function_name; \ - LOG( SEV_NOTICE, "%1!s!: entering", _FN_ ); -#else #define LOG_FUNCTION( function_name ) \ const char* _FN_ = function_name; \ SQLSRV_G( current_subsystem ) = current_log_subsystem; \ LOG( SEV_NOTICE, "%1!s!: entering", _FN_ ); -#endif #define SET_FUNCTION_NAME( context ) \ { \ diff --git a/source/sqlsrv/stmt.cpp b/source/sqlsrv/stmt.cpp index 08d6793b..99ffc73b 100644 --- a/source/sqlsrv/stmt.cpp +++ b/source/sqlsrv/stmt.cpp @@ -19,7 +19,7 @@ // *** header files *** #include "php_sqlsrv.h" -#ifndef __linux__ +#ifdef _WIN32 #include #endif @@ -1821,8 +1821,7 @@ void fetch_fields_common( _Inout_ ss_sqlsrv_stmt* stmt, zend_long fetch_type, _O sqlsrv_malloc_auto_ptr field_name; sqlsrv_malloc_auto_ptr field_names; field_names = static_cast( sqlsrv_malloc( num_cols * sizeof( sqlsrv_fetch_field_name ))); - SQLSRV_ENCODING encoding = (( stmt->encoding() == SQLSRV_ENCODING_DEFAULT ) ? stmt->conn->encoding() : - stmt->encoding()); + SQLSRV_ENCODING encoding = (( stmt->encoding() == SQLSRV_ENCODING_DEFAULT ) ? stmt->conn->encoding() : stmt->encoding()); for( int i = 0; i < num_cols; ++i ) { core::SQLColAttributeW ( stmt, i + 1, SQL_DESC_NAME, field_name_w, ( SS_MAXCOLNAMELEN + 1 ) * 2, &field_name_len_w, NULL diff --git a/source/sqlsrv/util.cpp b/source/sqlsrv/util.cpp index ddd8365d..81eaa242 100644 --- a/source/sqlsrv/util.cpp +++ b/source/sqlsrv/util.cpp @@ -21,10 +21,6 @@ #include "php_sqlsrv.h" -#ifndef __linux__ -#include -#endif - namespace { // current subsytem. defined for the CHECK_SQL_{ERROR|WARNING} macros