1 /* Copyright (C) 2000 MySQL AB
2 
3    This program is free software; you can redistribute it and/or modify
4    it under the terms of the GNU General Public License as published by
5    the Free Software Foundation; either version 2 of the License, or
6    (at your option) any later version.
7 
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.
12 
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
16 
17 /* Defines for netware compatible with MySQL */
18 
19 /* required headers */
20 #include <unistd.h>
21 #include <stdio.h>
22 #include <errno.h>
23 #include <screen.h>
24 #include <limits.h>
25 #include <signal.h>
26 #include <errno.h>
27 #include <stdbool.h>
28 #include <stdlib.h>
29 #include <sys/types.h>
30 #include <time.h>
31 #include <sys/time.h>
32 #include <pthread.h>
33 #include <termios.h>
34 
35 /* required adjustments */
36 #undef HAVE_READDIR_R
37 #undef HAVE_RWLOCK_INIT
38 #undef HAVE_SCHED_H
39 #undef HAVE_SYS_MMAN_H
40 #undef HAVE_SYNCH_H
41 #undef HAVE_CRYPT
42 #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
43 #define HAVE_PTHREAD_SIGMASK 1
44 #define HAVE_PTHREAD_YIELD_ZERO_ARG 1
45 #define HAVE_BROKEN_REALPATH 1
46 
47 /* include the old function apis */
48 #define USE_OLD_FUNCTIONS 1
49 
50 /* no case sensitivity */
51 #define FN_NO_CASE_SENCE 1
52 
53 /* the thread alarm is not used */
54 #define DONT_USE_THR_ALARM 1
55 
56 /* signals do not interrupt sockets */
57 #define SIGNALS_DONT_BREAK_READ 1
58 
59 /* signal by closing the sockets */
60 #define SIGNAL_WITH_VIO_CLOSE 1
61 
62 /* default directory information */
63 #define	DEFAULT_MYSQL_HOME    "sys:/mysql"
64 #define PACKAGE               "mysql"
65 #define DEFAULT_BASEDIR       "sys:/"
66 #define SHAREDIR              "share/"
67 #define DEFAULT_CHARSET_HOME  "sys:/mysql/"
68 #define DATADIR               "data/"
69 
70 /* 64-bit file system calls */
71 #define SIZEOF_OFF_T          8
72 #define off_t                 off64_t
73 #define chsize                chsize64
74 #define ftruncate             ftruncate64
75 #define lseek                 lseek64
76 #define pread                 pread64
77 #define pwrite                pwrite64
78 #define tell                  tell64
79 
80 /* do not use the extended time in LibC sys\stat.h */
81 #define _POSIX_SOURCE
82 
83 /* Some macros for portability */
84 
85 #define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=(SEC); (ABSTIME).tv_nsec=0; }
86