summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/apr.h.in46
-rw-r--r--include/apr.hnw278
-rw-r--r--include/apr_portable.h7
-rw-r--r--include/apr_want.h11
-rw-r--r--include/arch/netware/apr_arch_file_io.h3
-rw-r--r--include/arch/netware/apr_arch_pre_nw.h36
-rw-r--r--include/arch/netware/apr_arch_threadproc.h12
-rw-r--r--include/arch/netware/apr_private.h75
-rw-r--r--include/arch/os2/apr_arch_file_io.h13
-rw-r--r--include/arch/win32/apr_arch_file_io.h4
-rw-r--r--include/arch/win32/apr_arch_misc.h95
11 files changed, 306 insertions, 274 deletions
diff --git a/include/apr.h.in b/include/apr.h.in
index 9f1fb6f99..35fff75c4 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -63,10 +63,10 @@
#define __attribute__(__x)
#endif
#define APR_INLINE
-#define APR_HAS_INLINE 0
+#define APR_HAS_INLINE 0
#else
#define APR_INLINE __inline__
-#define APR_HAS_INLINE 1
+#define APR_HAS_INLINE 1
#endif
#define APR_HAVE_ARPA_INET_H @arpa_ineth@
@@ -83,6 +83,7 @@
#define APR_HAVE_NETINET_SCTP_H @netinet_sctph@
#define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@
#define APR_HAVE_NETINET_TCP_H @netinet_tcph@
+#define APR_HAVE_PROCESS_H @processh@
#define APR_HAVE_PTHREAD_H @pthreadh@
#define APR_HAVE_SEMAPHORE_H @semaphoreh@
#define APR_HAVE_SIGNAL_H @signalh@
@@ -116,8 +117,39 @@
*/
#if APR_HAVE_WINDOWS_H
-#include <windows.h>
+/* If windows.h was already included, our preferences don't matter.
+ * If not, include a restricted set of windows headers to our tastes.
+ */
+#ifndef _WINDOWS_
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#ifndef NOUSER
+#define NOUSER
+#endif
+#ifndef NOMCX
+#define NOMCX
#endif
+#ifndef NOIME
+#define NOIME
+#endif
+
+/* Impossible to include winsock2.h after winsock.h, while windows.h
+ * attempts to load winsock. Setting _WINSOCKAPI_ will dodge this.
+ */
+#if APR_HAVE_WINSOCK2_H
+#define _WINSOCKAPI_
+#endif
+
+#include <windows.h>
+#endif /* ndef _WINDOWS_ */
+#endif /* APR_HAVE_WINDOWS_H */
#if APR_HAVE_WINSOCK2_H
#include <winsock2.h>
@@ -238,12 +270,12 @@ extern "C" {
#define APR_HAS_SO_ACCEPTFILTER @acceptfilter@
#define APR_HAS_UNICODE_FS @have_unicode_fs@
#define APR_HAS_PROC_INVOKED @have_proc_invoked@
-#define APR_HAS_USER 1
+#define APR_HAS_USER @apr_has_user@
#define APR_HAS_LARGE_FILES @aprlfs@
-#define APR_HAS_XTHREAD_FILES 0
+#define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@
#define APR_HAS_OS_UUID @osuuid@
-#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
+#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
* to poll on files/pipes.
@@ -380,7 +412,7 @@ typedef apr_uint32_t apr_uintptr_t;
*
* </PRE>
*/
-#define APR_THREAD_FUNC
+#define APR_THREAD_FUNC @apr_thread_func@
/**
* The public APR functions are declared with APR_DECLARE(), so they may
diff --git a/include/apr.hnw b/include/apr.hnw
index 2b2d091e9..d0c77e00e 100644
--- a/include/apr.hnw
+++ b/include/apr.hnw
@@ -25,19 +25,20 @@
* And please, make an effort to stub apr.hw and apr.h.in in the process.
*
* This is the NetWare specific version of apr.h. It is copied from
- * apr.hnw at the start of a NetWare build by prebuildNW.bat.
+ * apr.hnw at the start of a NetWare build by the ./build/NWGNmakefile.
*/
/**
* @file apr.h
* @brief APR Platform Definitions
* @remark This is a generated header generated from include/apr.h.in by
- * ./configure, or copied from include/apr.hw or include/apr.hnw
+ * ./configure, or copied from include/apr.hw or include/apr.hnw
* for Win32 or Netware by those build environments, respectively.
*/
#if defined(NETWARE) || defined(DOXYGEN)
+#undef FD_SETSIZE
#define FD_SETSIZE 1024
#include <sys/types.h>
@@ -48,21 +49,22 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
+#include <netware.h>
#include <nks/thread.h>
#include <nks/synch.h>
#include <nks/time.h>
#include <signal.h>
#ifdef USE_WINSOCK
#include <novsock2.h>
+#ifdef NW_BUILD_IPV6
+#include <novtcpip.h>
+#endif
#else
#include <sys/socket.h>
+#include <sys/select.h>
#endif
#include <sys/types.h>
-#ifdef NW_BUILD_IPV6
-#include <novtcpip.h>
-#endif
-
#define _POSIX_THREAD_SAFE_FUNCTIONS 1
#define READDIR_IS_THREAD_SAFE 1
@@ -74,161 +76,161 @@ extern "C" {
/**
* @defgroup apr_platform Platform Definitions
- * @ingroup APR
+ * @ingroup APR
* @{
*/
-#define APR_INLINE
-#define APR_HAS_INLINE 0
+#define APR_INLINE
+#define APR_HAS_INLINE 0
#ifndef __attribute__
#define __attribute__(__x)
#endif
#define ENUM_BITFIELD(e,n,w) signed int n : w
-#define APR_HAVE_CONIO_H 0
-#define APR_HAVE_CRYPT_H 0
-#define APR_HAVE_CTYPE_H 1
-#define APR_HAVE_DIRENT_H 1
-#define APR_HAVE_ERRNO_H 1
-#define APR_HAVE_FCNTL_H 1
-#define APR_HAVE_IO_H 0
-#define APR_HAVE_LIMITS_H 1
+#define APR_HAVE_CONIO_H 0
+#define APR_HAVE_CRYPT_H 0
+#define APR_HAVE_CTYPE_H 1
+#define APR_HAVE_DIRENT_H 1
+#define APR_HAVE_ERRNO_H 1
+#define APR_HAVE_FCNTL_H 1
+#define APR_HAVE_IO_H 0
+#define APR_HAVE_LIMITS_H 1
#ifdef USE_WINSOCK
-#define APR_HAVE_ARPA_INET_H 0
-#define APR_HAVE_NETDB_H 0
-#define APR_HAVE_NETINET_IN_H 0
+#define APR_HAVE_ARPA_INET_H 0
+#define APR_HAVE_NETDB_H 0
+#define APR_HAVE_NETINET_IN_H 0
#else
-#define APR_HAVE_ARPA_INET_H 1
-#define APR_HAVE_NETDB_H 1
-#define APR_HAVE_NETINET_IN_H 1
+#define APR_HAVE_ARPA_INET_H 1
+#define APR_HAVE_NETDB_H 1
+#define APR_HAVE_NETINET_IN_H 1
#endif
-#define APR_HAVE_NETINET_SCTP_H 0
-#define APR_HAVE_NETINET_SCTP_UIO_H 0
-#define APR_HAVE_NETINET_TCP_H 0
-#define APR_HAVE_PTHREAD_H 0
-#define APR_HAVE_SIGNAL_H 1
-#define APR_HAVE_STDARG_H 1
-#define APR_HAVE_STDINT_H 0
-#define APR_HAVE_STDIO_H 1
-#define APR_HAVE_STDLIB_H 1
-#define APR_HAVE_STRING_H 1
-#define APR_HAVE_STRINGS_H 0
-#define APR_HAVE_STRTOLL 1
-#define APR_HAVE_SYS_SENDFILE_H 0
-#define APR_HAVE_SYS_SYSLIMITS_H 0
+#define APR_HAVE_NETINET_SCTP_H 0
+#define APR_HAVE_NETINET_SCTP_UIO_H 0
+#define APR_HAVE_NETINET_TCP_H 0
+#define APR_HAVE_PTHREAD_H 0
+#define APR_HAVE_SIGNAL_H 1
+#define APR_HAVE_STDARG_H 1
+#define APR_HAVE_STDINT_H 0
+#define APR_HAVE_STDIO_H 1
+#define APR_HAVE_STDLIB_H 1
+#define APR_HAVE_STRING_H 1
+#define APR_HAVE_STRINGS_H 0
+#define APR_HAVE_STRTOLL 1
+#define APR_HAVE_SYS_SENDFILE_H 0
+#define APR_HAVE_SYS_SYSLIMITS_H 0
#ifdef USE_WINSOCK
-#define APR_HAVE_SYS_SOCKET_H 0
-#define APR_HAVE_SYS_SOCKIO_H 0
-#define APR_HAVE_SYS_TIME_H 0
+#define APR_HAVE_SYS_SOCKET_H 0
+#define APR_HAVE_SYS_SOCKIO_H 0
+#define APR_HAVE_SYS_UN_H 0
#else
-#define APR_HAVE_SYS_SOCKET_H 1
-#define APR_HAVE_SYS_SOCKIO_H 1
-#define APR_HAVE_SYS_TIME_H 1
+#define APR_HAVE_SYS_SOCKET_H 1
+#define APR_HAVE_SYS_SOCKIO_H 1
+#define APR_HAVE_SYS_UN_H 1
#endif
-#define APR_HAVE_SYS_SIGNAL_H 1
-#define APR_HAVE_SYS_TYPES_H 1
-#define APR_HAVE_SYS_UIO_H 1
-#define APR_HAVE_SYS_UN_H 1
-#define APR_HAVE_SYS_WAIT_H 1
-#define APR_HAVE_TIME_H 1
-#define APR_HAVE_UNISTD_H 1
-
-#define APR_HAVE_SHMEM_MMAP_TMP 0
-#define APR_HAVE_SHMEM_MMAP_SHM 0
-#define APR_HAVE_SHMEM_MMAP_ZERO 0
-#define APR_HAVE_SHMEM_SHMGET_ANON 0
-#define APR_HAVE_SHMEM_SHMGET 0
-#define APR_HAVE_SHMEM_MMAP_ANON 0
-#define APR_HAVE_SHMEM_BEOS 0
-
-#define APR_USE_SHMEM_MMAP_TMP 0
-#define APR_USE_SHMEM_MMAP_SHM 0
-#define APR_USE_SHMEM_MMAP_ZERO 0
-#define APR_USE_SHMEM_SHMGET_ANON 0
-#define APR_USE_SHMEM_SHMGET 0
-#define APR_USE_SHMEM_MMAP_ANON 0
-#define APR_USE_SHMEM_BEOS 0
-
-#define APR_USE_FLOCK_SERIALIZE 0
-#define APR_USE_SYSVSEM_SERIALIZE 0
-#define APR_USE_FCNTL_SERIALIZE 0
-#define APR_USE_PROC_PTHREAD_SERIALIZE 0
-#define APR_USE_PTHREAD_SERIALIZE 0
-
-#define APR_HAS_FLOCK_SERIALIZE 0
-#define APR_HAS_SYSVSEM_SERIALIZE 0
-#define APR_HAS_FCNTL_SERIALIZE 0
-#define APR_HAS_PROC_PTHREAD_SERIALIZE 0
-#define APR_HAS_RWLOCK_SERIALIZE 0
-
-#define APR_HAS_LOCK_CREATE_NP 0
-
-#define APR_PROCESS_LOCK_IS_GLOBAL 1
-
-#define APR_FILE_BASED_SHM 0
-
-#define APR_HAVE_CORKABLE_TCP 0
-#define APR_HAVE_GETRLIMIT 0
-#define APR_HAVE_ICONV 0
-#define APR_HAVE_IN_ADDR 1
-#define APR_HAVE_INET_ADDR 1
-#define APR_HAVE_INET_NETWORK 0
+#define APR_HAVE_SYS_SIGNAL_H 1
+#define APR_HAVE_SYS_TIME_H 1
+#define APR_HAVE_SYS_TYPES_H 1
+#define APR_HAVE_SYS_UIO_H 1
+#define APR_HAVE_SYS_WAIT_H 1
+#define APR_HAVE_TIME_H 1
+#define APR_HAVE_UNISTD_H 1
+
+#define APR_HAVE_SHMEM_MMAP_TMP 0
+#define APR_HAVE_SHMEM_MMAP_SHM 0
+#define APR_HAVE_SHMEM_MMAP_ZERO 0
+#define APR_HAVE_SHMEM_SHMGET_ANON 0
+#define APR_HAVE_SHMEM_SHMGET 0
+#define APR_HAVE_SHMEM_MMAP_ANON 0
+#define APR_HAVE_SHMEM_BEOS 0
+
+#define APR_USE_SHMEM_MMAP_TMP 0
+#define APR_USE_SHMEM_MMAP_SHM 0
+#define APR_USE_SHMEM_MMAP_ZERO 0
+#define APR_USE_SHMEM_SHMGET_ANON 0
+#define APR_USE_SHMEM_SHMGET 0
+#define APR_USE_SHMEM_MMAP_ANON 0
+#define APR_USE_SHMEM_BEOS 0
+
+#define APR_USE_FLOCK_SERIALIZE 0
+#define APR_USE_SYSVSEM_SERIALIZE 0
+#define APR_USE_FCNTL_SERIALIZE 0
+#define APR_USE_PROC_PTHREAD_SERIALIZE 0
+#define APR_USE_PTHREAD_SERIALIZE 0
+
+#define APR_HAS_FLOCK_SERIALIZE 0
+#define APR_HAS_SYSVSEM_SERIALIZE 0
+#define APR_HAS_FCNTL_SERIALIZE 0
+#define APR_HAS_PROC_PTHREAD_SERIALIZE 0
+#define APR_HAS_RWLOCK_SERIALIZE 0
+
+#define APR_HAS_LOCK_CREATE_NP 0
+
+#define APR_PROCESS_LOCK_IS_GLOBAL 1
+
+#define APR_FILE_BASED_SHM 0
+
+#define APR_HAVE_CORKABLE_TCP 0
+#define APR_HAVE_GETRLIMIT 0
+#define APR_HAVE_ICONV 0
+#define APR_HAVE_IN_ADDR 1
+#define APR_HAVE_INET_ADDR 1
+#define APR_HAVE_INET_NETWORK 0
#ifdef NW_BUILD_IPV6
-#define APR_HAVE_IPV6 1
+#define APR_HAVE_IPV6 1
#else
-#define APR_HAVE_IPV6 0
+#define APR_HAVE_IPV6 0
#endif
-#define APR_HAVE_MEMCHR 1
-#define APR_HAVE_MEMMOVE 1
-#define APR_HAVE_SETRLIMIT 0
-#define APR_HAVE_SIGACTION 0
-#define APR_HAVE_SIGSUSPEND 0
-#define APR_HAVE_SIGWAIT 0
-#define APR_HAVE_STRCASECMP 1
-#define APR_HAVE_STRDUP 1
-#define APR_HAVE_STRICMP 1
-#define APR_HAVE_STRNCASECMP 1
-#define APR_HAVE_STRNICMP 1
-#define APR_HAVE_STRSTR 1
-#define APR_HAVE_STRUCT_RLIMIT 0
-#define APR_HAVE_UNION_SEMUN 0
-#define APR_HAVE_SCTP 0
-#define APR_HAVE_IOVEC 1
+#define APR_HAVE_MEMCHR 1
+#define APR_HAVE_MEMMOVE 1
+#define APR_HAVE_SETRLIMIT 0
+#define APR_HAVE_SIGACTION 0
+#define APR_HAVE_SIGSUSPEND 0
+#define APR_HAVE_SIGWAIT 0
+#define APR_HAVE_STRCASECMP 1
+#define APR_HAVE_STRDUP 1
+#define APR_HAVE_STRICMP 1
+#define APR_HAVE_STRNCASECMP 1
+#define APR_HAVE_STRNICMP 1
+#define APR_HAVE_STRSTR 1
+#define APR_HAVE_STRUCT_RLIMIT 0
+#define APR_HAVE_UNION_SEMUN 0
+#define APR_HAVE_SCTP 0
+#define APR_HAVE_IOVEC 1
/* APR Feature Macros */
-#define APR_HAS_SHARED_MEMORY 0
-#define APR_HAS_THREADS 1
-#define APR_HAS_SENDFILE 0
-#define APR_HAS_MMAP 0
-#define APR_HAS_FORK 0
-#define APR_HAS_RANDOM 1
-#define APR_HAS_OTHER_CHILD 0
-#define APR_HAS_DSO 1
-#define APR_HAS_SO_ACCEPTFILTER 0
-#define APR_HAS_UNICODE_FS 0
-#define APR_HAS_PROC_INVOKED 0
-#define APR_HAS_USER 1
-#define APR_HAS_LARGE_FILES 1
-#define APR_HAS_XTHREAD_FILES 0
-#define APR_HAS_OS_UUID 0
+#define APR_HAS_SHARED_MEMORY 0
+#define APR_HAS_THREADS 1
+#define APR_HAS_SENDFILE 0
+#define APR_HAS_MMAP 0
+#define APR_HAS_FORK 0
+#define APR_HAS_RANDOM 1
+#define APR_HAS_OTHER_CHILD 0
+#define APR_HAS_DSO 1
+#define APR_HAS_SO_ACCEPTFILTER 0
+#define APR_HAS_UNICODE_FS 0
+#define APR_HAS_PROC_INVOKED 0
+#define APR_HAS_USER 1
+#define APR_HAS_LARGE_FILES 1
+#define APR_HAS_XTHREAD_FILES 0
+#define APR_HAS_OS_UUID 0
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
/* Netware can poll on files/pipes.
*/
-#define APR_FILES_AS_SOCKETS 1
+#define APR_FILES_AS_SOCKETS 1
/* This macro indicates whether or not EBCDIC is the native character set.
*/
-#define APR_CHARSET_EBCDIC 0
+#define APR_CHARSET_EBCDIC 0
/* Is the TCP_NODELAY socket option inherited from listening sockets?
*/
-#define APR_TCP_NODELAY_INHERITED 1
+#define APR_TCP_NODELAY_INHERITED 1
/* Is the O_NONBLOCK flag inherited from listening sockets?
*/
-#define APR_O_NONBLOCK_INHERITED 1
+#define APR_O_NONBLOCK_INHERITED 1
/* Typedefs that APR needs. */
@@ -259,7 +261,7 @@ typedef apr_uint64_t apr_ino_t;
/* Are we big endian? */
/* XXX: Fatal assumption on Alpha platforms */
-#define APR_IS_BIGENDIAN 0
+#define APR_IS_BIGENDIAN 0
#ifdef UNKNOWN_NETWARE_64BIT_FLAG_NEEDED
#define APR_SIZEOF_VOIDP 8
@@ -349,8 +351,8 @@ typedef apr_uint32_t apr_uintptr_t;
#define APR_END_DECLS
#endif
-/**
- * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
+/**
+ * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
* so that they follow the platform's calling convention.
* @example
*/
@@ -360,7 +362,7 @@ typedef apr_uint32_t apr_uintptr_t;
/**
* The public APR functions are declared with APR_DECLARE(), so they may
- * use the most appropriate calling convention. Public APR functions with
+ * use the most appropriate calling convention. Public APR functions with
* variable arguments must use APR_DECLARE_NONSTD().
*
* @remark Both the declaration and implementations must use the same macro.
@@ -368,20 +370,20 @@ typedef apr_uint32_t apr_uintptr_t;
*/
/** APR_DECLARE(rettype) apr_func(args)
* @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
- * @remark Note that when APR compiles the library itself, it passes the
- * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
+ * @remark Note that when APR compiles the library itself, it passes the
+ * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
* to export public symbols from the dynamic library build.\n
* The user must define the APR_DECLARE_STATIC when compiling to target
- * the static APR library on some platforms (e.g. Win32.) The public symbols
+ * the static APR library on some platforms (e.g. Win32.) The public symbols
* are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
* By default, compiling an application and including the APR public
* headers, without defining APR_DECLARE_STATIC, will prepare the code to be
* linked to the dynamic library.
*/
-#define APR_DECLARE(type) type
+#define APR_DECLARE(type) type
/**
- * The public APR functions using variable arguments are declared with
+ * The public APR functions using variable arguments are declared with
* APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
* @see APR_DECLARE @see APR_DECLARE_DATA
* @remark Both the declaration and implementations must use the same macro.
@@ -392,7 +394,7 @@ typedef apr_uint32_t apr_uintptr_t;
#define APR_DECLARE_NONSTD(type) type
/**
- * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
+ * The public APR variables are declared with APR_DECLARE_DATA.
* This assures the appropriate indirection is invoked at compile time.
* @see APR_DECLARE @see APR_DECLARE_NONSTD
* @remark Note that the declaration and implementations use different forms,
diff --git a/include/apr_portable.h b/include/apr_portable.h
index 7e52afc4f..c915fd037 100644
--- a/include/apr_portable.h
+++ b/include/apr_portable.h
@@ -471,6 +471,10 @@ APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **dso,
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *dso,
apr_dso_handle_t *aprdso);
+/** @} */
+#endif /* APR_HAS_DSO */
+
+
#if APR_HAS_OS_UUID
/**
* Private: apr-util's apr_uuid module when supported by the platform
@@ -478,9 +482,6 @@ APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *dso,
APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data);
#endif
-/** @} */
-#endif /* APR_HAS_DSO */
-
/**
* Get the name of the system default character set.
diff --git a/include/apr_want.h b/include/apr_want.h
index 14fa9d0b4..422431864 100644
--- a/include/apr_want.h
+++ b/include/apr_want.h
@@ -89,19 +89,16 @@
#else
+#ifndef APR_IOVEC_DEFINED
+#define APR_IOVEC_DEFINED
struct iovec
{
char *iov_base;
size_t iov_len;
};
+#endif /* !APR_IOVEC_DEFINED */
-#endif
-
-/* apr_want is included at several layers; redefining APR_HAVE_IOVEC
- * now to ensure that our struct is not introduced several times.
- */
-#undef APR_HAVE_IOVEC
-#define APR_HAVE_IOVEC 1
+#endif /* APR_HAVE_IOVEC */
#undef APR_WANT_IOVEC
#endif
diff --git a/include/arch/netware/apr_arch_file_io.h b/include/arch/netware/apr_arch_file_io.h
index 0676eb278..8bd2a72c7 100644
--- a/include/arch/netware/apr_arch_file_io.h
+++ b/include/arch/netware/apr_arch_file_io.h
@@ -165,6 +165,9 @@ apr_status_t filepath_compare_drive(const char *path1, const char *path2, apr_po
apr_status_t apr_unix_file_cleanup(void *);
apr_status_t apr_unix_child_file_cleanup(void *);
+mode_t apr_unix_perms2mode(apr_fileperms_t perms);
+apr_fileperms_t apr_unix_mode2perms(mode_t mode);
+
apr_status_t apr_file_flush_locked(apr_file_t *thefile);
apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile);
diff --git a/include/arch/netware/apr_arch_pre_nw.h b/include/arch/netware/apr_arch_pre_nw.h
index 36d9942c1..7380e1182 100644
--- a/include/arch/netware/apr_arch_pre_nw.h
+++ b/include/arch/netware/apr_arch_pre_nw.h
@@ -1,16 +1,3 @@
-#ifndef __pre_nw__
-#define __pre_nw__
-
-#include <stdint.h>
-
-#ifndef __GNUC__
-#pragma precompile_target "precomp.mch"
-#endif
-
-#define NETWARE
-
-#define N_PLAT_NLM
-
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -26,6 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#ifndef __pre_nw__
+#define __pre_nw__
+
+#include <stdint.h>
+
+#ifndef __GNUC__
+#pragma precompile_target "precomp.mch"
+#endif
+
+#define NETWARE
+
+#define N_PLAT_NLM
+
#define FAR
#define far
@@ -51,16 +51,6 @@
#define __int64 long long
#endif
-/* expat version */
-#define VERSION "expat_1.95.1"
-#define EXPAT_MAJOR_VERSION 1
-#define EXPAT_MINOR_VERSION 95
-#define EXPAT_EDIT 2
-
-#define XML_MAJOR_VERSION EXPAT_MAJOR_VERSION
-#define XML_MINOR_VERSION EXPAT_MINOR_VERSION
-#define XML_MICRO_VERSION EXPAT_EDIT
-
#endif
diff --git a/include/arch/netware/apr_arch_threadproc.h b/include/arch/netware/apr_arch_threadproc.h
index 713ed295a..2fee2c00e 100644
--- a/include/arch/netware/apr_arch_threadproc.h
+++ b/include/arch/netware/apr_arch_threadproc.h
@@ -68,11 +68,13 @@ struct apr_thread_once_t {
unsigned long value;
};
-//struct apr_proc_t {
-// apr_pool_t *pool;
-// pid_t pid;
-// apr_procattr_t *attr;
-//};
+/*
+struct apr_proc_t {
+ apr_pool_t *pool;
+ pid_t pid;
+ apr_procattr_t *attr;
+};
+*/
#endif /* ! THREAD_PROC_H */
diff --git a/include/arch/netware/apr_private.h b/include/arch/netware/apr_private.h
index a4e9b1e78..dbb3d2151 100644
--- a/include/arch/netware/apr_private.h
+++ b/include/arch/netware/apr_private.h
@@ -16,8 +16,8 @@
/*
* Note:
- * This is the windows specific autoconf-like config file
- * which unix would create at build time.
+ * This is the netware-specific autoconf-like config file
+ * which unix creates at ./configure time.
*/
#ifdef NETWARE
@@ -25,10 +25,16 @@
#ifndef APR_PRIVATE_H
#define APR_PRIVATE_H
-/* Include the public APR symbols, include our idea of the 'right'
- * subset of the Windows.h header. This saves us repetition.
+/* Pick up publicly advertised headers and symbols before the
+ * APR internal private headers and symbols
*/
-#include "apr.h"
+#include <apr.h>
+
+/* Pick up privately consumed headers */
+#include <ndkvers.h>
+
+/* Include alloca.h to get compiler-dependent defines */
+#include <alloca.h>
#include <sys/types.h>
#include <stddef.h>
@@ -72,16 +78,13 @@
#define HAVE_GETPASS_R 1
/*
- * check for older NDKs which have only the getpassword() function.
+ * Hack around older NDKs which have only the getpassword() function,
+ * a threadsafe, API-equivilant of getpass_r().
*/
-#include <ndkvers.h>
#if (CURRENT_NDK_THRESHOLD < 709060000)
-#define getpass_r getpassword
+#define getpass_r getpassword
#endif
-/* 64-bit integer conversion function */
-#define APR_INT64_STRFN strtoll
-
/*#define DSO_USE_DLFCN */
#ifdef NW_BUILD_IPV6
@@ -97,8 +100,8 @@
/* 6 is used for SIGTERM on netware */
/* 7 is used for SIGPOLL on netware */
+#if (CURRENT_NDK_THRESHOLD < 306030000)
#define SIGKILL 11
-#define SA_NOCLDSTOP 12
#define SIGALRM 13
#define SIGCHLD 14
#define SIGCONT 15
@@ -111,10 +114,10 @@
#define SIGTTOU 22
#define SIGUSR1 23
#define SIGUSR2 24
-
+#endif
+
#define SIGTRAP 25
#define SIGIOT 26
-#define SIGBUS 27
#define SIGSTKFLT 28
#define SIGURG 29
#define SIGXCPU 30
@@ -124,29 +127,23 @@
#define SIGWINCH 34
#define SIGIO 35
-#if 0
-#define __attribute__(__x)
-
-/* APR COMPATABILITY FUNCTIONS
- * This section should be used to define functions and
- * macros which are need to make Windows features look
- * like POSIX features.
- */
-typedef void (Sigfunc)(int);
+#if (CURRENT_NDK_THRESHOLD < 406230000)
+#undef SA_NOCLDSTOP
+#define SA_NOCLDSTOP 0x00000001
+#endif
+#ifndef SIGBUS
+#define SIGBUS SIGSEGV
#endif
-#define strcasecmp(s1, s2) stricmp(s1, s2)
-#define Sleep(t) delay(t)
-#define lstat(a,b) stat(a,b)
-#define _getch() getcharacter()
+#define _getch getcharacter
-#define SIZEOF_SHORT 2
-#define SIZEOF_INT 4
-#define SIZEOF_LONGLONG 8
-#define SIZEOF_CHAR 1
-#define SIZEOF_SSIZE_T SIZEOF_INT
+#define SIZEOF_SHORT 2
+#define SIZEOF_INT 4
+#define SIZEOF_LONGLONG 8
+#define SIZEOF_CHAR 1
+#define SIZEOF_SSIZE_T SIZEOF_INT
-void netware_pool_proc_cleanup ();
+void netware_pool_proc_cleanup();
/* NLM registration routines for managing which NLMs
are using the library. */
@@ -183,15 +180,21 @@ void* getStatCache();
and can be shared by the library. */
#undef malloc
#define malloc(x) library_malloc(gLibHandle,x)
+#ifndef __MWERKS__
+#define _alloca alloca
+#endif
+
+/* 64-bit integer conversion function */
+#define APR_INT64_STRFN strtoll
#if APR_HAS_LARGE_FILES
-#define APR_OFF_T_STRFN strtoll
+#define APR_OFF_T_STRFN strtoll
#else
-#define APR_OFF_T_STRFN strtol
+#define APR_OFF_T_STRFN strtol
#endif
/* used to check DWORD overflow for 64bit compiles */
-#define APR_DWORD_MAX 0xFFFFFFFFUL
+#define APR_DWORD_MAX 0xFFFFFFFFUL
/*
* Include common private declarations.
diff --git a/include/arch/os2/apr_arch_file_io.h b/include/arch/os2/apr_arch_file_io.h
index 399371237..79a57964e 100644
--- a/include/arch/os2/apr_arch_file_io.h
+++ b/include/arch/os2/apr_arch_file_io.h
@@ -49,12 +49,13 @@ struct apr_file_t {
/* Stuff for buffered mode */
char *buffer;
- apr_size_t bufsize; // Read/Write position in buffer
- apr_size_t bufpos; // Read/Write position in buffer
- unsigned long dataRead; // amount of valid data read into buffer
- int direction; // buffer being used for 0 = read, 1 = write
- unsigned long filePtr; // position in file of handle
- apr_thread_mutex_t *mutex;// mutex semaphore, must be owned to access the above fields
+ apr_size_t bufsize; /* Read/Write position in buffer */
+ apr_size_t bufpos; /* Read/Write position in buffer */
+ unsigned long dataRead; /* amount of valid data read into buffer */
+ int direction; /* buffer being used for 0 = read, 1 = write */
+ unsigned long filePtr; /* position in file of handle */
+ apr_thread_mutex_t *mutex; /* mutex semaphore, must be owned to access
+ the above fields */
};
struct apr_dir_t {
diff --git a/include/arch/win32/apr_arch_file_io.h b/include/arch/win32/apr_arch_file_io.h
index c8c7bdee8..6afaf8fb1 100644
--- a/include/arch/win32/apr_arch_file_io.h
+++ b/include/arch/win32/apr_arch_file_io.h
@@ -155,13 +155,13 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
* correctly when writing to a file with this flag set TRUE.
*/
-// for apr_poll.c;
+/* for apr_poll.c */
#define filedes filehand
struct apr_file_t {
apr_pool_t *pool;
HANDLE filehand;
- BOOLEAN pipe; // Is this a pipe of a file?
+ BOOLEAN pipe; /* Is this a pipe of a file? */
OVERLAPPED *pOverlapped;
apr_interval_time_t timeout;
apr_int32_t flags;
diff --git a/include/arch/win32/apr_arch_misc.h b/include/arch/win32/apr_arch_misc.h
index 1de496ed6..bdf3a135f 100644
--- a/include/arch/win32/apr_arch_misc.h
+++ b/include/arch/win32/apr_arch_misc.h
@@ -66,7 +66,7 @@ struct apr_other_child_rec_t {
*/
extern int APR_DECLARE_DATA apr_app_init_complete;
-int apr_wastrtoastr(char const * const * *retarr,
+int apr_wastrtoastr(char const * const * *retarr,
wchar_t const * const *arr, int args);
/* Platform specific designation of run time os version.
@@ -74,38 +74,38 @@ int apr_wastrtoastr(char const * const * *retarr,
* export new kernel or winsock functions or behavior.
*/
typedef enum {
- APR_WIN_UNK = 0,
- APR_WIN_UNSUP = 1,
- APR_WIN_95 = 10,
- APR_WIN_95_B = 11,
- APR_WIN_95_OSR2 = 12,
- APR_WIN_98 = 14,
- APR_WIN_98_SE = 16,
- APR_WIN_ME = 18,
-
- APR_WIN_UNICODE = 20, /* Prior versions support only narrow chars */
-
- APR_WIN_CE_3 = 23, /* CE is an odd beast, not supporting */
- /* some pre-NT features, such as the */
- APR_WIN_NT = 30, /* narrow charset APIs (fooA fns), while */
- APR_WIN_NT_3_5 = 35, /* not supporting some NT-family features. */
- APR_WIN_NT_3_51 = 36,
-
- APR_WIN_NT_4 = 40,
- APR_WIN_NT_4_SP2 = 42,
- APR_WIN_NT_4_SP3 = 43,
- APR_WIN_NT_4_SP4 = 44,
- APR_WIN_NT_4_SP5 = 45,
- APR_WIN_NT_4_SP6 = 46,
-
- APR_WIN_2000 = 50,
- APR_WIN_2000_SP1 = 51,
- APR_WIN_2000_SP2 = 52,
- APR_WIN_XP = 60,
- APR_WIN_XP_SP1 = 61,
- APR_WIN_XP_SP2 = 62,
- APR_WIN_2003 = 70,
- APR_WIN_VISTA = 80
+ APR_WIN_UNK = 0,
+ APR_WIN_UNSUP = 1,
+ APR_WIN_95 = 10,
+ APR_WIN_95_B = 11,
+ APR_WIN_95_OSR2 = 12,
+ APR_WIN_98 = 14,
+ APR_WIN_98_SE = 16,
+ APR_WIN_ME = 18,
+
+ APR_WIN_UNICODE = 20, /* Prior versions support only narrow chars */
+
+ APR_WIN_CE_3 = 23, /* CE is an odd beast, not supporting */
+ /* some pre-NT features, such as the */
+ APR_WIN_NT = 30, /* narrow charset APIs (fooA fns), while */
+ APR_WIN_NT_3_5 = 35, /* not supporting some NT-family features. */
+ APR_WIN_NT_3_51 = 36,
+
+ APR_WIN_NT_4 = 40,
+ APR_WIN_NT_4_SP2 = 42,
+ APR_WIN_NT_4_SP3 = 43,
+ APR_WIN_NT_4_SP4 = 44,
+ APR_WIN_NT_4_SP5 = 45,
+ APR_WIN_NT_4_SP6 = 46,
+
+ APR_WIN_2000 = 50,
+ APR_WIN_2000_SP1 = 51,
+ APR_WIN_2000_SP2 = 52,
+ APR_WIN_XP = 60,
+ APR_WIN_XP_SP1 = 61,
+ APR_WIN_XP_SP2 = 62,
+ APR_WIN_2003 = 70,
+ APR_WIN_VISTA = 80
} apr_oslevel_e;
extern APR_DECLARE_DATA apr_oslevel_e apr_os_level;
@@ -172,13 +172,13 @@ static APR_INLINE void* apr_realloc_dbg(void* userData, size_t newSize,
#endif /* ! _MSC_VER */
typedef enum {
- DLL_WINBASEAPI = 0, // kernel32 From WinBase.h
- DLL_WINADVAPI = 1, // advapi32 From WinBase.h
- DLL_WINSOCKAPI = 2, // mswsock From WinSock.h
- DLL_WINSOCK2API = 3, // ws2_32 From WinSock2.h
- DLL_SHSTDAPI = 4, // shell32 From ShellAPI.h
- DLL_NTDLL = 5, // shell32 From our real kernel
- DLL_defined = 6 // must define as last idx_ + 1
+ DLL_WINBASEAPI = 0, /* kernel32 From WinBase.h */
+ DLL_WINADVAPI = 1, /* advapi32 From WinBase.h */
+ DLL_WINSOCKAPI = 2, /* mswsock From WinSock.h */
+ DLL_WINSOCK2API = 3, /* ws2_32 From WinSock2.h */
+ DLL_SHSTDAPI = 4, /* shell32 From ShellAPI.h */
+ DLL_NTDLL = 5, /* shell32 From our real kernel */
+ DLL_defined = 6 /* must define as last idx_ + 1 */
} apr_dlltoken_e;
FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);
@@ -273,8 +273,8 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoW, 0,
OUT PACL *ppDacl,
OUT PACL *ppSacl,
OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
- (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
- ppDacl, ppSacl, ppSecurityDescriptor));
+ (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+ ppDacl, ppSacl, ppSecurityDescriptor));
#define GetNamedSecurityInfoW apr_winapi_GetNamedSecurityInfoW
APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoA, 0, (
@@ -286,8 +286,8 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoA, 0,
OUT PACL *ppDacl,
OUT PACL *ppSacl,
OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
- (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
- ppDacl, ppSacl, ppSecurityDescriptor));
+ (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+ ppDacl, ppSacl, ppSecurityDescriptor));
#define GetNamedSecurityInfoA apr_winapi_GetNamedSecurityInfoA
#undef GetNamedSecurityInfo
#define GetNamedSecurityInfo apr_winapi_GetNamedSecurityInfoA
@@ -301,12 +301,12 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetSecurityInfo, 0, (
OUT PACL *ppDacl,
OUT PACL *ppSacl,
OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
- (handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
- ppDacl, ppSacl, ppSecurityDescriptor));
+ (handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+ ppDacl, ppSacl, ppSecurityDescriptor));
#define GetSecurityInfo apr_winapi_GetSecurityInfo
APR_DECLARE_LATE_DLL_FUNC(DLL_SHSTDAPI, LPWSTR *, WINAPI, CommandLineToArgvW, 0, (
- LPCWSTR lpCmdLine,
+ LPCWSTR lpCmdLine,
int *pNumArgs),
(lpCmdLine, pNumArgs));
#define CommandLineToArgvW apr_winapi_CommandLineToArgvW
@@ -435,3 +435,4 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, Process32NextW, 0, (
#endif /* !defined(_WIN32_WCE) */
#endif /* ! MISC_H */
+