summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)@unknown>2000-11-20 19:57:41 +0000
committer(no author) <(no author)@unknown>2000-11-20 19:57:41 +0000
commit52387a5bc3f4a10af76f79186bdeb1ba70eef665 (patch)
tree4c6b057c9f39f2678965f03796be2067ebeafd99
parentf04475aea4e9893cf3b570d54a7d2cb856398223 (diff)
downloadapr-52387a5bc3f4a10af76f79186bdeb1ba70eef665.tar.gz
This commit was manufactured by cvs2svn to create tagAPACHE_2_0_ALPHA_8
'APACHE_2_0_ALPHA_8'. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/tags/APACHE_2_0_ALPHA_8@60774 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--apr.dsp546
-rw-r--r--include/arch/win32/misc.h178
-rw-r--r--libapr.def274
-rw-r--r--libapr.dsp102
-rw-r--r--memory/unix/apr_pools.c1223
-rw-r--r--misc/win32/libapr.c7
-rw-r--r--threadproc/beos/threadcancel.c88
-rw-r--r--threadproc/os2/threadcancel.c85
-rw-r--r--threadproc/win32/threadcancel.c86
-rw-r--r--user/unix/userinfo.c86
10 files changed, 0 insertions, 2675 deletions
diff --git a/apr.dsp b/apr.dsp
deleted file mode 100644
index c3cc6bf11..000000000
--- a/apr.dsp
+++ /dev/null
@@ -1,546 +0,0 @@
-# Microsoft Developer Studio Project File - Name="aprlib" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=aprlib - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "aprlib.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "aprlib.mak" CFG="aprlib - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "aprlib - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "aprlib - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "aprlib - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "LibR"
-# PROP BASE Intermediate_Dir "LibR"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "LibR"
-# PROP Intermediate_Dir "LibR"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409
-# ADD RSC /l 0x409
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"LibR\apr.lib"
-# ADD LIB32 /nologo /out:"LibR\apr.lib"
-
-!ELSEIF "$(CFG)" == "aprlib - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "LibD"
-# PROP BASE Intermediate_Dir "LibD"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "LibD"
-# PROP Intermediate_Dir "LibD"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409
-# ADD RSC /l 0x409
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo /out:"LibD\apr.lib"
-# ADD LIB32 /nologo /out:"LibD\apr.lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "aprlib - Win32 Release"
-# Name "aprlib - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter ".c"
-# Begin Group "time"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\time\win32\access.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arch\win32\atime.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\time\win32\time.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\time\win32\timestr.c
-# End Source File
-# End Group
-# Begin Group "strings"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\strings\apr_cpystrn.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strings\apr_fnmatch.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strings\apr_snprintf.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strings\apr_strings.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\strings\apr_strnatcmp.c
-# End Source File
-# End Group
-# Begin Group "passwd"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\passwd\apr_getpass.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\passwd\apr_md5.c
-# End Source File
-# End Group
-# Begin Group "tables"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\tables\apr_hash.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\tables\apr_tables.c
-# End Source File
-# End Group
-# Begin Group "misc"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\misc\unix\canonerr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\unix\errorcodes.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\unix\getopt.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\win32\getuuid.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\win32\misc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arch\unix\misc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\win32\names.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\win32\rand.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\unix\start.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\misc\unix\uuid.c
-# End Source File
-# End Group
-# Begin Group "file_io"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\file_io\win32\canonfile.c
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\win32\dir.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\unix\fileacc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\win32\filedup.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arch\win32\fileio.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\win32\filestat.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\unix\fullrw.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\win32\open.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\win32\pipe.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\win32\readwrite.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\file_io\win32\seek.c
-# End Source File
-# End Group
-# Begin Group "locks"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\locks\win32\locks.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arch\win32\locks.h
-# End Source File
-# End Group
-# Begin Group "network_io"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\network_io\unix\inet_ntop.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arch\win32\networkio.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\network_io\win32\poll.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\network_io\unix\sa_common.c
-# PROP Exclude_From_Build 1
-# End Source File
-# Begin Source File
-
-SOURCE=.\network_io\win32\sendrecv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\network_io\win32\sockaddr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\network_io\win32\sockets.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\network_io\win32\sockopt.c
-# End Source File
-# End Group
-# Begin Group "threadproc"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\threadproc\win32\proc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\threadproc\win32\signals.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\threadproc\win32\thread.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\threadproc\win32\threadpriv.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arch\win32\threadproc.h
-# End Source File
-# End Group
-# Begin Group "dso"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\dso\win32\dso.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\arch\win32\dso.h
-# End Source File
-# End Group
-# Begin Group "lib"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\lib\apr_pools.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\lib\apr_signal.c
-# End Source File
-# End Group
-# Begin Group "i18n"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\include\arch\unix\i18n.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\i18n\unix\utf8_ucs2.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\i18n\unix\xlate.c
-# PROP Exclude_From_Build 1
-# End Source File
-# End Group
-# Begin Group "shmem"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\shmem\win32\shmem.c
-# PROP Exclude_From_Build 1
-# End Source File
-# End Group
-# End Group
-# Begin Group "Generated Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\include\apr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr.h.in
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr.hw
-
-!IF "$(CFG)" == "aprlib - Win32 Release"
-
-# Begin Custom Build
-InputPath=.\include\apr.hw
-
-".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- copy .\include\apr.hw .\include\apr.h > nul
- echo Created apr.h from apr.hw
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "aprlib - Win32 Debug"
-
-# Begin Custom Build
-InputPath=.\include\apr.hw
-
-".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- copy .\include\apr.hw .\include\apr.h > nul
- echo Created apr.h from apr.hw
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_private.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_private.hw
-
-!IF "$(CFG)" == "aprlib - Win32 Release"
-
-# Begin Custom Build
-InputPath=.\include\apr_private.hw
-
-".\include\apr_private.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- copy .\include\apr_private.hw .\include\apr_private.h > nul
- echo Created apr_private.h from apr_private.hw
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "aprlib - Win32 Debug"
-
-# Begin Custom Build
-InputPath=.\include\apr_private.hw
-
-".\include\apr_private.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- copy .\include\apr_private.hw .\include\apr_private.h > nul
- echo Created apr_private.h from apr_private.hw
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Group "External Header Files"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=.\include\apr_compat.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_dso.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_errno.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_file_io.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_fnmatch.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_general.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_getopt.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_hash.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_lib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_lock.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_md5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_mmap.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_network_io.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_pools.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_portable.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_shmem.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_strings.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_tables.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_thread_proc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_time.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_uuid.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\include\apr_xlate.h
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\aprlib.def
-# PROP Exclude_From_Build 1
-# End Source File
-# End Target
-# End Project
diff --git a/include/arch/win32/misc.h b/include/arch/win32/misc.h
deleted file mode 100644
index e0ce1d050..000000000
--- a/include/arch/win32/misc.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#ifndef MISC_H
-#define MISC_H
-
-#include "apr.h"
-#include "apr_private.h"
-#include "apr_general.h"
-#include "apr_pools.h"
-#include "apr_getopt.h"
-#include "apr_thread_proc.h"
-#include "apr_file_io.h"
-#include "apr_errno.h"
-#include "apr_getopt.h"
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#if APR_HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#if APR_HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if APR_HAVE_PTHREAD_H
-#include <pthread.h>
-#endif
-#ifdef BEOS
-#include <kernel/OS.h>
-#endif
-
-typedef struct datastruct {
- const void *data;
- const char *key;
- struct datastruct *next;
- struct datastruct *prev;
-} datastruct;
-
-struct apr_other_child_rec_t {
- struct apr_other_child_rec_t *next;
- int id; /* This is either a pid or tid depending on the platform */
- void (*maintenance) (int, void *, int);
- void *data;
- int write_fd;
-};
-
-#ifdef WIN32
-#define WSAHighByte 2
-#define WSALowByte 0
-/* Platform specific designation of run time os version.
- * Gaps allow for specific service pack levels that
- * export new kernel or winsock functions or behavior.
- */
-typedef enum {
- APR_WIN_95 = 0,
- APR_WIN_98 = 4,
- APR_WIN_NT = 8,
- APR_WIN_NT_4 = 12,
- APR_WIN_NT_4_SP2 = 14,
- APR_WIN_NT_4_SP3 = 15,
- APR_WIN_NT_4_SP4 = 16,
- APR_WIN_NT_4_SP6 = 18,
- APR_WIN_2000 = 24
-} apr_oslevel_e;
-
-
-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_defined = 4 // must define as last idx_ + 1
-} apr_dlltoken_e;
-
-FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);
-
-/* The apr_load_dll_func call WILL fault if the function cannot be loaded */
-
-#define APR_DECLARE_LATE_DLL_FUNC(lib, rettype, calltype, fn, ord, args, names) \
- typedef rettype (calltype *apr_winapi_fpt_##fn) args; \
- static apr_winapi_fpt_##fn apr_winapi_pfn_##fn = NULL; \
- __inline rettype apr_winapi_##fn args \
- { if (!apr_winapi_pfn_##fn) \
- apr_winapi_pfn_##fn = (apr_winapi_fpt_##fn) \
- apr_load_dll_func(lib, #fn, ord); \
- return (*(apr_winapi_pfn_##fn)) names; }; \
-
-/* Provide late bound declarations of every API function missing from
- * one or more supported releases of the Win32 API
- *
- * lib is the enumerated token from apr_dlltoken_e, and must correspond
- * to the string table entry in start.c used by the apr_load_dll_func().
- * Token names (attempt to) follow Windows.h declarations prefixed by DLL_
- * in order to facilitate comparison. Use the exact declaration syntax
- * and names from Windows.h to prevent ambigutity and bugs.
- *
- * rettype and calltype follow the original declaration in Windows.h
- * fn is the true function name - beware Ansi/Unicode #defined macros
- * ord is the ordinal within the library, use 0 if it varies between versions
- * args is the parameter list following the original declaration, in parens
- * names is the parameter list sans data types, enclosed in parens
- *
- * #undef/re#define the Ansi/Unicode generic name to abate confusion
- * In the case of non-text functions, simply #define the original name
- */
-
-APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, GetFileAttributesExA, 0, (
- IN LPCSTR lpFileName,
- IN GET_FILEEX_INFO_LEVELS fInfoLevelId,
- OUT LPVOID lpFileInformation),
- (lpFileName, fInfoLevelId, lpFileInformation));
-#undef GetFileAttributesEx
-#define GetFileAttributesEx apr_winapi_GetFileAttributesExA
-
-APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, CancelIo, 0, (
- IN HANDLE hFile),
- (hFile));
-#define CancelIo apr_winapi_CancelIo
-
-apr_status_t apr_get_oslevel(struct apr_pool_t *, apr_oslevel_e *);
-#endif /* WIN32 */
-
-#endif /* ! MISC_H */
-
diff --git a/libapr.def b/libapr.def
deleted file mode 100644
index eae7b8662..000000000
--- a/libapr.def
+++ /dev/null
@@ -1,274 +0,0 @@
-; aprlib.def :
-
-LIBRARY aprlib
-DESCRIPTION ''
-
-EXPORTS
-; Add new API calls to the end of this list.
-; apr_file_io.h
- apr_open
- apr_close
- apr_remove_file
- apr_rename_file
- apr_eof
- apr_read
- apr_write
- apr_writev
- apr_full_read
- apr_full_write
- apr_putc
- apr_getc
- apr_ungetc
- apr_fgets
- apr_puts
- apr_flush
- apr_dupfile
- apr_getfileinfo
- apr_setfileperms
- apr_stat
- apr_lstat
- apr_seek
- apr_opendir
- apr_closedir
- apr_readdir
- apr_rewinddir
- apr_make_dir
- apr_remove_dir
- apr_dir_entry_size
- apr_dir_entry_mtime
- apr_dir_entry_ftype
- apr_get_dir_filename
-; apr_get_filename
- apr_create_pipe
-; apr_create_namedpipe
-; apr_set_pipe_timeout
- apr_get_filedata
- apr_set_filedata
- apr_get_os_file
- apr_put_os_file
- apr_get_os_dir
- apr_fprintf
-
-;
-; apr_network_io.h
- apr_get_sockaddr
- apr_getaddrinfo
- apr_create_socket
- apr_create_tcp_socket
- apr_shutdown
- apr_close_socket
- apr_bind
- apr_listen
- apr_accept
- apr_connect
- apr_get_hostname
- apr_gethostname
- apr_send
- apr_recv
- apr_setsocketopt
- apr_sendv
- apr_sendfile
- apr_setup_poll
- apr_poll
- apr_add_poll_socket
- apr_get_revents
- apr_get_socketdata
- apr_set_socketdata
- apr_get_polldata
- apr_set_polldata
- apr_put_os_sock
- apr_get_os_sock
- apr_remove_poll_socket
- apr_clear_poll_sockets
- apr_getsocketopt
- apr_get_ipaddr
- apr_set_ipaddr
- apr_get_port
- apr_set_port
- apr_get_inaddr
- apr_get_socket_inaddr
-
-;
-;
-; apr_thread_proc.h
- apr_createprocattr_init
- apr_setprocattr_io
- apr_setprocattr_dir
- apr_setprocattr_cmdtype
- apr_setprocattr_detach
- apr_create_process
-;
-;
-;
- apr_wait_proc
- apr_kill
- apr_create_threadattr
- apr_setthreadattr_detach
- apr_getthreadattr_detach
- apr_create_thread
- apr_thread_exit
- apr_thread_join
- apr_thread_detach
-;
- apr_create_thread_private
- apr_get_thread_private
- apr_set_thread_private
- apr_delete_thread_private
- apr_get_threaddata
- apr_set_threaddata
- apr_get_threadkeydata
- apr_set_threadkeydata
-;
-;
-;
- apr_get_os_thread
- apr_get_os_threadkey
-
-
- apr_create_pool
-;
-;
-;
- apr_get_userdata
- apr_set_userdata
- apr_initialize
-; apr_make_time
- apr_ansi_time_to_apr_time
- apr_now
- apr_explode_gmt
- apr_explode_localtime
- apr_implode_time
- apr_get_os_imp_time
- apr_get_os_exp_time
- apr_put_os_imp_time
- apr_put_os_exp_time
- apr_ctime
- apr_rfc822_date
- apr_strftime
-;
-;
-;
-;
-;
-;
-;
-;
-;
-;
- apr_MD5Final
- apr_MD5Init
- apr_MD5Update
- apr_cpystrn
- apr_register_cleanup
- apr_kill_cleanup
- apr_fnmatch
- apr_is_fnmatch
- apr_MD5Encode
- apr_validate_password
-;
-; apr_pools.h
- apr_make_sub_pool
- apr_init_alloc
- apr_clear_pool
- apr_destroy_pool
- apr_bytes_in_pool
- apr_bytes_in_free_blocks
- apr_palloc
- apr_pcalloc
- apr_pstrdup
- apr_pstrndup
- apr_pstrcat
- apr_pvsprintf
- apr_psprintf
-;
-; apr_tables.h
- apr_make_array
- apr_push_array
- apr_array_cat
- apr_copy_array
- apr_copy_array_hdr
- apr_append_arrays
- apr_array_pstrcat
- apr_make_table
- apr_copy_table
- apr_clear_table
- apr_table_get
- apr_table_set
- apr_table_setn
- apr_table_unset
- apr_table_merge
- apr_table_mergen
- apr_table_add
- apr_table_addn
- apr_overlay_tables
- apr_table_do
- apr_table_vdo
- apr_overlap_tables
-;
-;
- apr_run_cleanup
- apr_cleanup_for_exec
- apr_null_cleanup
- apr_note_subprocess
-;
- apr_vformatter
- apr_snprintf
- apr_vsnprintf
- apr_getpass
-
- apr_tokenize_to_argv
- apr_filename_of_pathname
- apr_get_remote_name
- apr_get_local_name
-
- apr_open_stderr
- apr_get_pipe_timeout
- apr_set_pipe_timeout
- apr_terminate
- apr_dso_load
- apr_dso_unload
- apr_dso_sym
- apr_collapse_spaces
- apr_month_snames
- apr_day_snames
- apr_canonical_error
- apr_strerror
- apr_generate_random_bytes
- apr_strnatcmp
- apr_strnatcasecmp
- apr_dso_error
-;
-; apr_hash.h
- apr_make_hash
- apr_hash_set
- apr_hash_get
- apr_hash_first
- apr_hash_next
- apr_hash_this
-;
-; apr_lock.h
- apr_create_lock
- apr_lock
- apr_unlock
- apr_destroy_lock
- apr_child_init_lock
- apr_get_lockdata
- apr_set_lockdata
- apr_get_os_lock
-;
-; apr_uuid.h
- apr_format_uuid
- apr_parse_uuid
- apr_get_uuid
-
-; Moved out of the way for Bill Stoddard's reorg
-;
-; apr_getopt.h
- apr_getopt
- apr_initopt
-; apr_opterr
-; apr_optind
-; apr_optopt
-; apr_optreset
-; apr_optarg
-
diff --git a/libapr.dsp b/libapr.dsp
deleted file mode 100644
index 2a5f31450..000000000
--- a/libapr.dsp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Microsoft Developer Studio Project File - Name="aprlibdll" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=aprlibdll - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "aprlibdll.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "aprlibdll.mak" CFG="aprlibdll - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "aprlibdll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "aprlibdll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "aprlibdll - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /O2 /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 apr.lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/aprlib.dll" /libpath:"LibR" /base:@"..\..\os\win32\BaseAddr.ref",aprlib
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /subsystem:windows /dll /map /machine:I386 /out:"Release/aprlib.dll" /base:@"..\..\os\win32\BaseAddr.ref",aprlib
-
-!ELSEIF "$(CFG)" == "aprlibdll - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /GX /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /ZI /c
-# ADD CPP /nologo /MDd /W3 /GX /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_EXPORT" /D "WIN32" /D "_WINDOWS" /FD /ZI /c
-# SUBTRACT CPP /YX
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o /win32 "NUL"
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 apr.lib kernel32.lib advapi32.lib ws2_32.lib mswsock.lib /nologo /subsystem:windows /dll /map /debug /machine:I386 /out:"Debug/aprlib.dll" /libpath:"LibD" /base:@"..\..\os\win32\BaseAddr.ref",aprlib
-# ADD LINK32 kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug/aprlib.dll" /base:@"..\..\os\win32\BaseAddr.ref",aprlib
-# SUBTRACT LINK32 /incremental:no /map
-
-!ENDIF
-
-# Begin Target
-
-# Name "aprlibdll - Win32 Release"
-# Name "aprlibdll - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\misc\win32\aprlib.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\aprlib.def
-# End Source File
-# End Target
-# End Project
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
deleted file mode 100644
index 736a0efd1..000000000
--- a/memory/unix/apr_pools.c
+++ /dev/null
@@ -1,1223 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-/*
- * Resource allocation code... the code here is responsible for making
- * sure that nothing leaks.
- *
- * rst --- 4/95 --- 6/95
- */
-
-#include "apr.h"
-#include "apr_private.h"
-
-#include "apr_portable.h" /* for get_os_proc */
-#include "apr_strings.h"
-#include "apr_general.h"
-#include "apr_pools.h"
-#include "apr_lib.h"
-#include "apr_lock.h"
-
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#ifdef HAVE_SYS_SIGNAL_H
-#include <sys/signal.h>
-#endif
-#if APR_HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-#if APR_HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#if APR_HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if APR_HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
-/* Details of the debugging options can now be found in the developer
- * section of the documentaion. */
-
-/* magic numbers --- min free bytes to consider a free apr_pool_t block useable,
- * and the min amount to allocate if we have to go to malloc() */
-
-#ifndef BLOCK_MINFREE
-#define BLOCK_MINFREE 4096
-#endif
-#ifndef BLOCK_MINALLOC
-#define BLOCK_MINALLOC 8192
-#endif
-
-#ifdef POOL_DEBUG
-/* first do some option checking... */
-#ifdef ALLOC_USE_MALLOC
-#error "sorry, no support for ALLOC_USE_MALLOC and POOL_DEBUG at the same time"
-#endif /* ALLOC_USE_MALLOC */
-
-#ifdef MULTITHREAD
-# error "sorry, no support for MULTITHREAD and POOL_DEBUG at the same time"
-#endif /* MULTITHREAD */
-
-#endif /* POOL_DEBUG */
-
-#ifdef ALLOC_USE_MALLOC
-#undef BLOCK_MINFREE
-#undef BLOCK_MINALLOC
-#define BLOCK_MINFREE 0
-#define BLOCK_MINALLOC 0
-#endif /* ALLOC_USE_MALLOC */
-
-#define APR_SLACK_LOW 1
-#define APR_SLACK_HIGH 2
-
-
-/*****************************************************************
- *
- * Managing free storage blocks...
- */
-
-union align {
- /*
- * Types which are likely to have the longest RELEVANT alignment
- * restrictions...
- */
-
- char *cp;
- void (*f) (void);
- long l;
- FILE *fp;
- double d;
-};
-
-#define CLICK_SZ (sizeof(union align))
-
-union block_hdr {
- union align a;
-
- /* Actual header... */
-
- struct {
- char *endp;
- union block_hdr *next;
- char *first_avail;
-#ifdef POOL_DEBUG
- union block_hdr *global_next;
- apr_pool_t *owning_pool;
-#endif /* POOL_DEBUG */
- } h;
-};
-
-#define APR_ABORT(conditional, retcode, func, str) \
- if (conditional) { \
- if ((func) == NULL) { \
- return NULL; \
- } \
- else { \
- fprintf(stderr, "%s", str); \
- (*(func))(retcode); \
- } \
- }
-
-/*
- * Static cells for managing our internal synchronisation.
- */
-static union block_hdr *block_freelist = NULL;
-
-#if APR_HAS_THREADS
-static apr_lock_t *alloc_mutex;
-static apr_lock_t *spawn_mutex;
-#endif
-
-#ifdef POOL_DEBUG
-static char *known_stack_point;
-static int stack_direction;
-static union block_hdr *global_block_list;
-#define FREE_POOL ((apr_pool_t *)(-1))
-#endif /* POOL_DEBUG */
-
-#ifdef ALLOC_STATS
-static unsigned long long num_free_blocks_calls;
-static unsigned long long num_blocks_freed;
-static unsigned max_blocks_in_one_free;
-static unsigned num_malloc_calls;
-static unsigned num_malloc_bytes;
-#endif /* ALLOC_STATS */
-
-#ifdef ALLOC_DEBUG
-#define FILL_BYTE ((char)(0xa5))
-#define debug_fill(ptr,size) ((void)memset((ptr), FILL_BYTE, (size)))
-
-static APR_INLINE void debug_verify_filled(const char *ptr, const char *endp,
- const char *error_msg)
-{
- for ( ; ptr < endp; ++ptr) {
- if (*ptr != FILL_BYTE) {
- fputs(error_msg, stderr);
- abort();
- exit(1);
- }
- }
-}
-
-#else /* ALLOC_DEBUG */
-#define debug_fill(a,b)
-#define debug_verify_filled(a,b,c)
-#endif /* ALLOC_DEBUG */
-
-/*
- * Get a completely new block from the system pool. Note that we rely on
- * malloc() to provide aligned memory.
- */
-
-static union block_hdr *malloc_block(int size, int (*apr_abort)(int retcode))
-{
- union block_hdr *blok;
-
-#ifdef ALLOC_DEBUG
- /* make some room at the end which we'll fill and expect to be
- * always filled
- */
- size += CLICK_SZ;
-#endif /* ALLOC_DEBUG */
-
-#ifdef ALLOC_STATS
- ++num_malloc_calls;
- num_malloc_bytes += size + sizeof(union block_hdr);
-#endif /* ALLOC_STATS */
-
- blok = (union block_hdr *) malloc(size + sizeof(union block_hdr));
- APR_ABORT(blok == NULL, APR_ENOMEM, apr_abort,
- "Ouch! malloc failed in malloc_block()\n");
- debug_fill(blok, size + sizeof(union block_hdr));
-
- blok->h.next = NULL;
- blok->h.first_avail = (char *) (blok + 1);
- blok->h.endp = size + blok->h.first_avail;
-
-#ifdef ALLOC_DEBUG
- blok->h.endp -= CLICK_SZ;
-#endif /* ALLOC_DEBUG */
-
-#ifdef POOL_DEBUG
- blok->h.global_next = global_block_list;
- global_block_list = blok;
- blok->h.owning_pool = NULL;
-#endif /* POOL_DEBUG */
-
- return blok;
-}
-
-
-
-#if defined(ALLOC_DEBUG) && !defined(ALLOC_USE_MALLOC)
-static void chk_on_blk_list(union block_hdr *blok, union block_hdr *free_blk)
-{
- debug_verify_filled(blok->h.endp, blok->h.endp + CLICK_SZ,
- "[chk_on_blk_list] Ouch! Someone trounced the padding "
- "at the end of a block!\n");
- while (free_blk) {
- if (free_blk == blok) {
- fprintf(stderr, "Ouch! Freeing free block\n");
- abort();
- exit(1);
- }
- free_blk = free_blk->h.next;
- }
-}
-#else /* defined(ALLOC_DEBUG) && !defined(ALLOC_USE_MALLOC) */
-#define chk_on_blk_list(_x, _y)
-#endif /* defined(ALLOC_DEBUG) && !defined(ALLOC_USE_MALLOC) */
-
-/* Free a chain of blocks --- must be called with alarms blocked. */
-
-static void free_blocks(union block_hdr *blok)
-{
-#ifdef ALLOC_USE_MALLOC
- union block_hdr *next;
-
- for ( ; blok; blok = next) {
- next = blok->h.next;
- free(blok);
- }
-#else /* ALLOC_USE_MALLOC */
-
-#ifdef ALLOC_STATS
- unsigned num_blocks;
-#endif /* ALLOC_STATS */
-
- /*
- * First, put new blocks at the head of the free list ---
- * we'll eventually bash the 'next' pointer of the last block
- * in the chain to point to the free blocks we already had.
- */
-
- union block_hdr *old_free_list;
-
- if (blok == NULL) {
- return; /* Sanity check --- freeing empty pool? */
- }
-
-#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
-#endif
- old_free_list = block_freelist;
- block_freelist = blok;
-
- /*
- * Next, adjust first_avail pointers of each block --- have to do it
- * sooner or later, and it simplifies the search in new_block to do it
- * now.
- */
-
-#ifdef ALLOC_STATS
- num_blocks = 1;
-#endif /* ALLOC_STATS */
-
- while (blok->h.next != NULL) {
-
-#ifdef ALLOC_STATS
- ++num_blocks;
-#endif /* ALLOC_STATS */
-
- chk_on_blk_list(blok, old_free_list);
- blok->h.first_avail = (char *) (blok + 1);
- debug_fill(blok->h.first_avail, blok->h.endp - blok->h.first_avail);
-#ifdef POOL_DEBUG
- blok->h.owning_pool = FREE_POOL;
-#endif /* POOL_DEBUG */
- blok = blok->h.next;
- }
-
- chk_on_blk_list(blok, old_free_list);
- blok->h.first_avail = (char *) (blok + 1);
- debug_fill(blok->h.first_avail, blok->h.endp - blok->h.first_avail);
-#ifdef POOL_DEBUG
- blok->h.owning_pool = FREE_POOL;
-#endif /* POOL_DEBUG */
-
- /* Finally, reset next pointer to get the old free blocks back */
-
- blok->h.next = old_free_list;
-
-#ifdef ALLOC_STATS
- if (num_blocks > max_blocks_in_one_free) {
- max_blocks_in_one_free = num_blocks;
- }
- ++num_free_blocks_calls;
- num_blocks_freed += num_blocks;
-#endif /* ALLOC_STATS */
-
-#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
-#endif /* APR_HAS_THREADS */
-#endif /* ALLOC_USE_MALLOC */
-}
-
-/*
- * Get a new block, from our own free list if possible, from the system
- * if necessary. Must be called with alarms blocked.
- */
-
-static union block_hdr *new_block(int min_size, int (*apr_abort)(int retcode))
-{
- union block_hdr **lastptr = &block_freelist;
- union block_hdr *blok = block_freelist;
-
- /* First, see if we have anything of the required size
- * on the free list...
- */
-
- while (blok != NULL) {
- if (min_size + BLOCK_MINFREE <= blok->h.endp - blok->h.first_avail) {
- *lastptr = blok->h.next;
- blok->h.next = NULL;
- debug_verify_filled(blok->h.first_avail, blok->h.endp,
- "[new_block] Ouch! Someone trounced a block "
- "on the free list!\n");
- return blok;
- }
- else {
- lastptr = &blok->h.next;
- blok = blok->h.next;
- }
- }
-
- /* Nope. */
-
- min_size += BLOCK_MINFREE;
- blok = malloc_block((min_size > BLOCK_MINALLOC)
- ? min_size : BLOCK_MINALLOC, apr_abort);
- return blok;
-}
-
-
-/* Accounting */
-
-static apr_size_t bytes_in_block_list(union block_hdr *blok)
-{
- apr_size_t size = 0;
-
- while (blok) {
- size += blok->h.endp - (char *) (blok + 1);
- blok = blok->h.next;
- }
-
- return size;
-}
-
-
-/*****************************************************************
- *
- * Pool internals and management...
- * NB that subprocesses are not handled by the generic cleanup code,
- * basically because we don't want cleanups for multiple subprocesses
- * to result in multiple three-second pauses.
- */
-
-struct process_chain;
-struct cleanup;
-
-static void run_cleanups(struct cleanup *c);
-static void free_proc_chain(struct process_chain *p);
-
-static apr_pool_t *permanent_pool;
-
-/* Each pool structure is allocated in the start of its own first block,
- * so we need to know how many bytes that is (once properly aligned...).
- * This also means that when a pool's sub-pool is destroyed, the storage
- * associated with it is *completely* gone, so we have to make sure it
- * gets taken off the parent's sub-pool list...
- */
-
-#define POOL_HDR_CLICKS (1 + ((sizeof(struct apr_pool_t) - 1) / CLICK_SZ))
-#define POOL_HDR_BYTES (POOL_HDR_CLICKS * CLICK_SZ)
-
-APR_DECLARE(apr_pool_t *) apr_make_sub_pool(apr_pool_t *p, int (*apr_abort)(int retcode))
-{
- union block_hdr *blok;
- apr_pool_t *new_pool;
-
-
-#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
-#endif
-
- blok = new_block(POOL_HDR_BYTES, apr_abort);
- new_pool = (apr_pool_t *) blok->h.first_avail;
- blok->h.first_avail += POOL_HDR_BYTES;
-#ifdef POOL_DEBUG
- blok->h.owning_pool = new_pool;
-#endif
-
- memset((char *) new_pool, '\0', sizeof(struct apr_pool_t));
- new_pool->free_first_avail = blok->h.first_avail;
- new_pool->first = new_pool->last = blok;
-
- if (p) {
- new_pool->parent = p;
- new_pool->sub_next = p->sub_pools;
- if (new_pool->sub_next) {
- new_pool->sub_next->sub_prev = new_pool;
- }
- p->sub_pools = new_pool;
- }
- else {
- permanent_pool = new_pool;
- }
-
-#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
-#endif
-
- return new_pool;
-}
-
-#ifdef POOL_DEBUG
-static void stack_var_init(char *s)
-{
- char t;
-
- if (s < &t) {
- stack_direction = 1; /* stack grows up */
- }
- else {
- stack_direction = -1; /* stack grows down */
- }
-}
-#endif
-
-#ifdef ALLOC_STATS
-static void dump_stats(void)
-{
- fprintf(stderr,
- "alloc_stats: [%d] #free_blocks %llu #blocks %llu max "
- "%u #malloc %u #bytes %u\n",
- (int) getpid(),
- num_free_blocks_calls,
- num_blocks_freed,
- max_blocks_in_one_free,
- num_malloc_calls,
- num_malloc_bytes);
-}
-#endif
-
-/*****************************************************************
- *
- * Managing generic cleanups.
- */
-
-struct cleanup {
- const void *data;
- apr_status_t (*plain_cleanup) (void *);
- apr_status_t (*child_cleanup) (void *);
- struct cleanup *next;
-};
-
-APR_DECLARE(void) apr_register_cleanup(apr_pool_t *p, const void *data,
- apr_status_t (*plain_cleanup) (void *),
- apr_status_t (*child_cleanup) (void *))
-{
- struct cleanup *c;
-
- if (p != NULL) {
- c = (struct cleanup *) apr_palloc(p, sizeof(struct cleanup));
- c->data = data;
- c->plain_cleanup = plain_cleanup;
- c->child_cleanup = child_cleanup;
- c->next = p->cleanups;
- p->cleanups = c;
- }
-}
-
-APR_DECLARE(void) apr_kill_cleanup(apr_pool_t *p, const void *data,
- apr_status_t (*cleanup) (void *))
-{
- struct cleanup *c;
- struct cleanup **lastp;
-
- if (p == NULL)
- return;
- c = p->cleanups;
- lastp = &p->cleanups;
- while (c) {
- if (c->data == data && c->plain_cleanup == cleanup) {
- *lastp = c->next;
- break;
- }
-
- lastp = &c->next;
- c = c->next;
- }
-}
-
-APR_DECLARE(apr_status_t) apr_run_cleanup(apr_pool_t *p, void *data,
- apr_status_t (*cleanup) (void *))
-{
- apr_kill_cleanup(p, data, cleanup);
- return (*cleanup) (data);
-}
-
-static void run_cleanups(struct cleanup *c)
-{
- while (c) {
- (*c->plain_cleanup) ((void *)c->data);
- c = c->next;
- }
-}
-
-static void run_child_cleanups(struct cleanup *c)
-{
- while (c) {
- (*c->child_cleanup) ((void *)c->data);
- c = c->next;
- }
-}
-
-static void cleanup_pool_for_exec(apr_pool_t *p)
-{
- run_child_cleanups(p->cleanups);
- p->cleanups = NULL;
-
- for (p = p->sub_pools; p; p = p->sub_next) {
- cleanup_pool_for_exec(p);
- }
-}
-
-APR_DECLARE(void) apr_cleanup_for_exec(void)
-{
-#if !defined(WIN32) && !defined(OS2)
- /*
- * Don't need to do anything on NT or OS/2, because I
- * am actually going to spawn the new process - not
- * exec it. All handles that are not inheritable, will
- * be automajically closed. The only problem is with
- * file handles that are open, but there isn't much
- * I can do about that (except if the child decides
- * to go out and close them
- */
- cleanup_pool_for_exec(permanent_pool);
-#endif /* ndef WIN32 */
-}
-
-APR_DECLARE_NONSTD(apr_status_t) apr_null_cleanup(void *data)
-{
- /* do nothing cleanup routine */
- return APR_SUCCESS;
-}
-
-apr_status_t apr_init_alloc(void)
-{
-#if APR_HAS_THREADS
- apr_status_t status;
-#endif
-#ifdef POOL_DEBUG
- char s;
-
- known_stack_point = &s;
- stack_var_init(&s);
-#endif
-#if APR_HAS_THREADS
- status = apr_create_lock(&alloc_mutex, APR_MUTEX, APR_INTRAPROCESS,
- NULL, NULL);
- if (status != APR_SUCCESS) {
- apr_destroy_lock(alloc_mutex);
- return status;
- }
- status = apr_create_lock(&spawn_mutex, APR_MUTEX, APR_INTRAPROCESS,
- NULL, NULL);
- if (status != APR_SUCCESS) {
- apr_destroy_lock(spawn_mutex);
- return status;
- }
-#endif
-
-#ifdef ALLOC_STATS
- atexit(dump_stats);
-#endif
-
- return APR_SUCCESS;
-}
-
-void apr_term_alloc(void)
-{
-#if APR_HAS_THREADS
- apr_destroy_lock(alloc_mutex);
- apr_destroy_lock(spawn_mutex);
-#endif
-}
-
-/* We only want to lock the mutex if we are being called from apr_clear_pool.
- * This is because if we also call this function from apr_destroy_real_pool,
- * which also locks the same mutex, and recursive locks aren't portable.
- * This way, we are garaunteed that we only lock this mutex once when calling
- * either one of these functions.
- */
-APR_DECLARE(void) apr_clear_pool(apr_pool_t *a)
-{
- while (a->sub_pools) {
- apr_destroy_pool(a->sub_pools);
- }
- /*
- * Don't hold the mutex during cleanups.
- */
- run_cleanups(a->cleanups);
- a->cleanups = NULL;
- free_proc_chain(a->subprocesses);
- a->subprocesses = NULL;
- free_blocks(a->first->h.next);
- a->first->h.next = NULL;
-
- a->prog_data = NULL;
-
- a->last = a->first;
- a->first->h.first_avail = a->free_first_avail;
- debug_fill(a->first->h.first_avail,
- a->first->h.endp - a->first->h.first_avail);
-
-#ifdef ALLOC_USE_MALLOC
- {
- void *c, *n;
-
- for (c = a->allocation_list; c; c = n) {
- n = *(void **)c;
- free(c);
- }
- a->allocation_list = NULL;
- }
-#endif
-}
-
-APR_DECLARE(void) apr_destroy_pool(apr_pool_t *a)
-{
- apr_clear_pool(a);
-#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
-#endif
-
- if (a->parent) {
- if (a->parent->sub_pools == a) {
- a->parent->sub_pools = a->sub_next;
- }
- if (a->sub_prev) {
- a->sub_prev->sub_next = a->sub_next;
- }
- if (a->sub_next) {
- a->sub_next->sub_prev = a->sub_prev;
- }
- }
-#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
-#endif
- free_blocks(a->first);
-}
-
-APR_DECLARE(apr_size_t) apr_bytes_in_pool(apr_pool_t *p)
-{
- return bytes_in_block_list(p->first);
-}
-APR_DECLARE(apr_size_t) apr_bytes_in_free_blocks(void)
-{
- return bytes_in_block_list(block_freelist);
-}
-
-/*****************************************************************
- * POOL_DEBUG support
- */
-#ifdef POOL_DEBUG
-
-/* the unix linker defines this symbol as the last byte + 1 of
- * the executable... so it includes TEXT, BSS, and DATA
- */
-extern char _end;
-
-/* is ptr in the range [lo,hi) */
-#define is_ptr_in_range(ptr, lo, hi) \
- (((unsigned long)(ptr) - (unsigned long)(lo)) \
- < (unsigned long)(hi) - (unsigned long)(lo))
-
-/* Find the pool that ts belongs to, return NULL if it doesn't
- * belong to any pool.
- */
-APR_DECLARE(apr_pool_t *) apr_find_pool(const void *ts)
-{
- const char *s = ts;
- union block_hdr **pb;
- union block_hdr *b;
-
- /* short-circuit stuff which is in TEXT, BSS, or DATA */
- if (is_ptr_in_range(s, 0, &_end)) {
- return NULL;
- }
- /* consider stuff on the stack to also be in the NULL pool...
- * XXX: there's cases where we don't want to assume this
- */
- if ((stack_direction == -1 && is_ptr_in_range(s, &ts, known_stack_point))
- || (stack_direction == 1 && is_ptr_in_range(s, known_stack_point, &ts))) {
- abort();
- return NULL;
- }
- /* search the global_block_list */
- for (pb = &global_block_list; *pb; pb = &b->h.global_next) {
- b = *pb;
- if (is_ptr_in_range(s, b, b->h.endp)) {
- if (b->h.owning_pool == FREE_POOL) {
- fprintf(stderr,
- "Ouch! find_pool() called on pointer in a free block\n");
- abort();
- exit(1);
- }
- if (b != global_block_list) {
- /*
- * promote b to front of list, this is a hack to speed
- * up the lookup
- */
- *pb = b->h.global_next;
- b->h.global_next = global_block_list;
- global_block_list = b;
- }
- return b->h.owning_pool;
- }
- }
- return NULL;
-}
-
-/* return TRUE iff a is an ancestor of b
- * NULL is considered an ancestor of all pools
- */
-APR_DECLARE(int) apr_pool_is_ancestor(apr_pool_t *a, apr_pool_t *b)
-{
- if (a == NULL) {
- return 1;
- }
- while (a->joined) {
- a = a->joined;
- }
- while (b) {
- if (a == b) {
- return 1;
- }
- b = b->parent;
- }
- return 0;
-}
-
-/*
- * All blocks belonging to sub will be changed to point to p
- * instead. This is a guarantee by the caller that sub will not
- * be destroyed before p is.
- */
-APR_DECLARE(void) apr_pool_join(apr_pool_t *p, apr_pool_t *sub)
-{
- union block_hdr *b;
-
- /* We could handle more general cases... but this is it for now. */
- if (sub->parent != p) {
- fprintf(stderr, "pool_join: p is not parent of sub\n");
- abort();
- }
- while (p->joined) {
- p = p->joined;
- }
- sub->joined = p;
- for (b = global_block_list; b; b = b->h.global_next) {
- if (b->h.owning_pool == sub) {
- b->h.owning_pool = p;
- }
- }
- return 0;
-}
-#endif
-
-/*****************************************************************
- *
- * Allocating stuff...
- */
-
-APR_DECLARE(void*) apr_palloc(apr_pool_t *a, apr_size_t reqsize)
-{
-#ifdef ALLOC_USE_MALLOC
- apr_size_t size = reqsize + CLICK_SZ;
- void *ptr;
-
- if (a == NULL) {
- return malloc(reqsize);
- }
- if (c == NULL) {
- return malloc(reqsize);
- }
- ptr = malloc(size);
- if (ptr == NULL) {
- fputs("Ouch! Out of memory!\n", stderr);
- exit(1);
- }
- debug_fill(ptr, size); /* might as well get uninitialized protection */
- *(void **)ptr = a->allocation_list;
- a->allocation_list = ptr;
- return (char *)ptr + CLICK_SZ;
-#else
-
- /*
- * Round up requested size to an even number of alignment units
- * (core clicks)
- */
- apr_size_t nclicks;
- apr_size_t size;
-
- /* First, see if we have space in the block most recently
- * allocated to this pool
- */
-
- union block_hdr *blok;
- char *first_avail;
- char *new_first_avail;
-
-
- if (a == NULL) {
- return malloc(reqsize);
- }
-
-
- nclicks = 1 + ((reqsize - 1) / CLICK_SZ);
- size = nclicks * CLICK_SZ;
-
- /* First, see if we have space in the block most recently
- * allocated to this pool
- */
-
- blok = a->last;
- first_avail = blok->h.first_avail;
-
- if (reqsize <= 0) {
- return NULL;
- }
-
- new_first_avail = first_avail + size;
-
- if (new_first_avail <= blok->h.endp) {
- debug_verify_filled(first_avail, blok->h.endp,
- "[apr_palloc] Ouch! Someone trounced past the end "
- "of their allocation!\n");
- blok->h.first_avail = new_first_avail;
- return (void *) first_avail;
- }
-
- /* Nope --- get a new one that's guaranteed to be big enough */
-
-#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
-#endif
-
- blok = new_block(size, a->apr_abort);
- a->last->h.next = blok;
- a->last = blok;
-#ifdef POOL_DEBUG
- blok->h.owning_pool = a;
-#endif
-
-#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
-#endif
-
- first_avail = blok->h.first_avail;
- blok->h.first_avail += size;
-
- return (void *) first_avail;
-#endif
-}
-
-APR_DECLARE(void *) apr_pcalloc(apr_pool_t *a, apr_size_t size)
-{
- void *res = apr_palloc(a, size);
- memset(res, '\0', size);
- return res;
-}
-
-/*
- * apr_psprintf is implemented by writing directly into the current
- * block of the pool, starting right at first_avail. If there's
- * insufficient room, then a new block is allocated and the earlier
- * output is copied over. The new block isn't linked into the pool
- * until all the output is done.
- *
- * Note that this is completely safe because nothing else can
- * allocate in this apr_pool_t while apr_psprintf is running. alarms are
- * blocked, and the only thing outside of alloc.c that's invoked
- * is apr_vformatter -- which was purposefully written to be
- * self-contained with no callouts.
- */
-
-struct psprintf_data {
- apr_vformatter_buff_t vbuff;
-#ifdef ALLOC_USE_MALLOC
- char *base;
-#else
- union block_hdr *blok;
- int got_a_new_block;
-#endif
-};
-
-static int psprintf_flush(apr_vformatter_buff_t *vbuff)
-{
- struct psprintf_data *ps = (struct psprintf_data *)vbuff;
-#ifdef ALLOC_USE_MALLOC
- apr_size_t size;
- char *ptr;
-
- size = (char *)ps->vbuff.curpos - ps->base;
- ptr = realloc(ps->base, 2*size);
- if (ptr == NULL) {
- fputs("Ouch! Out of memory!\n", stderr);
- exit(1);
- }
- ps->base = ptr;
- ps->vbuff.curpos = ptr + size;
- ps->vbuff.endpos = ptr + 2*size - 1;
- return 0;
-#else
- union block_hdr *blok;
- union block_hdr *nblok;
- apr_size_t cur_len;
- char *strp;
-
- blok = ps->blok;
- strp = ps->vbuff.curpos;
- cur_len = strp - blok->h.first_avail;
-
- /* must try another blok */
-#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
-#endif
- nblok = new_block(2 * cur_len, NULL);
-#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
-#endif
- memcpy(nblok->h.first_avail, blok->h.first_avail, cur_len);
- ps->vbuff.curpos = nblok->h.first_avail + cur_len;
- /* save a byte for the NUL terminator */
- ps->vbuff.endpos = nblok->h.endp - 1;
-
- /* did we allocate the current blok? if so free it up */
- if (ps->got_a_new_block) {
- debug_fill(blok->h.first_avail, blok->h.endp - blok->h.first_avail);
-#if APR_HAS_THREADS
- apr_lock(alloc_mutex);
-#endif
- blok->h.next = block_freelist;
- block_freelist = blok;
-#if APR_HAS_THREADS
- apr_unlock(alloc_mutex);
-#endif
- }
- ps->blok = nblok;
- ps->got_a_new_block = 1;
- /* note that we've deliberately not linked the new block onto
- * the pool yet... because we may need to flush again later, and
- * we'd have to spend more effort trying to unlink the block.
- */
- return 0;
-#endif
-}
-
-APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *p, const char *fmt, va_list ap)
-{
-#ifdef ALLOC_USE_MALLOC
- struct psprintf_data ps;
- void *ptr;
-
- ps.base = malloc(512);
- if (ps.base == NULL) {
- fputs("Ouch! Out of memory!\n", stderr);
- exit(1);
- }
- /* need room at beginning for allocation_list */
- ps.vbuff.curpos = ps.base + CLICK_SZ;
- ps.vbuff.endpos = ps.base + 511;
- apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap);
- *ps.vbuff.curpos++ = '\0';
- ptr = ps.base;
- /* shrink */
- ptr = realloc(ptr, (char *)ps.vbuff.curpos - (char *)ptr);
- if (ptr == NULL) {
- fputs("Ouch! Out of memory!\n", stderr);
- exit(1);
- }
- *(void **)ptr = p->allocation_list;
- p->allocation_list = ptr;
- return (char *)ptr + CLICK_SZ;
-#else
- struct psprintf_data ps;
- char *strp;
- apr_size_t size;
-
- ps.blok = p->last;
- ps.vbuff.curpos = ps.blok->h.first_avail;
- ps.vbuff.endpos = ps.blok->h.endp - 1; /* save one for NUL */
- ps.got_a_new_block = 0;
-
- apr_vformatter(psprintf_flush, &ps.vbuff, fmt, ap);
-
- strp = ps.vbuff.curpos;
- *strp++ = '\0';
-
- size = strp - ps.blok->h.first_avail;
- size = (1 + ((size - 1) / CLICK_SZ)) * CLICK_SZ;
- strp = ps.blok->h.first_avail; /* save away result pointer */
- ps.blok->h.first_avail += size;
-
- /* have to link the block in if it's a new one */
- if (ps.got_a_new_block) {
- p->last->h.next = ps.blok;
- p->last = ps.blok;
-#ifdef POOL_DEBUG
- ps.blok->h.owning_pool = p;
-#endif
- }
-
- return strp;
-#endif
-}
-
-APR_DECLARE_NONSTD(char *) apr_psprintf(apr_pool_t *p, const char *fmt, ...)
-{
- va_list ap;
- char *res;
-
- va_start(ap, fmt);
- res = apr_pvsprintf(p, fmt, ap);
- va_end(ap);
- return res;
-}
-
-
-/*****************************************************************
- *
- * More grotty system stuff... subprocesses. Frump. These don't use
- * the generic cleanup interface because I don't want multiple
- * subprocesses to result in multiple three-second pauses; the
- * subprocesses have to be "freed" all at once. If someone comes
- * along with another resource they want to allocate which has the
- * same property, we might want to fold support for that into the
- * generic interface, but for now, it's a special case
- */
-
-APR_DECLARE(void) apr_note_subprocess(apr_pool_t *a, apr_proc_t *pid,
- enum kill_conditions how)
-{
- struct process_chain *new =
- (struct process_chain *) apr_palloc(a, sizeof(struct process_chain));
-
- new->pid = pid;
- new->kill_how = how;
- new->next = a->subprocesses;
- a->subprocesses = new;
-}
-
-static void free_proc_chain(struct process_chain *procs)
-{
- /* Dispose of the subprocesses we've spawned off in the course of
- * whatever it was we're cleaning up now. This may involve killing
- * some of them off...
- */
- struct process_chain *p;
- int need_timeout = 0;
-
- if (procs == NULL) {
- return; /* No work. Whew! */
- }
-
- /* First, check to see if we need to do the SIGTERM, sleep, SIGKILL
- * dance with any of the processes we're cleaning up. If we've got
- * any kill-on-sight subprocesses, ditch them now as well, so they
- * don't waste any more cycles doing whatever it is that they shouldn't
- * be doing anymore.
- */
-
-#ifndef NEED_WAITPID
- /* Pick up all defunct processes */
- for (p = procs; p; p = p->next) {
- if (apr_wait_proc(p->pid, APR_NOWAIT) == APR_CHILD_DONE) {
- p->kill_how = kill_never;
- }
- }
-#endif
-
- for (p = procs; p; p = p->next) {
- if ((p->kill_how == kill_after_timeout)
- || (p->kill_how == kill_only_once)) {
- /*
- * Subprocess may be dead already. Only need the timeout if not.
- * Note: apr_kill on Windows is TerminateProcess(), which is
- * similar to a SIGKILL, so always give the process a timeout
- * under Windows before killing it.
- */
-#ifdef WIN32
- need_timeout = 1;
-#else
- if (apr_kill(p->pid, APR_SIGTERM) == APR_SUCCESS) {
- need_timeout = 1;
- }
-#endif
- }
- else if (p->kill_how == kill_always) {
- apr_kill(p->pid, APR_SIGKILL);
- }
- }
-
- /* Sleep only if we have to... */
- if (need_timeout) {
- sleep(3);
- }
-
- /* OK, the scripts we just timed out for have had a chance to clean up
- * --- now, just get rid of them, and also clean up the system accounting
- * goop...
- */
- for (p = procs; p; p = p->next) {
- if (p->kill_how == kill_after_timeout) {
- apr_kill(p->pid, APR_SIGKILL);
- }
- }
-#ifdef WIN32
- /*
- * Do we need an APR function to clean-up a proc_t?
- */
- {
- for (p = procs; p; p = p->next) {
- CloseHandle((HANDLE)p->pid->pid);
- }
- }
-#endif /* WIN32 */
-
- /* Now wait for all the signaled processes to die */
- for (p = procs; p; p = p->next) {
- if (p->kill_how != kill_never) {
- (void) apr_wait_proc(p->pid, APR_WAIT);
- }
- }
-}
diff --git a/misc/win32/libapr.c b/misc/win32/libapr.c
deleted file mode 100644
index b54667430..000000000
--- a/misc/win32/libapr.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
- * Placeholder to force aprlib.dll creation with no LNK4001 error
- *
- * However, this isn't a bad place to store dynamic-only functions
- * that determine which version of apr the application has loaded.
- * These functions are of (less?) importance to static-bound apps.
- */
diff --git a/threadproc/beos/threadcancel.c b/threadproc/beos/threadcancel.c
deleted file mode 100644
index 94a7e9407..000000000
--- a/threadproc/beos/threadcancel.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "threadproc.h"
-
-
-ap_status_t ap_cancel_thread(ap_thread_t *thd)
-{
- if (kill_thread(thd->td) == 0) {
- return APR_SUCCESS;
- }
- else {
- return errno;
- }
-}
-
-
-ap_status_t ap_setcanceltype(ap_int32_t type, ap_pool_t *cont)
-{
-/* if (pthread_setcanceltype(type, NULL) == 0) {*/
- return APR_SUCCESS;
-/* }
- else {
- return APR_FAILURE;
- }*/
-}
-
-ap_status_t ap_setcancelstate(ap_int32_t type, ap_pool_t *cont)
-{
-/* if (pthread_setcanceltype(type, NULL) == 0) {*/
- return APR_SUCCESS;
-/* }
- else {
- return APR_FAILURE;
- }*/
-}
-
diff --git a/threadproc/os2/threadcancel.c b/threadproc/os2/threadcancel.c
deleted file mode 100644
index ca7a18753..000000000
--- a/threadproc/os2/threadcancel.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "threadproc.h"
-#include "apr_thread_proc.h"
-#include "apr_general.h"
-#include "fileio.h"
-
-ap_status_t ap_cancel_thread(ap_thread_t *thd)
-{
- return APR_OS2_STATUS(DosKillThread(thd->tid));
-}
-
-
-
-ap_status_t ap_setcanceltype(ap_int32_t type, ap_pool_t *cont)
-{
- ULONG rc, nesting;
-
- if (type == APR_CANCEL_DEFER)
- rc = DosEnterMustComplete(&nesting);
- else
- rc = DosExitMustComplete(&nesting);
-
- return APR_OS2_STATUS(rc);
-}
-
-
-
-ap_status_t ap_setcancelstate(ap_int32_t type, ap_pool_t *cont)
-{
-/* There's no way to ignore thread kills altogether in OS/2 (that I know of) */
- return APR_ENOTIMPL;
-}
diff --git a/threadproc/win32/threadcancel.c b/threadproc/win32/threadcancel.c
deleted file mode 100644
index 3a509202b..000000000
--- a/threadproc/win32/threadcancel.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "threadproc.h"
-#include "apr_thread_proc.h"
-#include "apr_general.h"
-
-
-ap_status_t ap_cancel_thread(ap_thread_t *thd)
-{
- if (TerminateThread(thd->td, APR_SUCCESS) == 0) {
- return APR_EEXIST;
- }
- else {
- return APR_SUCCESS;
- }
-}
-
-/* Not sure of the best way to do this just yet.
-ap_status_t ap_setcanceltype(ap_int32_t type, ap_pool_t *cont)
-{
-
-}
-
-ap_status_t ap_setcancelstate(ap_int32_t type, ap_pool_t *cont)
-{
- ap_status_t stat;
- if ((stat = pthread_setcanceltype(type, NULL)) == 0) {
- return APR_SUCCESS;
- }
- else {
- return stat;
- }
-}
-*/
diff --git a/user/unix/userinfo.c b/user/unix/userinfo.c
deleted file mode 100644
index ae02406b4..000000000
--- a/user/unix/userinfo.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2000 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Apache" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-
-#include "apr_strings.h"
-#include "apr_portable.h"
-#include "apr_user.h"
-#include "apr_private.h"
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#if APR_HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-apr_status_t apr_get_home_directory(char **dirname, const char *userid, apr_pool_t *p)
-{
- struct passwd *pw;
-#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
- struct passwd pwd;
- char pwbuf[512];
-#endif
-
-#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
- if (!getpwnam_r(userid, &pwd, pwbuf, sizeof(pwbuf), &pw)) {
-#else
- if ((pw = getpwnam(userid)) != NULL) {
-#endif
- *dirname = apr_pstrdup(p, pw->pw_dir);
- }
- else {
- return errno;
- }
- return APR_SUCCESS;
-}
-