summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-05-25 22:00:14 +0300
committerunknown <monty@mysql.com>2004-05-25 22:00:14 +0300
commita37fc4bbd81f4c6148d3d71e3d24c2ba283f06df (patch)
tree2c56473da947b9807f0d1668171870a8e3dbc736 /include
parent2522b8b0d2100925e073b07ea8d3a9d5b2d185bc (diff)
downloadmariadb-git-a37fc4bbd81f4c6148d3d71e3d24c2ba283f06df.tar.gz
Added patches from Novell
Build-tools/Do-compile: Fixed indentation configure.in: Added patches from Novell Added C_EXTRA_FLAGS as an easy way to pass flags to both CFLAGS and CXXFLAGS extra/perror.c: Fixed error number reporting to not report 'Unknown error' include/my_global.h: Defines to make NETWARE patches cleaner include/thr_alarm.h: Fixed wrong macro netware/mysql_install_db.c: Indentation fix
Diffstat (limited to 'include')
-rw-r--r--include/config-netware.h36
-rw-r--r--include/help_end.h6
-rw-r--r--include/help_start.h7
-rw-r--r--include/my_global.h6
-rw-r--r--include/thr_alarm.h2
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 e4c0fb44337..30cd1800884 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__)