summaryrefslogtreecommitdiff
path: root/ext/mysql/php_mysql.c
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2002-07-12 22:57:19 +0000
committerfoobar <sniper@php.net>2002-07-12 22:57:19 +0000
commit21245bcbeb21df35441d3e1d8afc54f5d4fe8225 (patch)
tree83ce341e00f6da13bf36e94192e613a9e7532a64 /ext/mysql/php_mysql.c
parent48634e402662f45721c61318ec9cb015e00953f6 (diff)
downloadphp-git-21245bcbeb21df35441d3e1d8afc54f5d4fe8225.tar.gz
Some ws fixes. And removed the problems causing typedef for ushort.
Diffstat (limited to 'ext/mysql/php_mysql.c')
-rw-r--r--ext/mysql/php_mysql.c57
1 files 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 <winsock.h>
-#define signal(a, b) NULL
+# include <winsock.h>
+# define signal(a, b) NULL
#elif defined(NETWARE)
-#include <sys/socket.h>
-#define signal(a, b) NULL
+# include <sys/socket.h>
+# define signal(a, b) NULL
#else
-#include "build-defs.h"
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#include <netdb.h>
-#include <netinet/in.h>
+# include "build-defs.h"
+# if HAVE_SIGNAL_H
+# include <signal.h>
+# endif
+# if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+# include <netdb.h>
+# include <netinet/in.h>
#endif
-#ifndef HAVE_USHORT
-#undef ushort
-typedef unsigned short ushort;
-#endif
+#include <mysql.h>
+#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 <mysql.h>
-
#ifdef HAVE_MYSQL_REAL_CONNECT
# ifdef HAVE_ERRMSG_H
# include <errmsg.h>
@@ -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)