modified based on reviews

This commit is contained in:
yitam 2017-01-19 14:43:00 -08:00
parent 0860f7086d
commit a60184f187
4 changed files with 2 additions and 27 deletions

View file

@ -19,12 +19,6 @@
#include "php_sqlsrv.h"
#ifndef __linux__
#include <psapi.h>
#include <windows.h>
#include <winver.h>
#endif
#include <string>
#include <sstream>

View file

@ -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 ) \
{ \

View file

@ -19,7 +19,7 @@
// *** header files ***
#include "php_sqlsrv.h"
#ifndef __linux__
#ifdef _WIN32
#include <sal.h>
#endif
@ -1821,8 +1821,7 @@ void fetch_fields_common( _Inout_ ss_sqlsrv_stmt* stmt, zend_long fetch_type, _O
sqlsrv_malloc_auto_ptr<char> field_name;
sqlsrv_malloc_auto_ptr<sqlsrv_fetch_field_name> field_names;
field_names = static_cast<sqlsrv_fetch_field_name*>( 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

View file

@ -21,10 +21,6 @@
#include "php_sqlsrv.h"
#ifndef __linux__
#include <windows.h>
#endif
namespace {
// current subsytem. defined for the CHECK_SQL_{ERROR|WARNING} macros