home *** CD-ROM | disk | FTP | other *** search
/ CD BIT 75 / CD BIT 75.iso / Software / mysql-4.0.22-win / data1.cab / Development / include / config-netware.h next >
Encoding:
C/C++ Source or Header  |  2004-10-28  |  3.2 KB  |  120 lines

  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. /* Header for NetWare compatible with MySQL */
  18.  
  19. #ifndef _config_netware_h
  20. #define _config_netware_h
  21.  
  22. /* required headers */
  23. #include <unistd.h>
  24. #include <stdio.h>
  25. #include <errno.h>
  26. #include <screen.h>
  27. #include <limits.h>
  28. #include <signal.h>
  29. #include <errno.h>
  30. #include <stdbool.h>
  31. #include <stdlib.h>
  32. #include <sys/types.h>
  33. #include <time.h>
  34. #include <sys/time.h>
  35. #include <pthread.h>
  36. #include <termios.h>
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. /* required adjustments */
  43. #undef HAVE_READDIR_R
  44. #undef HAVE_RWLOCK_INIT
  45. #undef HAVE_SCHED_H
  46. #undef HAVE_SYS_MMAN_H
  47. #undef HAVE_SYNCH_H
  48. #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
  49. #define HAVE_PTHREAD_SIGMASK 1
  50. #define HAVE_PTHREAD_YIELD_ZERO_ARG 1
  51. #define HAVE_BROKEN_REALPATH 1
  52.  
  53. /* no libc crypt() function */
  54. #ifdef HAVE_OPENSSL
  55.   #define HAVE_CRYPT 1
  56. #else
  57.   #undef HAVE_CRYPT
  58. #endif /* HAVE_OPENSSL */
  59.  
  60. /* Configure can't detect this because it uses AC_TRY_RUN */
  61. #undef HAVE_COMPRESS
  62. #define HAVE_COMPRESS
  63.  
  64. /* include the old function apis */
  65. #define USE_OLD_FUNCTIONS 1
  66.  
  67. /* no case sensitivity */
  68. #define FN_NO_CASE_SENCE 1
  69.  
  70. /* the thread alarm is not used */
  71. #define DONT_USE_THR_ALARM 1
  72.  
  73. /* signals do not interrupt sockets */
  74. #define SIGNALS_DONT_BREAK_READ 1
  75.  
  76. /* signal by closing the sockets */
  77. #define SIGNAL_WITH_VIO_CLOSE 1
  78.  
  79. /* On NetWare, stack grows towards lower address*/
  80. #define STACK_DIRECTION -1
  81.  
  82. /* default directory information */
  83. #define    DEFAULT_MYSQL_HOME    "sys:/mysql"
  84. #define PACKAGE               "mysql"
  85. #define DEFAULT_BASEDIR       "sys:/"
  86. #define SHAREDIR              "share/"
  87. #define DEFAULT_CHARSET_HOME  "sys:/mysql/"
  88. #define DATADIR               "data/"
  89.  
  90. /* 64-bit file system calls */
  91. #define SIZEOF_OFF_T          8
  92. #define off_t                 off64_t
  93. #define chsize                chsize64
  94. #define ftruncate             ftruncate64
  95. #define lseek                 lseek64
  96. #define pread                 pread64
  97. #define pwrite                pwrite64
  98. #define tell                  tell64
  99.  
  100. /* do not use the extended time in LibC sys\stat.h */
  101. #define _POSIX_SOURCE
  102.  
  103. /* Kernel call on NetWare that will only yield if our time slice is up */
  104. void kYieldIfTimeSliceUp(void);
  105.  
  106. /* Some macros for portability */
  107.  
  108. #define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
  109.  
  110. /* extra protection against CPU Hogs on NetWare */
  111. #define NETWARE_YIELD kYieldIfTimeSliceUp()
  112. /* Screen mode for help texts */
  113. #define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
  114.  
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118.  
  119. #endif /* _config_netware_h */
  120.