diff options
author | unknown <monty@mysql.com> | 2004-05-25 22:01:50 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-25 22:01:50 +0300 |
commit | 81a0700406b1f85b29dd8711293d0e78eb3383a8 (patch) | |
tree | f5abb32f436bbc05db102bf322757f4a03aaa850 /include | |
parent | 8983aac428496bf4ed1b9dcc9e323a4a0905bc1a (diff) | |
parent | a37fc4bbd81f4c6148d3d71e3d24c2ba283f06df (diff) | |
download | mariadb-git-81a0700406b1f85b29dd8711293d0e78eb3383a8.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/tmp/skr99/mysql-4.0
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
myisam/myisam_ftdump.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/mysqld.cc:
Auto merged
Diffstat (limited to 'include')
-rw-r--r-- | include/config-netware.h | 36 | ||||
-rw-r--r-- | include/help_end.h | 6 | ||||
-rw-r--r-- | include/help_start.h | 7 | ||||
-rw-r--r-- | include/my_global.h | 6 | ||||
-rw-r--r-- | include/thr_alarm.h | 2 |
5 files changed, 53 insertions, 4 deletions
diff --git a/include/config-netware.h b/include/config-netware.h index dab365a7127..c4e63056353 100644 --- a/include/config-netware.h +++ b/include/config-netware.h @@ -14,7 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* Defines for netware compatible with MySQL */ +/* Header for NetWare compatible with MySQL */ + +#ifndef _config_netware_h +#define _config_netware_h /* required headers */ #include <unistd.h> @@ -32,18 +35,28 @@ #include <pthread.h> #include <termios.h> +#ifdef __cplusplus +extern "C" { +#endif + /* required adjustments */ #undef HAVE_READDIR_R #undef HAVE_RWLOCK_INIT #undef HAVE_SCHED_H #undef HAVE_SYS_MMAN_H #undef HAVE_SYNCH_H -#undef HAVE_CRYPT #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 #define HAVE_PTHREAD_SIGMASK 1 #define HAVE_PTHREAD_YIELD_ZERO_ARG 1 #define HAVE_BROKEN_REALPATH 1 +/* no libc crypt() function */ +#ifdef HAVE_OPENSSL + #define HAVE_CRYPT 1 +#else + #undef HAVE_CRYPT +#endif /* HAVE_OPENSSL */ + /* include the old function apis */ #define USE_OLD_FUNCTIONS 1 @@ -59,6 +72,9 @@ /* signal by closing the sockets */ #define SIGNAL_WITH_VIO_CLOSE 1 +/* On NetWare, stack grows towards lower address*/ +#define STACK_DIRECTION -1 + /* default directory information */ #define DEFAULT_MYSQL_HOME "sys:/mysql" #define PACKAGE "mysql" @@ -80,6 +96,20 @@ /* do not use the extended time in LibC sys\stat.h */ #define _POSIX_SOURCE +/* Kernel call on NetWare that will only yield if our time slice is up */ +void kYieldIfTimeSliceUp(void); + /* Some macros for portability */ -#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=(SEC); (ABSTIME).tv_nsec=0; } +#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; } + +/* extra protection against CPU Hogs on NetWare */ +#define NETWARE_YIELD kYieldIfTimeSliceUp() +/* Screen mode for help texts */ +#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A) + +#ifdef __cplusplus +} +#endif + +#endif /* _config_netware_h */ diff --git a/include/help_end.h b/include/help_end.h new file mode 100644 index 00000000000..a63d9e7ca9f --- /dev/null +++ b/include/help_end.h @@ -0,0 +1,6 @@ +#ifdef __NETWARE__ +#undef printf +#undef puts +#undef fputs +#undef putchar +#endif diff --git a/include/help_start.h b/include/help_start.h new file mode 100644 index 00000000000..38bb91f7655 --- /dev/null +++ b/include/help_start.h @@ -0,0 +1,7 @@ +/* Divert all help information on NetWare to logger screen. */ + +#ifdef __NETWARE__ +#define printf consoleprintf +#define puts(s) consoleprintf("%s\n",s) +#define fputs(s,f) puts(s) +#endif diff --git a/include/my_global.h b/include/my_global.h index 58e97020ccb..4964c5dae56 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -73,6 +73,12 @@ #endif #endif /* _WIN32... */ +/* Some defines to avoid ifdefs in the code */ +#ifndef NETWARE_YIELD +#define NETWARE_YIELD +#define NETWARE_SET_SCREEN_MODE(A) +#endif + /* The macros below are borrowed from include/linux/compiler.h in the Linux kernel. Use them to indicate the likelyhood of the truthfulness diff --git a/include/thr_alarm.h b/include/thr_alarm.h index 0dbb700b4fc..7a10d6886ce 100644 --- a/include/thr_alarm.h +++ b/include/thr_alarm.h @@ -64,7 +64,7 @@ typedef my_bool ALARM; #define init_thr_alarm(A) #define thr_alarm_kill(A) #define resize_thr_alarm(N) -#define end_thr_alarm() +#define end_thr_alarm(A) #else #if defined(__WIN__) |