Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang compile errors. #289

Merged
merged 1 commit into from
Feb 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions source/shared/localization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@
#include "typedefs_for_linux.h"

#ifdef MPLAT_UNIX
namespace std
{
// Forward reference
class locale;
}
#include <locale>
#endif


#define CP_UTF8 65001
#define CP_UTF16 1200
#define CP_UTF32 12000
Expand Down
2 changes: 1 addition & 1 deletion source/sqlsrv/conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ int get_stmt_option_key( zend_string* key, size_t key_len TSRMLS_DC );

// constants for parameters used by process_params function(s)
int ss_sqlsrv_conn::descriptor;
char* ss_sqlsrv_conn::resource_name = static_cast<char *>("ss_sqlsrv_conn");
const char* ss_sqlsrv_conn::resource_name = "ss_sqlsrv_conn";

// connection specific parameter proccessing. Use the generic function specialised to return a connection
// resource.
Expand Down
6 changes: 3 additions & 3 deletions source/sqlsrv/php_sqlsrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ struct ss_sqlsrv_conn : sqlsrv_conn
bool in_transaction; // flag set when inside a transaction and used for checking validity of tran API calls

// static variables used in process_params
static char* resource_name; // char because const char forces casting all over the place. Just easier to leave it char here.
static const char* resource_name;
static int descriptor;

// initialize with default values
Expand Down Expand Up @@ -184,7 +184,7 @@ struct ss_sqlsrv_stmt : public sqlsrv_stmt {
int fetch_fields_count;

// static variables used in process_params
static char* resource_name; // char because const char forces casting all over the place in ODBC functions
static const char* resource_name;
static int descriptor;

};
Expand Down Expand Up @@ -490,7 +490,7 @@ namespace ss {
}
};

inline void zend_register_resource(_Out_ zval& rsrc_result, void* rsrc_pointer, int rsrc_type, char* rsrc_name TSRMLS_DC)
inline void zend_register_resource(_Out_ zval& rsrc_result, void* rsrc_pointer, int rsrc_type, const char* rsrc_name TSRMLS_DC)
{
int zr = (NULL != (Z_RES(rsrc_result) = ::zend_register_resource(rsrc_pointer, rsrc_type)) ? SUCCESS : FAILURE);
CHECK_CUSTOM_ERROR(( zr == FAILURE ), reinterpret_cast<sqlsrv_context*>( rsrc_pointer ), SS_SQLSRV_ERROR_REGISTER_RESOURCE,
Expand Down
2 changes: 1 addition & 1 deletion source/sqlsrv/stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//
// our resource descriptor assigned in minit
int ss_sqlsrv_stmt::descriptor = 0;
char* ss_sqlsrv_stmt::resource_name = static_cast<char *>("ss_sqlsrv_stmt"); // not const for a reason. see sqlsrv_stmt in php_sqlsrv.h
const char* ss_sqlsrv_stmt::resource_name = "ss_sqlsrv_stmt";

namespace {

Expand Down