summaryrefslogtreecommitdiff
path: root/include/config-netware.h
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-05-25 22:00:14 +0300
committermonty@mysql.com <>2004-05-25 22:00:14 +0300
commitf2e1e3ce4c72d383f16fd8c525b28c4912e8f2de (patch)
tree2c56473da947b9807f0d1668171870a8e3dbc736 /include/config-netware.h
parentd14e4eb57c92b987152b255ec961b1e9103d8f66 (diff)
downloadmariadb-git-f2e1e3ce4c72d383f16fd8c525b28c4912e8f2de.tar.gz
Added patches from Novell
Diffstat (limited to 'include/config-netware.h')
-rw-r--r--include/config-netware.h36
1 files changed, 33 insertions, 3 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 */