fspr_private.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. /*
  17. * Note:
  18. * This is the windows specific autoconf-like config file
  19. * which unix would create at build time.
  20. */
  21. #ifdef NETWARE
  22. #ifndef APR_PRIVATE_H
  23. #define APR_PRIVATE_H
  24. /* Include the public APR symbols, include our idea of the 'right'
  25. * subset of the Windows.h header. This saves us repetition.
  26. */
  27. #include "fspr.h"
  28. #include <sys/types.h>
  29. #include <stddef.h>
  30. #include <stdio.h>
  31. #include <stdlib.h>
  32. #include <time.h>
  33. #include <library.h>
  34. #include <netware.h>
  35. /* Use this section to define all of the HAVE_FOO_H
  36. * that are required to build properly.
  37. */
  38. #define HAVE_DLFCN_H 1
  39. #define HAVE_LIMITS_H 1
  40. #define HAVE_SIGNAL_H 1
  41. #define HAVE_STDDEF_H 1
  42. #define HAVE_STDLIB_H 1
  43. #ifndef USE_WINSOCK
  44. #define HAVE_SYS_SELECT_H 1
  45. #define HAVE_WRITEV 1
  46. #endif
  47. #define HAVE_SYS_STAT_H 1
  48. #define HAVE_SYS_MMAN_H 1
  49. #define HAVE_FCNTL_H 1
  50. #define HAVE_ICONV_H 1
  51. #define HAVE_UTIME_H 1
  52. #define HAVE_STRICMP 1
  53. #define HAVE_STRNICMP 1
  54. #define HAVE_STRDUP 1
  55. #define HAVE_STRSTR 1
  56. #define HAVE_MEMCHR 1
  57. #define HAVE_CALLOC 1
  58. #define HAVE_UTIME 1
  59. #define HAVE_GETENV 1
  60. #define HAVE_SETENV 1
  61. #define HAVE_UNSETENV 1
  62. #define HAVE_WRITEV 1
  63. /* 64-bit integer conversion function */
  64. #define APR_INT64_STRFN strtoll
  65. /*#define DSO_USE_DLFCN */
  66. #ifdef NW_BUILD_IPV6
  67. #define HAVE_GETADDRINFO 1
  68. #define HAVE_GETNAMEINFO 1
  69. #endif
  70. /* 1 is used for SIGABRT on netware */
  71. /* 2 is used for SIGFPE on netware */
  72. /* 3 is used for SIGILL on netware */
  73. /* 4 is used for SIGINT on netware */
  74. /* 5 is used for SIGSEGV on netware */
  75. /* 6 is used for SIGTERM on netware */
  76. /* 7 is used for SIGPOLL on netware */
  77. #define SIGKILL 11
  78. #define SA_NOCLDSTOP 12
  79. #define SIGALRM 13
  80. #define SIGCHLD 14
  81. #define SIGCONT 15
  82. #define SIGHUP 16
  83. #define SIGPIPE 17
  84. #define SIGQUIT 18
  85. #define SIGSTOP 19
  86. #define SIGTSTP 20
  87. #define SIGTTIN 21
  88. #define SIGTTOU 22
  89. #define SIGUSR1 23
  90. #define SIGUSR2 24
  91. #define SIGTRAP 25
  92. #define SIGIOT 26
  93. #define SIGBUS 27
  94. #define SIGSTKFLT 28
  95. #define SIGURG 29
  96. #define SIGXCPU 30
  97. #define SIGXFSZ 31
  98. #define SIGVTALRM 32
  99. #define SIGPROF 33
  100. #define SIGWINCH 34
  101. #define SIGIO 35
  102. #if 0
  103. #define __attribute__(__x)
  104. /* APR COMPATABILITY FUNCTIONS
  105. * This section should be used to define functions and
  106. * macros which are need to make Windows features look
  107. * like POSIX features.
  108. */
  109. typedef void (Sigfunc)(int);
  110. #endif
  111. #define strcasecmp(s1, s2) stricmp(s1, s2)
  112. #define Sleep(t) delay(t)
  113. #define lstat(a,b) stat(a,b)
  114. #define _getch() getcharacter()
  115. #define SIZEOF_SHORT 2
  116. #define SIZEOF_INT 4
  117. #define SIZEOF_LONGLONG 8
  118. #define SIZEOF_CHAR 1
  119. #define SIZEOF_SSIZE_T SIZEOF_INT
  120. void netware_pool_proc_cleanup ();
  121. /* NLM registration routines for managing which NLMs
  122. are using the library. */
  123. int register_NLM(void *NLMHandle);
  124. int unregister_NLM(void *NLMHandle);
  125. /* Application global data management */
  126. extern int gLibId;
  127. extern void *gLibHandle;
  128. typedef struct app_data {
  129. int initialized;
  130. void* gPool;
  131. void* gs_aHooksToSort;
  132. void* gs_phOptionalHooks;
  133. void* gs_phOptionalFunctions;
  134. void* gs_nlmhandle;
  135. rtag_t gs_startup_rtag;
  136. rtag_t gs_socket_rtag;
  137. rtag_t gs_lookup_rtag;
  138. rtag_t gs_event_rtag;
  139. rtag_t gs_pcp_rtag;
  140. } APP_DATA;
  141. int setGlobalPool(void *data);
  142. void* getGlobalPool();
  143. int setStatCache(void *data);
  144. void* getStatCache();
  145. /* Redefine malloc to use the library malloc call so
  146. that all of the memory resources will be owned
  147. and can be shared by the library. */
  148. #undef malloc
  149. #define malloc(x) library_malloc(gLibHandle,x)
  150. #if APR_HAS_LARGE_FILES
  151. #define APR_OFF_T_STRFN strtoll
  152. #else
  153. #define APR_OFF_T_STRFN strtol
  154. #endif
  155. /* used to check DWORD overflow for 64bit compiles */
  156. #define APR_DWORD_MAX 0xFFFFFFFFUL
  157. /*
  158. * Include common private declarations.
  159. */
  160. #include "../fspr_private_common.h"
  161. #endif /*APR_PRIVATE_H*/
  162. #endif /*NETWARE*/