cvs: php4 /ext/mysql php_mysql.c /ext/mysql/libmysql acinclude.m4
| From: | Alex Waugh | Date: | Sun, 23 Dec 2001 14:37:25 +0000 |
| Subject: | cvs: php4 /ext/mysql php_mysql.c /ext/mysql/libmysql acinclude.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-8787@lists.php.net to get a copy of this message | ||
alexwaugh Sun Dec 23 09:37:25 2001 EDT
Modified files:
/php4/ext/mysql php_mysql.c
/php4/ext/mysql/libmysql acinclude.m4
Log:
Check for ushort
Index: php4/ext/mysql/php_mysql.c
diff -u php4/ext/mysql/php_mysql.c:1.113 php4/ext/mysql/php_mysql.c:1.114
--- php4/ext/mysql/php_mysql.c:1.113 Sat Dec 15 12:09:37 2001
+++ php4/ext/mysql/php_mysql.c Sun Dec 23 09:37:24 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mysql.c,v 1.113 2001/12/15 17:09:37 zeev Exp $ */
+/* $Id: php_mysql.c,v 1.114 2001/12/23 14:37:24 alexwaugh Exp $ */
/* TODO:
@@ -48,6 +48,11 @@
#endif
#include <netdb.h>
#include <netinet/in.h>
+#endif
+
+#ifndef HAVE_USHORT
+#undef ushort
+typedef unsigned short ushort;
#endif
/* True globals, no need for thread safety */
Index: php4/ext/mysql/libmysql/acinclude.m4
diff -u php4/ext/mysql/libmysql/acinclude.m4:1.6 php4/ext/mysql/libmysql/acinclude.m4:1.7
--- php4/ext/mysql/libmysql/acinclude.m4:1.6 Sat Dec 22 19:41:27 2001
+++ php4/ext/mysql/libmysql/acinclude.m4 Sun Dec 23 09:37:24 2001
@@ -295,6 +295,24 @@
fi
])
+AC_DEFUN(MYSQL_CHECK_USHORT,
+[AC_MSG_CHECKING(for type ushort)
+AC_CACHE_VAL(ac_cv_ushort,
+[AC_TRY_RUN([#include <stdio.h>
+#include <sys/types.h>
+main()
+{
+ ushort foo;
+ foo++;
+ exit(0);
+}], ac_cv_ushort=yes, ac_cv_ushort=no, ac_cv_ushort=no)])
+AC_MSG_RESULT($ac_cv_ushort)
+if test "$ac_cv_ushort" = "yes"
+then
+ AC_DEFINE(HAVE_USHORT,,[ ])
+fi
+])
+
AC_DEFUN(MYSQL_CHECK_INT_8_16_32,
[AC_MSG_CHECKING([for int8])
AC_CACHE_VAL(ac_cv_int8,
@@ -352,6 +370,7 @@
MYSQL_CHECK_ULONG
MYSQL_CHECK_UCHAR
MYSQL_CHECK_UINT
+MYSQL_CHECK_USHORT
MYSQL_CHECK_INT_8_16_32
MYSQL_TYPE_ACCEPT