1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 05:51:02 +02:00

Check for ushort

This commit is contained in:
Alex Waugh
2001-12-23 14:37:24 +00:00
parent c20deee43d
commit 57d2cec170
2 changed files with 24 additions and 0 deletions

View File

@@ -295,6 +295,24 @@ then
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 @@ AC_TYPE_UID_T
MYSQL_CHECK_ULONG
MYSQL_CHECK_UCHAR
MYSQL_CHECK_UINT
MYSQL_CHECK_USHORT
MYSQL_CHECK_INT_8_16_32
MYSQL_TYPE_ACCEPT

View File

@@ -50,6 +50,11 @@
#include <netinet/in.h>
#endif
#ifndef HAVE_USHORT
#undef ushort
typedef unsigned short ushort;
#endif
/* True globals, no need for thread safety */
static int le_result, le_link, le_plink;