config-os2.h File Reference

#include <os2.h>
#include <math.h>
#include <io.h>
#include <types.h>

Include dependency graph for config-os2.h:

Include dependency graph

Go to the source code of this file.

Defines

#define SYSTEM_TYPE   "IBM OS/2 Warp"
#define MACHINE_TYPE   "i686"
#define PACKAGE   "mysql"
#define VERSION   MYSQL_SERVER_VERSION
#define MYSQL_UNIX_ADDR   "\\socket\\MySQL"
#define FN_LIBCHAR   '\\'
#define FN_ROOTDIR   "\\"
#define MY_NFILE   1024
#define HAVE_ACCESS
#define DEFAULT_MYSQL_HOME   "c:\\mysql"
#define DEFAULT_BASEDIR   "C:\\"
#define SHAREDIR   "share"
#define DEFAULT_CHARSET_HOME   "C:/mysql/"
#define _POSIX_PATH_MAX   255
#define DWORD   ULONG
#define O_SHARE   0x1000
#define FILE_BINARY   O_BINARY
#define S_IROTH   S_IREAD
#define CANT_DELETE_OPEN_FILES
#define O_NONBLOCK   0x10
#define NO_OPEN_3
#define SIGQUIT   SIGTERM
#define SIGALRM   14
#define NO_FCNTL_NONBLOCK
#define EFBIG   E2BIG
#define EROFS   147
#define sleep(A)   DosSleep((A)*1000)
#define closesocket(A)   soclose(A)
#define F_OK   0
#define W_OK   2
#define bzero(x, y)   memset((x),'\0',(y))
#define bcopy(x, y, z)   memcpy((y),(x),(z))
#define bcmp(x, y, z)   memcmp((y),(x),(z))
#define F_RDLCK   4
#define F_WRLCK   2
#define F_UNLCK   0
#define S_IFMT   0x17000
#define F_TO_EOF   0L
#define HUGE_PTR
#define SIZEOF_OFF_T   8
#define lseek(A, B, C)   _lseek64( A, B, C)
#define tell(A)   _lseek64( A, 0, SEEK_CUR)
#define HAVE_ALLOCA   1
#define HAVE_ST_RDEV   1
#define HAVE_TZNAME   1
#define HAVE_UTIME_NULL   1
#define HAVE_VPRINTF   1
#define RETSIGTYPE   void
#define STACK_DIRECTION   -1
#define STDC_HEADERS   1
#define TIME_WITH_SYS_TIME   1
#define DOT_FRM_VERSION   6
#define FIONREAD_IN_SYS_IOCTL   1
#define FIONREAD_IN_SYS_IOCTL   1
#define HAVE_BOOL   1
#define HAVE_COMPRESS   1
#define HAVE_POSIX_SIGNALS   0
#define HAVE_PTHREAD_ATTR_SETSCOPE   1
#define HAVE_CRYPT   1
#define HAVE_TIMESPEC_TS_SEC   1
#define HAVE_TZNAME   1
#define PROTOCOL_VERSION   10
#define QSORT_TYPE_IS_VOID   1
#define RETQSORTTYPE   void
#define SOCKET_SIZE_TYPE   int
#define SPRINTF_RETURNS_INT   1
#define STRUCT_DIRENT_HAS_D_INO   1
#define THREAD   1
#define VOID_SIGHANDLER   1
#define SIZEOF_CHAR   1
#define SIZEOF_INT   4
#define SIZEOF_LONG   4
#define SIZEOF_LONG_LONG   8
#define HAVE_ALARM   1
#define HAVE_BCMP   1
#define HAVE_BZERO   1
#define HAVE_CHSIZE   1
#define HAVE_DLERROR   1
#define HAVE_DLOPEN   1
#define HAVE_GETCWD   1
#define HAVE_GETPAGESIZE   1
#define HAVE_GETWD   1
#define HAVE_GMTIME_R   1
#define HAVE_INDEX   1
#define HAVE_LOCALTIME_R   1
#define HAVE_LONGJMP   1
#define HAVE_MEMCPY   1
#define HAVE_MEMMOVE   1
#define HAVE_PERROR   1
#define HAVE_PTHREAD_ATTR_SETPRIO   1
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE   1
#define HAVE_PTHREAD_SETPRIO   1
#define HAVE_PTHREAD_SIGMASK   1
#define HAVE_PUTENV   1
#define HAVE_RENAME   1
#define HAVE_RINT   1
#define HAVE_SELECT   1
#define HAVE_SETLOCALE   1
#define HAVE_SOCKET   1
#define HAVE_STRCOLL   1
#define HAVE_STRERROR   1
#define HAVE_STRPBRK   1
#define HAVE_STRSTR   1
#define HAVE_STRTOL   1
#define HAVE_STRTOUL   1
#define HAVE_TCGETATTR   1
#define HAVE_TELL   1
#define HAVE_TEMPNAM   1
#define HAVE_ARPA_INET_H   1
#define HAVE_CRYPT_H   1
#define HAVE_FCNTL_H   1
#define HAVE_FLOAT_H   1
#define HAVE_LIMITS_H   1
#define HAVE_LOCALE_H   1
#define HAVE_MEMORY_H   1
#define HAVE_NETINET_IN_H   1
#define HAVE_STDARG_H   1
#define HAVE_STDDEF_H   1
#define HAVE_STDLIB_H   1
#define HAVE_STRING_H   1
#define HAVE_SYS_IOCTL_H   1
#define HAVE_SYS_SELECT_H   1
#define HAVE_SYS_SOCKET_H   1
#define HAVE_SYS_TIMEB_H   1
#define HAVE_SYS_TYPES_H   1
#define HAVE_SYS_UN_H   1
#define HAVE_SYS_UTIME_H   1
#define HAVE_UNISTD_H   1
#define HAVE_UTIME_H   1
#define HAVE_VARARGS_H   1
#define HAVE_LIBCRYPT   1
#define HAVE_LIBDL   1
#define HAVE_LIBM   1

Typedefs

typedef unsigned long long os_off_t

Functions

double _cdecl rint (double nr)
ULONG TlsAlloc (void)
BOOL TlsFree (ULONG)
PVOID TlsGetValue (ULONG)
BOOL TlsSetValue (ULONG, PVOID)
void * dlopen (char *path, int flag)
char * dlerror (void)
void * dlsym (void *hmod, char *fn)
void dlclose (void *hmod)


Define Documentation

#define _POSIX_PATH_MAX   255
 

#define bcmp x,
y,
 )     memcmp((y),(x),(z))
 

#define bcopy x,
y,
 )     memcpy((y),(x),(z))
 

#define bzero x,
 )     memset((x),'\0',(y))
 

#define CANT_DELETE_OPEN_FILES
 

#define closesocket  )     soclose(A)
 

#define DEFAULT_BASEDIR   "C:\\"
 

#define DEFAULT_CHARSET_HOME   "C:/mysql/"
 

#define DEFAULT_MYSQL_HOME   "c:\\mysql"
 

#define DOT_FRM_VERSION   6
 

#define DWORD   ULONG
 

#define EFBIG   E2BIG
 

#define EROFS   147
 

#define F_OK   0
 

#define F_RDLCK   4
 

#define F_TO_EOF   0L
 

#define F_UNLCK   0
 

#define F_WRLCK   2
 

#define FILE_BINARY   O_BINARY
 

#define FIONREAD_IN_SYS_IOCTL   1
 

#define FIONREAD_IN_SYS_IOCTL   1
 

#define FN_LIBCHAR   '\\'
 

#define FN_ROOTDIR   "\\"
 

#define HAVE_ACCESS
 

#define HAVE_ALARM   1
 

#define HAVE_ALLOCA   1
 

#define HAVE_ARPA_INET_H   1
 

#define HAVE_BCMP   1
 

#define HAVE_BOOL   1
 

#define HAVE_BZERO   1
 

#define HAVE_CHSIZE   1
 

#define HAVE_COMPRESS   1
 

#define HAVE_CRYPT   1
 

#define HAVE_CRYPT_H   1
 

#define HAVE_DLERROR   1
 

#define HAVE_DLOPEN   1
 

#define HAVE_FCNTL_H   1
 

#define HAVE_FLOAT_H   1
 

#define HAVE_GETCWD   1
 

#define HAVE_GETPAGESIZE   1
 

#define HAVE_GETWD   1
 

#define HAVE_GMTIME_R   1
 

#define HAVE_INDEX   1
 

#define HAVE_LIBCRYPT   1
 

#define HAVE_LIBDL   1
 

#define HAVE_LIBM   1
 

#define HAVE_LIMITS_H   1
 

#define HAVE_LOCALE_H   1
 

#define HAVE_LOCALTIME_R   1
 

#define HAVE_LONGJMP   1
 

#define HAVE_MEMCPY   1
 

#define HAVE_MEMMOVE   1
 

#define HAVE_MEMORY_H   1
 

#define HAVE_NETINET_IN_H   1
 

#define HAVE_PERROR   1
 

#define HAVE_POSIX_SIGNALS   0
 

#define HAVE_PTHREAD_ATTR_SETPRIO   1
 

#define HAVE_PTHREAD_ATTR_SETSCOPE   1
 

#define HAVE_PTHREAD_ATTR_SETSTACKSIZE   1
 

#define HAVE_PTHREAD_SETPRIO   1
 

#define HAVE_PTHREAD_SIGMASK   1
 

#define HAVE_PUTENV   1
 

#define HAVE_RENAME   1
 

#define HAVE_RINT   1
 

#define HAVE_SELECT   1
 

#define HAVE_SETLOCALE   1
 

#define HAVE_SOCKET   1
 

#define HAVE_ST_RDEV   1
 

#define HAVE_STDARG_H   1
 

#define HAVE_STDDEF_H   1
 

#define HAVE_STDLIB_H   1
 

#define HAVE_STRCOLL   1
 

#define HAVE_STRERROR   1
 

#define HAVE_STRING_H   1
 

#define HAVE_STRPBRK   1
 

#define HAVE_STRSTR   1
 

#define HAVE_STRTOL   1
 

#define HAVE_STRTOUL   1
 

#define HAVE_SYS_IOCTL_H   1
 

#define HAVE_SYS_SELECT_H   1
 

#define HAVE_SYS_SOCKET_H   1
 

#define HAVE_SYS_TIMEB_H   1
 

#define HAVE_SYS_TYPES_H   1
 

#define HAVE_SYS_UN_H   1
 

#define HAVE_SYS_UTIME_H   1
 

#define HAVE_TCGETATTR   1
 

#define HAVE_TELL   1
 

#define HAVE_TEMPNAM   1
 

#define HAVE_TIMESPEC_TS_SEC   1
 

#define HAVE_TZNAME   1
 

#define HAVE_TZNAME   1
 

#define HAVE_UNISTD_H   1
 

#define HAVE_UTIME_H   1
 

#define HAVE_UTIME_NULL   1
 

#define HAVE_VARARGS_H   1
 

#define HAVE_VPRINTF   1
 

#define HUGE_PTR
 

#define lseek A,
B,
 )     _lseek64( A, B, C)
 

#define MACHINE_TYPE   "i686"
 

#define MY_NFILE   1024
 

#define MYSQL_UNIX_ADDR   "\\socket\\MySQL"
 

#define NO_FCNTL_NONBLOCK
 

#define NO_OPEN_3
 

#define O_NONBLOCK   0x10
 

#define O_SHARE   0x1000
 

#define PACKAGE   "mysql"
 

#define PROTOCOL_VERSION   10
 

#define QSORT_TYPE_IS_VOID   1
 

#define RETQSORTTYPE   void
 

#define RETSIGTYPE   void
 

#define S_IFMT   0x17000
 

#define S_IROTH   S_IREAD
 

#define SHAREDIR   "share"
 

#define SIGALRM   14
 

#define SIGQUIT   SIGTERM
 

#define SIZEOF_CHAR   1
 

#define SIZEOF_INT   4
 

#define SIZEOF_LONG   4
 

#define SIZEOF_LONG_LONG   8
 

#define SIZEOF_OFF_T   8
 

#define sleep  )     DosSleep((A)*1000)
 

#define SOCKET_SIZE_TYPE   int
 

#define SPRINTF_RETURNS_INT   1
 

#define STACK_DIRECTION   -1
 

#define STDC_HEADERS   1
 

#define STRUCT_DIRENT_HAS_D_INO   1
 

#define SYSTEM_TYPE   "IBM OS/2 Warp"
 

#define tell  )     _lseek64( A, 0, SEEK_CUR)
 

#define THREAD   1
 

#define TIME_WITH_SYS_TIME   1
 

#define VERSION   MYSQL_SERVER_VERSION
 

#define VOID_SIGHANDLER   1
 

#define W_OK   2
 


Typedef Documentation

typedef unsigned long long os_off_t
 


Function Documentation

void dlclose void *  hmod  ) 
 

00069 {
00070    APIRET  rc;
00071 
00072    rc = DosFreeModule( (HMODULE) hmod);
00073 
00074 }

char * dlerror void   ) 
 

00052 {
00053    return fail;
00054 }

void * dlopen char *  path,
int  flag
 

00040 {
00041    APIRET  rc;
00042    HMODULE hmod;
00043 
00044    rc = DosLoadModule( fail, sizeof( fail), path, &hmod);
00045    if (rc)
00046       return NULL;
00047 
00048    return (void*) hmod;
00049 }

void * dlsym void *  hmod,
char *  fn
 

00057 {
00058    APIRET  rc;
00059    PFN     addr;
00060 
00061    rc = DosQueryProcAddr( (HMODULE) hmod, 0l, fn, &addr);
00062    if (rc)
00063       return NULL;
00064 
00065    return (void*) addr;
00066 }

double _cdecl rint double  nr  ) 
 

00190 {
00191   double f = floor(nr);
00192   double c = ceil(nr);
00193   return (((c-nr) >= (nr-f)) ? f :c);
00194 }

DWORD TlsAlloc void   ) 
 

00035 {
00036   DWORD index = -1;
00037   DWORD mask, tibidx;
00038   int    i;
00039 
00040   if (tls_storage == NULL)
00041   {
00042 
00043     APIRET rc;
00044 
00045     /* allocate memory for TLS storage */
00046     rc = DosAllocThreadLocalMemory( 1, &tls_storage);
00047     if (rc)
00048       fprintf( stderr, "DosAllocThreadLocalMemory error: return code = %u\n",
00049                rc);
00050     /* create a mutex */
00051     if (pthread_mutex_init( &tls_mutex, NULL))
00052       fprintf( stderr, "Failed to init TLS mutex\n");
00053   }
00054 
00055   pthread_mutex_lock( &tls_mutex);
00056 
00057   tibidx = 0;
00058   if (tls_bits[0] == 0xFFFFFFFF)
00059   {
00060     if (tls_bits[1] == 0xFFFFFFFF)
00061     {
00062       fprintf( stderr, "tid#%d, no more TLS bits available\n", _threadid);
00063       pthread_mutex_unlock( &tls_mutex);
00064       return -1;
00065     }
00066     tibidx = 1;
00067   }
00068 
00069   for (i=0; i<32; i++)
00070   {
00071     mask = (1 << i);
00072     if ((tls_bits[ tibidx] & mask) == 0)
00073     {
00074       tls_bits[ tibidx] |= mask;
00075       index = (tibidx*32) + i;
00076       break;
00077     }
00078   }
00079   tls_storage[index] = 0;
00080 
00081   pthread_mutex_unlock( &tls_mutex);
00082   /* fprintf( stderr, "tid#%d, TlsAlloc index %d\n", _threadid, index); */
00083   return index;
00084 }

BOOL TlsFree ULONG   ) 
 

PVOID TlsGetValue ULONG   ) 
 

BOOL TlsSetValue ULONG  ,
PVOID 
 


Generated on Thu Feb 24 10:23:12 2005 for MySQL by  doxygen 1.3.9.1