From 21245bcbeb21df35441d3e1d8afc54f5d4fe8225 Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 12 Jul 2002 22:57:19 +0000 Subject: [PATCH] Some ws fixes. And removed the problems causing typedef for ushort. --- ext/mysql/php_mysql.c | 57 ++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 33 deletions(-) diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 53e954f8e9..866be100d5 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -18,55 +18,47 @@ /* $Id$ */ - /* TODO: * * ? Safe mode implementation */ #ifdef HAVE_CONFIG_H -#include "config.h" +# include "config.h" #endif #include "php.h" #include "php_globals.h" -#include "php_mysql.h" #include "ext/standard/info.h" #include "ext/standard/php_string.h" #if HAVE_MYSQL #ifdef PHP_WIN32 -#include -#define signal(a, b) NULL +# include +# define signal(a, b) NULL #elif defined(NETWARE) -#include -#define signal(a, b) NULL +# include +# define signal(a, b) NULL #else -#include "build-defs.h" -#if HAVE_SIGNAL_H -#include -#endif - -#if HAVE_SYS_TYPES_H -#include -#endif -#include -#include +# include "build-defs.h" +# if HAVE_SIGNAL_H +# include +# endif +# if HAVE_SYS_TYPES_H +# include +# endif +# include +# include #endif -#ifndef HAVE_USHORT -#undef ushort -typedef unsigned short ushort; -#endif +#include +#include "php_ini.h" +#include "php_mysql.h" /* True globals, no need for thread safety */ static int le_result, le_link, le_plink; -#include "php_ini.h" - -# include - #ifdef HAVE_MYSQL_REAL_CONNECT # ifdef HAVE_ERRMSG_H # include @@ -76,13 +68,13 @@ static int le_result, le_link, le_plink; #define SAFE_STRING(s) ((s)?(s):"") #if MYSQL_VERSION_ID > 32199 -#define mysql_row_length_type unsigned long -#define HAVE_MYSQL_ERRNO +# define mysql_row_length_type unsigned long +# define HAVE_MYSQL_ERRNO #else -#define mysql_row_length_type unsigned int -# ifdef mysql_errno -# define HAVE_MYSQL_ERRNO -# endif +# define mysql_row_length_type unsigned int +# ifdef mysql_errno +# define HAVE_MYSQL_ERRNO +# endif #endif #if MYSQL_VERSION_ID >= 32032 @@ -121,7 +113,6 @@ static int _rollback_mysql_transactions(zend_rsrc_list_entry *rsrc TSRMLS_DC) { php_mysql_conn *link; char query[128]; - int i; /* check if its a persistent link */ if (Z_TYPE_P(rsrc) != le_plink) @@ -153,7 +144,7 @@ function_entry mysql_functions[] = { PHP_FE(mysql_list_dbs, NULL) PHP_FE(mysql_list_tables, NULL) PHP_FE(mysql_list_fields, NULL) - PHP_FE(mysql_list_processes, NULL) + PHP_FE(mysql_list_processes, NULL) PHP_FE(mysql_error, NULL) #ifdef HAVE_MYSQL_ERRNO PHP_FE(mysql_errno, NULL) -- 2.40.0