modified based on reviews
This commit is contained in:
parent
0860f7086d
commit
a60184f187
|
@ -19,12 +19,6 @@
|
||||||
|
|
||||||
#include "php_sqlsrv.h"
|
#include "php_sqlsrv.h"
|
||||||
|
|
||||||
#ifndef __linux__
|
|
||||||
#include <psapi.h>
|
|
||||||
#include <windows.h>
|
|
||||||
#include <winver.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
|
@ -67,14 +67,6 @@ typedef int socklen_t;
|
||||||
#define HAVE_SOCKLEN_T
|
#define HAVE_SOCKLEN_T
|
||||||
#endif
|
#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)
|
#if defined(_MSC_VER)
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#endif
|
#endif
|
||||||
|
@ -461,16 +453,10 @@ public:
|
||||||
//*********************************************************************************************************************************
|
//*********************************************************************************************************************************
|
||||||
// Logging
|
// 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 ) \
|
#define LOG_FUNCTION( function_name ) \
|
||||||
const char* _FN_ = function_name; \
|
const char* _FN_ = function_name; \
|
||||||
SQLSRV_G( current_subsystem ) = current_log_subsystem; \
|
SQLSRV_G( current_subsystem ) = current_log_subsystem; \
|
||||||
LOG( SEV_NOTICE, "%1!s!: entering", _FN_ );
|
LOG( SEV_NOTICE, "%1!s!: entering", _FN_ );
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SET_FUNCTION_NAME( context ) \
|
#define SET_FUNCTION_NAME( context ) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
// *** header files ***
|
// *** header files ***
|
||||||
#include "php_sqlsrv.h"
|
#include "php_sqlsrv.h"
|
||||||
#ifndef __linux__
|
#ifdef _WIN32
|
||||||
#include <sal.h>
|
#include <sal.h>
|
||||||
#endif
|
#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<char> field_name;
|
||||||
sqlsrv_malloc_auto_ptr<sqlsrv_fetch_field_name> field_names;
|
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 )));
|
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() :
|
SQLSRV_ENCODING encoding = (( stmt->encoding() == SQLSRV_ENCODING_DEFAULT ) ? stmt->conn->encoding() : stmt->encoding());
|
||||||
stmt->encoding());
|
|
||||||
for( int i = 0; i < num_cols; ++i ) {
|
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
|
core::SQLColAttributeW ( stmt, i + 1, SQL_DESC_NAME, field_name_w, ( SS_MAXCOLNAMELEN + 1 ) * 2, &field_name_len_w, NULL
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
|
|
||||||
#include "php_sqlsrv.h"
|
#include "php_sqlsrv.h"
|
||||||
|
|
||||||
#ifndef __linux__
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// current subsytem. defined for the CHECK_SQL_{ERROR|WARNING} macros
|
// current subsytem. defined for the CHECK_SQL_{ERROR|WARNING} macros
|
||||||
|
|
Loading…
Reference in a new issue