diff options
author | MySQL Team <mysql@php.net> | 2001-01-23 16:48:50 +0000 |
---|---|---|
committer | MySQL Team <mysql@php.net> | 2001-01-23 16:48:50 +0000 |
commit | 800f555b707c696798877c80352ded46289e87c4 (patch) | |
tree | c540242b6e6da4e9b99b46797a26b215abef0a64 /ext/mysql/libmysql/global.h | |
parent | d36858681a0d48414702524ebd16f31289b06fa8 (diff) | |
download | php-git-800f555b707c696798877c80352ded46289e87c4.tar.gz |
Upgrade ext/mysql/libmysql to version 3.23.32. One notable bug fix is
that the client can now connect to a server which is using a default
charset other than latin1.
Diffstat (limited to 'ext/mysql/libmysql/global.h')
-rw-r--r-- | ext/mysql/libmysql/global.h | 56 |
1 files changed, 45 insertions, 11 deletions
diff --git a/ext/mysql/libmysql/global.h b/ext/mysql/libmysql/global.h index 4d035d3c6b..94427003ca 100644 --- a/ext/mysql/libmysql/global.h +++ b/ext/mysql/libmysql/global.h @@ -7,7 +7,14 @@ This file is public domain and comes with NO WARRANTY of any kind */ #ifndef _global_h #define _global_h -#if defined(_WIN32) || defined(_WIN64) +#if defined( __EMX__) && !defined( MYSQL_SERVER) +/* moved here to use below VOID macro redefinition */ +#define INCL_BASE +#define INCL_NOPMAPI +#include <os2.h> +#endif /* __EMX__ */ + +#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32) #include <config-win.h> #else #include <my_config.h> @@ -18,6 +25,12 @@ This file is public domain and comes with NO WARRANTY of any kind */ #endif #endif /* _cplusplus */ +/* Fix problem with S_ISLNK() on Linux */ +#if defined(HAVE_LINUXTHREADS) +#undef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif + /* The client defines this to avoid all thread code */ #if defined(UNDEF_THREADS_HACK) #undef THREAD @@ -35,12 +48,11 @@ This file is public domain and comes with NO WARRANTY of any kind */ #ifndef __STDC_EXT__ #define __STDC_EXT__ 1 /* To get large file support on hpux */ #endif -#if defined(THREAD) && defined(HAVE_LINUXTHREADS) && defined(HAVE_PTHREAD_RWLOCK_RDLOCK) -#define _GNU_SOURCE 1 -#endif #if defined(THREAD) && !defined(__WIN__) +#ifndef _POSIX_PTHREAD_SEMANTICS #define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */ +#endif /* was #if defined(HAVE_LINUXTHREADS) || defined(HAVE_DEC_THREADS) || defined(HPUX) */ #if !defined(SCO) #define _REENTRANT 1 /* Some thread libraries require this */ @@ -94,13 +106,13 @@ This file is public domain and comes with NO WARRANTY of any kind */ #endif /* In Linux-alpha we have atomic.h if we are using gcc */ -#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__alpha__) && (__GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)) +#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__alpha__) && (__GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)) && !defined(HAVE_ATOMIC_ADD) #define HAVE_ATOMIC_ADD #define HAVE_ATOMIC_SUB #endif /* In Linux-ia64 including atomic.h will give us an error */ -#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__ia64__) +#if (defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__ia64__)) || !defined(THREAD) #undef HAVE_ATOMIC_ADD #undef HAVE_ATOMIC_SUB #endif @@ -325,6 +337,10 @@ typedef int (*qsort_cmp)(const void *,const void *); typedef SOCKET_SIZE_TYPE size_socket; #endif +#ifndef SOCKOPT_OPTLEN_TYPE +#define SOCKOPT_OPTLEN_TYPE size_socket +#endif + /* file create flags */ #ifndef O_SHARE @@ -365,9 +381,14 @@ typedef SOCKET_SIZE_TYPE size_socket; #define FN_DEVCHAR ':' #ifndef FN_LIBCHAR +#ifdef __EMX__ +#define FN_LIBCHAR '\\' +#define FN_ROOTDIR "\\" +#else #define FN_LIBCHAR '/' #define FN_ROOTDIR "/" -#define MY_NFILE 127 /* This is only used to save filenames */ +#endif +#define MY_NFILE 1024 /* This is only used to save filenames */ #endif /* #define EXT_IN_LIBNAME */ @@ -450,6 +471,8 @@ extern double my_atof(const char*); #undef HAVE_MLOCK #undef HAVE_TEMPNAM /* Use ours */ #undef HAVE_PTHREAD_SETPRIO +#undef HAVE_FTRUNCATE +#undef HAVE_READLINK #endif /* This is from the old m-machine.h file */ @@ -666,10 +689,14 @@ typedef char bool; /* Ordinary boolean values 0 1 */ *((T)+4)=(uchar) (((A) >> 32)); } #define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) -#define doubleget(V,M) { *((long *) &V) = *((long*) M); \ - *(((long *) &V)+1) = *(((long*) M)+1); } -#define doublestore(T,V) { *((long *) T) = *((long*) &V); \ - *(((long *) T)+1) = *(((long*) &V)+1); } +typedef union { + double v; + long m[2]; +} doubleget_union; +#define doubleget(V,M) { ((doubleget_union *)&V)->m[0] = *((long*) M); \ + ((doubleget_union *)&V)->m[1] = *(((long*) M)+1); } +#define doublestore(T,V) { *((long *) T) = ((doubleget_union *)&V)->m[0]; \ + *(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; } #define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } #define float8get(V,M) doubleget((V),(M)) #define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) @@ -839,5 +866,12 @@ typedef char bool; /* Ordinary boolean values 0 1 */ #endif #endif +#ifndef THREAD +#define thread_safe_increment(V,L) (V)++ +#define thread_safe_add(V,C,L) (V)+=(C) +#define thread_safe_sub(V,C,L) (V)-=(C) +#define statistic_increment(V,L) (V)++ +#define statistic_add(V,C,L) (V)+=(C) +#endif #endif /* _global_h */ |