mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / include / config-netware.h
blob68a67e800ef6d2c520069c48b520ef7c0a4d7433
1 /*
2 Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 /* Header for NetWare compatible with MySQL */
20 #ifndef _config_netware_h
21 #define _config_netware_h
23 #define __event_h__
24 #define _EVENT_H_
25 /*
26 These two #define(s) are needed as both libc of NetWare and MySQL have
27 files named event.h which causes compilation errors.
31 /* required headers */
32 #include <unistd.h>
33 #include <stdio.h>
34 #include <errno.h>
35 #include <screen.h>
36 #include <limits.h>
37 #include <signal.h>
38 #include <errno.h>
39 #include <stdbool.h>
40 #include <stdlib.h>
41 #include <sys/types.h>
42 #include <time.h>
43 #include <sys/time.h>
44 #include <pthread.h>
45 #include <termios.h>
47 #undef _EVENT_H_
48 /*
49 This #undef exists here because both libc of NetWare and MySQL have
50 files named event.h which causes compilation errors.
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
57 /* required adjustments */
58 #undef HAVE_READDIR_R
59 #undef HAVE_RWLOCK_INIT
60 #undef HAVE_SCHED_H
61 #undef HAVE_SYS_MMAN_H
62 #undef HAVE_SYNCH_H
63 #undef HAVE_MMAP
64 #undef HAVE_RINT
66 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
67 #define HAVE_PTHREAD_SIGMASK 1
68 #define HAVE_PTHREAD_YIELD_ZERO_ARG 1
69 #define HAVE_BROKEN_REALPATH 1
71 /* changes made to make use of LibC-June-2004 for building purpose */
72 #undef HAVE_POSIX_SIGNALS
73 #undef HAVE_PTHREAD_ATTR_SETSCOPE
74 #undef HAVE_ALLOC_A
75 #undef HAVE_FINITE
76 #undef HAVE_GETPWNAM
77 #undef HAVE_GETPWUID
78 #undef HAVE_PTHREAD_SETSCHEDPARAM
79 #undef HAVE_READLINK
80 #undef HAVE_STPCPY
81 /* changes end */
83 /* Changes made to make use of LibC-June-2005 for building purpose */
84 #undef HAVE_GETPASS
85 #undef HAVE_GETRLIMIT
86 #undef HAVE_GETRUSAGE
87 #undef HAVE_INITGROUPS
88 /* Changes end - LibC-June-2005 */
90 /* no libc crypt() function */
91 #ifdef HAVE_OPENSSL
92 #define HAVE_CRYPT 1
93 #else
94 #undef HAVE_CRYPT
95 #endif /* HAVE_OPENSSL */
97 /* Netware has an ancient zlib */
98 #undef HAVE_COMPRESS
99 #define HAVE_COMPRESS
100 #undef HAVE_ARCHIVE_DB
102 /* include the old function apis */
103 #define USE_OLD_FUNCTIONS 1
105 /* no case sensitivity */
106 #define FN_NO_CASE_SENCE 1
108 /* the thread alarm is not used */
109 #define DONT_USE_THR_ALARM 1
111 /* signals do not interrupt sockets */
112 #define SIGNALS_DONT_BREAK_READ 1
114 /* signal by closing the sockets */
115 #define SIGNAL_WITH_VIO_CLOSE 1
117 /* On NetWare, stack grows towards lower address */
118 #define STACK_DIRECTION -1
120 /* On NetWare, we need to set stack size for threads, otherwise default 16K is used */
121 #define NW_THD_STACKSIZE 65536
123 /* On NetWare, to fix the problem with the deletion of open files */
124 #define CANT_DELETE_OPEN_FILES 1
126 #define FN_LIBCHAR '\\'
127 #define FN_DIRSEP "/\\" /* Valid directory separators */
128 #define FN_ROOTDIR "\\"
129 #define FN_DEVCHAR ':'
131 /* default directory information */
132 #define DEFAULT_MYSQL_HOME "sys:/mysql"
133 #define PACKAGE "mysql"
134 #define DEFAULT_BASEDIR "sys:/"
135 #define SHAREDIR "share/"
136 #define DEFAULT_CHARSET_HOME "sys:/mysql/"
137 #define MYSQL_DATADIR "data/"
139 /* 64-bit file system calls */
140 #define SIZEOF_OFF_T 8
141 #define off_t off64_t
142 #define chsize chsize64
143 #define ftruncate ftruncate64
144 #define lseek lseek64
145 #define pread pread64
146 #define pwrite pwrite64
147 #define tell tell64
149 /* do not use the extended time in LibC sys\stat.h */
150 #define _POSIX_SOURCE
152 /* Some macros for portability */
154 #define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
156 /* extra protection against CPU Hogs on NetWare */
157 #define NETWARE_YIELD pthread_yield()
158 /* Screen mode for help texts */
159 #define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
161 #ifdef __cplusplus
163 #endif
165 #endif /* _config_netware_h */