[core] rename lib apr symbols to fspr

This commit is contained in:
Chris Rienzo 2022-08-18 13:40:33 -04:00 committed by Andrey Volk
parent 3c7e8ff989
commit 5c2726f413
354 changed files with 11614 additions and 11614 deletions

View File

@ -45,7 +45,7 @@ TARGETS = $(TARGET_LIB) export_vars.c apr.exp
CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \
build/apr_rules.out
DISTCLEAN_TARGETS = config.cache config.log config.status \
include/apr.h include/arch/unix/apr_private.h \
include/fspr.h include/arch/unix/apr_private.h \
libtool $(APR_CONFIG) build/apr_rules.mk apr.pc \
build/pkg/pkginfo
EXTRACLEAN_TARGETS = configure aclocal.m4 include/arch/unix/apr_private.h.in \
@ -81,7 +81,7 @@ $(top_srcdir)/configure: $(top_srcdir)/configure.ac
install: $(TARGET_LIB) apr-config.out build/apr_rules.out
$(APR_MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(installbuilddir) \
$(DESTDIR)$(libdir)/pkgconfig $(DESTDIR)$(includedir)
$(INSTALL_DATA) $(top_blddir)/include/apr.h $(DESTDIR)$(includedir)
$(INSTALL_DATA) $(top_blddir)/include/fspr.h $(DESTDIR)$(includedir)
for f in $(top_srcdir)/include/apr_*.h; do \
$(INSTALL_DATA) $${f} $(DESTDIR)$(includedir); \
done

View File

@ -41,7 +41,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "LibR"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibR\apr_src" /FD /c
# ADD CPP /nologo /MD /W3 /O2 /Oy- /Zi /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "NDEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibR\fspr_src" /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@ -65,7 +65,7 @@ LIB32=link.exe -lib
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /EHsc /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FD /c
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibD\apr_src" /FD /c
# ADD CPP /nologo /MDd /W3 /EHsc /Zi /Od /I "./include" /I "./include/arch" /I "./include/arch/win32" /I "./include/arch/unix" /D "_DEBUG" /D "APR_DECLARE_STATIC" /D "WIN32" /D "_WINDOWS" /Fd"LibD\fspr_src" /FD /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@ -89,7 +89,7 @@ LIB32=link.exe -lib
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\atomic\win32\apr_atomic.c
SOURCE=.\atomic\win32\fspr_atomic.c
# End Source File
# End Group
# Begin Group "dso"
@ -193,7 +193,7 @@ SOURCE=.\locks\win32\thread_rwlock.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\memory\unix\apr_pools.c
SOURCE=.\memory\unix\fspr_pools.c
# End Source File
# End Group
# Begin Group "misc"
@ -201,7 +201,7 @@ SOURCE=.\memory\unix\apr_pools.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\misc\win32\apr_app.c
SOURCE=.\misc\win32\fspr_app.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
@ -302,7 +302,7 @@ SOURCE=.\network_io\win32\sockopt.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\passwd\apr_getpass.c
SOURCE=.\passwd\fspr_getpass.c
# End Source File
# End Group
# Begin Group "random"
@ -310,7 +310,7 @@ SOURCE=.\passwd\apr_getpass.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\random\unix\apr_random.c
SOURCE=.\random\unix\fspr_random.c
# End Source File
# Begin Source File
@ -334,27 +334,27 @@ SOURCE=.\shmem\win32\shm.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\strings\apr_cpystrn.c
SOURCE=.\strings\fspr_cpystrn.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_fnmatch.c
SOURCE=.\strings\fspr_fnmatch.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_snprintf.c
SOURCE=.\strings\fspr_snprintf.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_strings.c
SOURCE=.\strings\fspr_strings.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_strnatcmp.c
SOURCE=.\strings\fspr_strnatcmp.c
# End Source File
# Begin Source File
SOURCE=.\strings\apr_strtok.c
SOURCE=.\strings\fspr_strtok.c
# End Source File
# End Group
# Begin Group "tables"
@ -362,11 +362,11 @@ SOURCE=.\strings\apr_strtok.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\tables\apr_hash.c
SOURCE=.\tables\fspr_hash.c
# End Source File
# Begin Source File
SOURCE=.\tables\apr_tables.c
SOURCE=.\tables\fspr_tables.c
# End Source File
# End Group
# Begin Group "threadproc"
@ -423,51 +423,51 @@ SOURCE=.\user\win32\userinfo.c
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_atime.h
SOURCE=.\include\arch\win32\fspr_arch_atime.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_dso.h
SOURCE=.\include\arch\win32\fspr_arch_dso.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_file_io.h
SOURCE=.\include\arch\win32\fspr_arch_file_io.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_inherit.h
SOURCE=.\include\arch\win32\fspr_arch_inherit.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_misc.h
SOURCE=.\include\arch\win32\fspr_arch_misc.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_networkio.h
SOURCE=.\include\arch\win32\fspr_arch_networkio.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_thread_mutex.h
SOURCE=.\include\arch\win32\fspr_arch_thread_mutex.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_thread_rwlock.h
SOURCE=.\include\arch\win32\fspr_arch_thread_rwlock.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_threadproc.h
SOURCE=.\include\arch\win32\fspr_arch_threadproc.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_arch_utf8.h
SOURCE=.\include\arch\win32\fspr_arch_utf8.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\win32\apr_private.h
SOURCE=.\include\arch\win32\fspr_private.h
# End Source File
# Begin Source File
SOURCE=.\include\arch\apr_private_common.h
SOURCE=.\include\arch\fspr_private_common.h
# End Source File
# End Group
# Begin Group "Public Header Files"
@ -475,35 +475,35 @@ SOURCE=.\include\arch\apr_private_common.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\include\apr.h.in
SOURCE=.\include\fspr.h.in
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\include\apr.hnw
SOURCE=.\include\fspr.hnw
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=.\include\apr.hw
SOURCE=.\include\fspr.hw
!IF "$(CFG)" == "apr - Win32 Release"
# Begin Custom Build - Creating apr.h from apr.hw
InputPath=.\include\apr.hw
InputPath=.\include\fspr.hw
".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
type .\include\apr.hw > .\include\apr.h
".\include\fspr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
type .\include\fspr.hw > .\include\fspr.h
# End Custom Build
!ELSEIF "$(CFG)" == "apr - Win32 Debug"
# Begin Custom Build - Creating apr.h from apr.hw
InputPath=.\include\apr.hw
InputPath=.\include\fspr.hw
".\include\apr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
type .\include\apr.hw > .\include\apr.h
".\include\fspr.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
type .\include\fspr.hw > .\include\fspr.h
# End Custom Build
@ -512,139 +512,139 @@ InputPath=.\include\apr.hw
# End Source File
# Begin Source File
SOURCE=.\include\apr_allocator.h
SOURCE=.\include\fspr_allocator.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_atomic.h
SOURCE=.\include\fspr_atomic.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_dso.h
SOURCE=.\include\fspr_dso.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_env.h
SOURCE=.\include\fspr_env.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_errno.h
SOURCE=.\include\fspr_errno.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_file_info.h
SOURCE=.\include\fspr_file_info.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_file_io.h
SOURCE=.\include\fspr_file_io.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_fnmatch.h
SOURCE=.\include\fspr_fnmatch.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_general.h
SOURCE=.\include\fspr_general.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_getopt.h
SOURCE=.\include\fspr_getopt.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_global_mutex.h
SOURCE=.\include\fspr_global_mutex.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_hash.h
SOURCE=.\include\fspr_hash.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_inherit.h
SOURCE=.\include\fspr_inherit.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_lib.h
SOURCE=.\include\fspr_lib.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_mmap.h
SOURCE=.\include\fspr_mmap.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_network_io.h
SOURCE=.\include\fspr_network_io.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_poll.h
SOURCE=.\include\fspr_poll.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_pools.h
SOURCE=.\include\fspr_pools.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_portable.h
SOURCE=.\include\fspr_portable.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_proc_mutex.h
SOURCE=.\include\fspr_proc_mutex.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_ring.h
SOURCE=.\include\fspr_ring.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_shm.h
SOURCE=.\include\fspr_shm.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_signal.h
SOURCE=.\include\fspr_signal.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_strings.h
SOURCE=.\include\fspr_strings.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_support.h
SOURCE=.\include\fspr_support.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_tables.h
SOURCE=.\include\fspr_tables.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_thread_cond.h
SOURCE=.\include\fspr_thread_cond.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_thread_mutex.h
SOURCE=.\include\fspr_thread_mutex.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_thread_proc.h
SOURCE=.\include\fspr_thread_proc.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_thread_rwlock.h
SOURCE=.\include\fspr_thread_rwlock.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_time.h
SOURCE=.\include\fspr_time.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_user.h
SOURCE=.\include\fspr_user.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_version.h
SOURCE=.\include\fspr_version.h
# End Source File
# Begin Source File
SOURCE=.\include\apr_want.h
SOURCE=.\include\fspr_want.h
# End Source File
# End Group
# End Target

View File

@ -15,7 +15,7 @@ Package=<4>
###############################################################################
Project: "apr_app"=".\build\apr_app.dsp" - Package Owner=<4>
Project: "fspr_app"=".\build\fspr_app.dsp" - Package Owner=<4>
Package=<5>
{{{
@ -42,7 +42,7 @@ Package=<4>
###############################################################################
Project: "libapr_app"=".\build\libapr_app.dsp" - Package Owner=<4>
Project: "libfspr_app"=".\build\libfspr_app.dsp" - Package Owner=<4>
Package=<5>
{{{

View File

@ -14,57 +14,57 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_atomic.h"
#include "fspr.h"
#include "fspr_atomic.h"
#include <stdlib.h>
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_atomic_init(fspr_pool_t *pool)
{
return APR_SUCCESS;
}
APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(fspr_uint32_t) fspr_atomic_add32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
return atomic_xchgadd((unsigned long *)mem,(unsigned long)val);
}
APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(void) fspr_atomic_sub32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
atomic_sub((unsigned long *)mem,(unsigned long)val);
}
APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem)
APR_DECLARE(fspr_uint32_t) fspr_atomic_inc32(volatile fspr_uint32_t *mem)
{
return atomic_xchgadd((unsigned long *)mem, 1);
}
APR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(void) fspr_atomic_set32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
*mem = val;
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)
APR_DECLARE(fspr_uint32_t) fspr_atomic_read32(volatile fspr_uint32_t *mem)
{
return *mem;
}
APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,apr_uint32_t cmp)
APR_DECLARE(fspr_uint32_t) fspr_atomic_cas32(volatile fspr_uint32_t *mem, fspr_uint32_t with,fspr_uint32_t cmp)
{
return atomic_cmpxchg((unsigned long *)mem,(unsigned long)cmp,(unsigned long)with);
}
APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(fspr_uint32_t) fspr_atomic_xchg32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
return atomic_xchg((unsigned long *)mem,(unsigned long)val);
}
APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
APR_DECLARE(int) fspr_atomic_dec32(volatile fspr_uint32_t *mem)
{
return (atomic_xchgadd((unsigned long *)mem, 0xFFFFFFFF) - 1);
}
APR_DECLARE(void *) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
APR_DECLARE(void *) fspr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
{
return (void*)atomic_cmpxchg((unsigned long *)mem,(unsigned long)cmp,(unsigned long)with);
}

View File

@ -15,19 +15,19 @@
*/
#include "apr.h"
#include "apr_atomic.h"
#include "fspr.h"
#include "fspr_atomic.h"
#include <stdlib.h>
apr_status_t apr_atomic_init(apr_pool_t *p)
fspr_status_t fspr_atomic_init(fspr_pool_t *p)
{
return APR_SUCCESS;
}
apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
fspr_uint32_t fspr_atomic_add32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t old, new_val;
fspr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {
@ -36,9 +36,9 @@ apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
return old;
}
void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
void fspr_atomic_sub32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t old, new_val;
fspr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {
@ -46,14 +46,14 @@ void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
} while (__cs(&old, (cs_t *)mem, new_val));
}
apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)
fspr_uint32_t fspr_atomic_inc32(volatile fspr_uint32_t *mem)
{
return apr_atomic_add32(mem, 1);
return fspr_atomic_add32(mem, 1);
}
int apr_atomic_dec32(volatile apr_uint32_t *mem)
int fspr_atomic_dec32(volatile fspr_uint32_t *mem)
{
apr_uint32_t old, new_val;
fspr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {
@ -63,28 +63,28 @@ int apr_atomic_dec32(volatile apr_uint32_t *mem)
return new_val != 0;
}
apr_uint32_t apr_atomic_read32(volatile apr_uint32_t *mem)
fspr_uint32_t fspr_atomic_read32(volatile fspr_uint32_t *mem)
{
return *mem;
}
void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
void fspr_atomic_set32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
*mem = val;
}
apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t swap,
apr_uint32_t cmp)
fspr_uint32_t fspr_atomic_cas32(volatile fspr_uint32_t *mem, fspr_uint32_t swap,
fspr_uint32_t cmp)
{
apr_uint32_t old = cmp;
fspr_uint32_t old = cmp;
__cs(&old, (cs_t *)mem, swap);
return old; /* old is automatically updated from mem on cs failure */
}
apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
fspr_uint32_t fspr_atomic_xchg32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t old, new_val;
fspr_uint32_t old, new_val;
old = *mem; /* old is automatically updated on cs failure */
do {

View File

@ -14,11 +14,11 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_atomic.h"
#include "apr_thread_mutex.h"
#include "fspr.h"
#include "fspr_atomic.h"
#include "fspr_thread_mutex.h"
#include "apr_private.h"
#include "fspr_private.h"
#include <stdlib.h>
@ -31,11 +31,11 @@
#if (defined(__i386__) || defined(__x86_64__)) \
&& defined(__GNUC__) && !defined(USE_GENERIC_ATOMICS)
APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem,
apr_uint32_t with,
apr_uint32_t cmp)
APR_DECLARE(fspr_uint32_t) fspr_atomic_cas32(volatile fspr_uint32_t *mem,
fspr_uint32_t with,
fspr_uint32_t cmp)
{
apr_uint32_t prev;
fspr_uint32_t prev;
asm volatile ("lock; cmpxchgl %1, %2"
: "=a" (prev)
@ -45,8 +45,8 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem,
}
#define APR_OVERRIDE_ATOMIC_CAS32
static apr_uint32_t inline intel_atomic_add32(volatile apr_uint32_t *mem,
apr_uint32_t val)
static fspr_uint32_t inline intel_atomic_add32(volatile fspr_uint32_t *mem,
fspr_uint32_t val)
{
asm volatile ("lock; xaddl %0,%1"
: "=r"(val), "=m"(*mem) /* outputs */
@ -55,14 +55,14 @@ static apr_uint32_t inline intel_atomic_add32(volatile apr_uint32_t *mem,
return val;
}
APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem,
apr_uint32_t val)
APR_DECLARE(fspr_uint32_t) fspr_atomic_add32(volatile fspr_uint32_t *mem,
fspr_uint32_t val)
{
return intel_atomic_add32(mem, val);
}
#define APR_OVERRIDE_ATOMIC_ADD32
APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(void) fspr_atomic_sub32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
asm volatile ("lock; subl %1, %0"
:
@ -71,7 +71,7 @@ APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
}
#define APR_OVERRIDE_ATOMIC_SUB32
APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
APR_DECLARE(int) fspr_atomic_dec32(volatile fspr_uint32_t *mem)
{
unsigned char prev;
@ -84,21 +84,21 @@ APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
}
#define APR_OVERRIDE_ATOMIC_DEC32
APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem)
APR_DECLARE(fspr_uint32_t) fspr_atomic_inc32(volatile fspr_uint32_t *mem)
{
return intel_atomic_add32(mem, 1);
}
#define APR_OVERRIDE_ATOMIC_INC32
APR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(void) fspr_atomic_set32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
*mem = val;
}
#define APR_OVERRIDE_ATOMIC_SET32
APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(fspr_uint32_t) fspr_atomic_xchg32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t prev = val;
fspr_uint32_t prev = val;
asm volatile ("lock; xchgl %0, %1"
: "=r" (prev)
@ -108,18 +108,18 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint
}
#define APR_OVERRIDE_ATOMIC_XCHG32
/*#define apr_atomic_init(pool) APR_SUCCESS*/
/*#define fspr_atomic_init(pool) APR_SUCCESS*/
#endif /* (__linux__ || __EMX__ || __FreeBSD__) && __i386__ */
#if (defined(__PPC__) || defined(__ppc__)) && defined(__GNUC__) \
&& !defined(USE_GENERIC_ATOMICS)
APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem,
apr_uint32_t swap,
apr_uint32_t cmp)
APR_DECLARE(fspr_uint32_t) fspr_atomic_cas32(volatile fspr_uint32_t *mem,
fspr_uint32_t swap,
fspr_uint32_t cmp)
{
apr_uint32_t prev;
fspr_uint32_t prev;
asm volatile ("0:\n\t" /* retry local label */
"lwarx %0,0,%1\n\t" /* load prev and reserve */
@ -138,10 +138,10 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem,
}
#define APR_OVERRIDE_ATOMIC_CAS32
APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem,
apr_uint32_t delta)
APR_DECLARE(fspr_uint32_t) fspr_atomic_add32(volatile fspr_uint32_t *mem,
fspr_uint32_t delta)
{
apr_uint32_t prev, temp;
fspr_uint32_t prev, temp;
asm volatile ("0:\n\t" /* retry local label */
"lwarx %0,0,%2\n\t" /* load prev and reserve */
@ -168,18 +168,18 @@ APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem,
#define NUM_ATOMIC_HASH 7
/* shift by 2 to get rid of alignment issues */
#define ATOMIC_HASH(x) (unsigned int)(((unsigned long)(x)>>2)%(unsigned int)NUM_ATOMIC_HASH)
static apr_thread_mutex_t **hash_mutex;
static fspr_thread_mutex_t **hash_mutex;
#endif /* APR_HAS_THREADS */
apr_status_t apr_atomic_init(apr_pool_t *p)
fspr_status_t fspr_atomic_init(fspr_pool_t *p)
{
#if APR_HAS_THREADS
int i;
apr_status_t rv;
hash_mutex = apr_palloc(p, sizeof(apr_thread_mutex_t*) * NUM_ATOMIC_HASH);
fspr_status_t rv;
hash_mutex = fspr_palloc(p, sizeof(fspr_thread_mutex_t*) * NUM_ATOMIC_HASH);
for (i = 0; i < NUM_ATOMIC_HASH; i++) {
rv = apr_thread_mutex_create(&(hash_mutex[i]),
rv = fspr_thread_mutex_create(&(hash_mutex[i]),
APR_THREAD_MUTEX_DEFAULT, p);
if (rv != APR_SUCCESS) {
return rv;
@ -195,28 +195,28 @@ apr_status_t apr_atomic_init(apr_pool_t *p)
#if !defined(APR_OVERRIDE_ATOMIC_ADD32)
#if defined(APR_OVERRIDE_ATOMIC_CAS32)
apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
fspr_uint32_t fspr_atomic_add32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t old_value, new_value;
fspr_uint32_t old_value, new_value;
do {
old_value = *mem;
new_value = old_value + val;
} while (apr_atomic_cas32(mem, new_value, old_value) != old_value);
} while (fspr_atomic_cas32(mem, new_value, old_value) != old_value);
return old_value;
}
#else
apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
fspr_uint32_t fspr_atomic_add32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t old_value;
fspr_uint32_t old_value;
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
fspr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
CHECK(apr_thread_mutex_lock(lock));
CHECK(fspr_thread_mutex_lock(lock));
old_value = *mem;
*mem += val;
CHECK(apr_thread_mutex_unlock(lock));
CHECK(fspr_thread_mutex_unlock(lock));
#else
old_value = *mem;
*mem += val;
@ -228,24 +228,24 @@ apr_uint32_t apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
#if !defined(APR_OVERRIDE_ATOMIC_SUB32)
#if defined(APR_OVERRIDE_ATOMIC_CAS32)
void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
void fspr_atomic_sub32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t old_value, new_value;
fspr_uint32_t old_value, new_value;
do {
old_value = *mem;
new_value = old_value - val;
} while (apr_atomic_cas32(mem, new_value, old_value) != old_value);
} while (fspr_atomic_cas32(mem, new_value, old_value) != old_value);
}
#else
void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
void fspr_atomic_sub32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
fspr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
CHECK(apr_thread_mutex_lock(lock));
CHECK(fspr_thread_mutex_lock(lock));
*mem -= val;
CHECK(apr_thread_mutex_unlock(lock));
CHECK(fspr_thread_mutex_unlock(lock));
#else
*mem -= val;
#endif /* APR_HAS_THREADS */
@ -254,14 +254,14 @@ void apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
#endif /* !defined(APR_OVERRIDE_ATOMIC_SUB32) */
#if !defined(APR_OVERRIDE_ATOMIC_SET32)
void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
void fspr_atomic_set32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
fspr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
CHECK(apr_thread_mutex_lock(lock));
CHECK(fspr_thread_mutex_lock(lock));
*mem = val;
CHECK(apr_thread_mutex_unlock(lock));
CHECK(fspr_thread_mutex_unlock(lock));
#else
*mem = val;
#endif /* APR_HAS_THREADS */
@ -269,35 +269,35 @@ void apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
#endif /* !defined(APR_OVERRIDE_ATOMIC_SET32) */
#if !defined(APR_OVERRIDE_ATOMIC_INC32)
apr_uint32_t apr_atomic_inc32(volatile apr_uint32_t *mem)
fspr_uint32_t fspr_atomic_inc32(volatile fspr_uint32_t *mem)
{
return apr_atomic_add32(mem, 1);
return fspr_atomic_add32(mem, 1);
}
#endif /* !defined(APR_OVERRIDE_ATOMIC_INC32) */
#if !defined(APR_OVERRIDE_ATOMIC_DEC32)
#if defined(APR_OVERRIDE_ATOMIC_CAS32)
int apr_atomic_dec32(volatile apr_uint32_t *mem)
int fspr_atomic_dec32(volatile fspr_uint32_t *mem)
{
apr_uint32_t old_value, new_value;
fspr_uint32_t old_value, new_value;
do {
old_value = *mem;
new_value = old_value - 1;
} while (apr_atomic_cas32(mem, new_value, old_value) != old_value);
} while (fspr_atomic_cas32(mem, new_value, old_value) != old_value);
return old_value != 1;
}
#else
int apr_atomic_dec32(volatile apr_uint32_t *mem)
int fspr_atomic_dec32(volatile fspr_uint32_t *mem)
{
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
apr_uint32_t new;
fspr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
fspr_uint32_t new;
CHECK(apr_thread_mutex_lock(lock));
CHECK(fspr_thread_mutex_lock(lock));
(*mem)--;
new = *mem;
CHECK(apr_thread_mutex_unlock(lock));
CHECK(fspr_thread_mutex_unlock(lock));
return new;
#else
(*mem)--;
@ -308,19 +308,19 @@ int apr_atomic_dec32(volatile apr_uint32_t *mem)
#endif /* !defined(APR_OVERRIDE_ATOMIC_DEC32) */
#if !defined(APR_OVERRIDE_ATOMIC_CAS32)
apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,
apr_uint32_t cmp)
fspr_uint32_t fspr_atomic_cas32(volatile fspr_uint32_t *mem, fspr_uint32_t with,
fspr_uint32_t cmp)
{
apr_uint32_t prev;
fspr_uint32_t prev;
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
fspr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
CHECK(apr_thread_mutex_lock(lock));
CHECK(fspr_thread_mutex_lock(lock));
prev = *mem;
if (prev == cmp) {
*mem = with;
}
CHECK(apr_thread_mutex_unlock(lock));
CHECK(fspr_thread_mutex_unlock(lock));
#else
prev = *mem;
if (prev == cmp) {
@ -333,25 +333,25 @@ apr_uint32_t apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,
#if !defined(APR_OVERRIDE_ATOMIC_XCHG32)
#if defined(APR_OVERRIDE_ATOMIC_CAS32)
apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
fspr_uint32_t fspr_atomic_xchg32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t prev;
fspr_uint32_t prev;
do {
prev = *mem;
} while (apr_atomic_cas32(mem, val, prev) != prev);
} while (fspr_atomic_cas32(mem, val, prev) != prev);
return prev;
}
#else
apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
fspr_uint32_t fspr_atomic_xchg32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
apr_uint32_t prev;
fspr_uint32_t prev;
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
fspr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
CHECK(apr_thread_mutex_lock(lock));
CHECK(fspr_thread_mutex_lock(lock));
prev = *mem;
*mem = val;
CHECK(apr_thread_mutex_unlock(lock));
CHECK(fspr_thread_mutex_unlock(lock));
#else
prev = *mem;
*mem = val;
@ -362,18 +362,18 @@ apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
#endif /* !defined(APR_OVERRIDE_ATOMIC_XCHG32) */
#if !defined(APR_OVERRIDE_ATOMIC_CASPTR)
void *apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
void *fspr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
{
void *prev;
#if APR_HAS_THREADS
apr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
fspr_thread_mutex_t *lock = hash_mutex[ATOMIC_HASH(mem)];
CHECK(apr_thread_mutex_lock(lock));
CHECK(fspr_thread_mutex_lock(lock));
prev = *(void **)mem;
if (prev == cmp) {
*mem = with;
}
CHECK(apr_thread_mutex_unlock(lock));
CHECK(fspr_thread_mutex_unlock(lock));
#else
prev = *(void **)mem;
if (prev == cmp) {
@ -385,7 +385,7 @@ void *apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
#endif /* !defined(APR_OVERRIDE_ATOMIC_CASPTR) */
#if !defined(APR_OVERRIDE_ATOMIC_READ32)
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)
APR_DECLARE(fspr_uint32_t) fspr_atomic_read32(volatile fspr_uint32_t *mem)
{
return *mem;
}

View File

@ -14,59 +14,59 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_atomic.h"
#include "apr_thread_mutex.h"
#include "fspr.h"
#include "fspr_atomic.h"
#include "fspr_thread_mutex.h"
APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_atomic_init(fspr_pool_t *p)
{
return APR_SUCCESS;
}
/*
* Remapping function pointer type to accept apr_uint32_t's type-safely
* as the arguments for as our apr_atomic_foo32 Functions
* Remapping function pointer type to accept fspr_uint32_t's type-safely
* as the arguments for as our fspr_atomic_foo32 Functions
*/
#if (_MSC_VER < 1800)
typedef WINBASEAPI apr_uint32_t (WINAPI * apr_atomic_win32_ptr_fn)
(apr_uint32_t volatile *);
typedef WINBASEAPI apr_uint32_t (WINAPI * apr_atomic_win32_ptr_val_fn)
(apr_uint32_t volatile *,
apr_uint32_t);
typedef WINBASEAPI apr_uint32_t (WINAPI * apr_atomic_win32_ptr_val_val_fn)
(apr_uint32_t volatile *,
apr_uint32_t, apr_uint32_t);
typedef WINBASEAPI void * (WINAPI * apr_atomic_win32_ptr_ptr_ptr_fn)
typedef WINBASEAPI fspr_uint32_t (WINAPI * fspr_atomic_win32_ptr_fn)
(fspr_uint32_t volatile *);
typedef WINBASEAPI fspr_uint32_t (WINAPI * fspr_atomic_win32_ptr_val_fn)
(fspr_uint32_t volatile *,
fspr_uint32_t);
typedef WINBASEAPI fspr_uint32_t (WINAPI * fspr_atomic_win32_ptr_val_val_fn)
(fspr_uint32_t volatile *,
fspr_uint32_t, fspr_uint32_t);
typedef WINBASEAPI void * (WINAPI * fspr_atomic_win32_ptr_ptr_ptr_fn)
(volatile void **,
void *, const void *);
#endif
APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(fspr_uint32_t) fspr_atomic_add32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
#if (defined(_M_IA64) || defined(_M_AMD64))
return InterlockedExchangeAdd(mem, val);
#elif (_MSC_VER >= 1800)
return InterlockedExchangeAdd(mem, val);
#else
return ((apr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, val);
return ((fspr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, val);
#endif
}
/* Of course we want the 2's compliment of the unsigned value, val */
#pragma warning(disable: 4146)
APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(void) fspr_atomic_sub32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
#if (defined(_M_IA64) || defined(_M_AMD64))
InterlockedExchangeAdd(mem, -val);
#elif (_MSC_VER >= 1800)
InterlockedExchangeAdd(mem, -val);
#else
((apr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, -val);
((fspr_atomic_win32_ptr_val_fn)InterlockedExchangeAdd)(mem, -val);
#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem)
APR_DECLARE(fspr_uint32_t) fspr_atomic_inc32(volatile fspr_uint32_t *mem)
{
/* we return old value, win32 returns new value :( */
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
@ -74,50 +74,50 @@ APR_DECLARE(apr_uint32_t) apr_atomic_inc32(volatile apr_uint32_t *mem)
#elif (_MSC_VER >= 1800)
return InterlockedIncrement(mem) - 1;
#else
return ((apr_atomic_win32_ptr_fn)InterlockedIncrement)(mem) - 1;
return ((fspr_atomic_win32_ptr_fn)InterlockedIncrement)(mem) - 1;
#endif
}
APR_DECLARE(int) apr_atomic_dec32(volatile apr_uint32_t *mem)
APR_DECLARE(int) fspr_atomic_dec32(volatile fspr_uint32_t *mem)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedDecrement(mem);
#elif (_MSC_VER >= 1800)
return InterlockedDecrement(mem);
#else
return ((apr_atomic_win32_ptr_fn)InterlockedDecrement)(mem);
return ((fspr_atomic_win32_ptr_fn)InterlockedDecrement)(mem);
#endif
}
APR_DECLARE(void) apr_atomic_set32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(void) fspr_atomic_set32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
InterlockedExchange(mem, val);
#elif (_MSC_VER >= 1800)
InterlockedExchange(mem, val);
#else
((apr_atomic_win32_ptr_val_fn)InterlockedExchange)(mem, val);
((fspr_atomic_win32_ptr_val_fn)InterlockedExchange)(mem, val);
#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)
APR_DECLARE(fspr_uint32_t) fspr_atomic_read32(volatile fspr_uint32_t *mem)
{
return *mem;
}
APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with,
apr_uint32_t cmp)
APR_DECLARE(fspr_uint32_t) fspr_atomic_cas32(volatile fspr_uint32_t *mem, fspr_uint32_t with,
fspr_uint32_t cmp)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedCompareExchange(mem, with, cmp);
#elif (_MSC_VER >= 1800)
return InterlockedCompareExchange(mem, with, cmp);
#else
return ((apr_atomic_win32_ptr_val_val_fn)InterlockedCompareExchange)(mem, with, cmp);
return ((fspr_atomic_win32_ptr_val_val_fn)InterlockedCompareExchange)(mem, with, cmp);
#endif
}
APR_DECLARE(void *) apr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
APR_DECLARE(void *) fspr_atomic_casptr(volatile void **mem, void *with, const void *cmp)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedCompareExchangePointer(mem, with, cmp);
@ -125,17 +125,17 @@ APR_DECLARE(void *) apr_atomic_casptr(volatile void **mem, void *with, const voi
return InterlockedCompareExchangePointer(mem, with, cmp);
#else
/* Too many VC6 users have stale win32 API files, stub this */
return ((apr_atomic_win32_ptr_ptr_ptr_fn)InterlockedCompareExchange)(mem, with, cmp);
return ((fspr_atomic_win32_ptr_ptr_ptr_fn)InterlockedCompareExchange)(mem, with, cmp);
#endif
}
APR_DECLARE(apr_uint32_t) apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val)
APR_DECLARE(fspr_uint32_t) fspr_atomic_xchg32(volatile fspr_uint32_t *mem, fspr_uint32_t val)
{
#if (defined(_M_IA64) || defined(_M_AMD64)) && !defined(RC_INVOKED)
return InterlockedExchange(mem, val);
#elif (_MSC_VER >= 1800)
return InterlockedExchange(mem, val);
#else
return ((apr_atomic_win32_ptr_val_fn)InterlockedExchange)(mem, val);
return ((fspr_atomic_win32_ptr_val_fn)InterlockedExchange)(mem, val);
#endif
}

View File

@ -1,83 +1,83 @@
# DO NOT EDIT. AUTOMATICALLY GENERATED.
passwd/apr_getpass.lo: passwd/apr_getpass.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h
strings/apr_cpystrn.lo: strings/apr_cpystrn.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h
strings/apr_strnatcmp.lo: strings/apr_strnatcmp.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h
strings/apr_strings.lo: strings/apr_strings.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h
strings/apr_strtok.lo: strings/apr_strtok.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_pools.h
strings/apr_fnmatch.lo: strings/apr_fnmatch.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_file_info.h include/apr_user.h include/apr_fnmatch.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
strings/apr_snprintf.lo: strings/apr_snprintf.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
tables/apr_tables.lo: tables/apr_tables.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h include/apr_tables.h
tables/apr_hash.lo: tables/apr_hash.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_thread_mutex.h include/apr_hash.h include/apr_pools.h
passwd/fspr_getpass.lo: passwd/fspr_getpass.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h
strings/fspr_cpystrn.lo: strings/fspr_cpystrn.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h
strings/fspr_strnatcmp.lo: strings/fspr_strnatcmp.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h
strings/fspr_strings.lo: strings/fspr_strings.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h
strings/fspr_strtok.lo: strings/fspr_strtok.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_pools.h
strings/fspr_fnmatch.lo: strings/fspr_fnmatch.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_file_info.h include/fspr_user.h include/fspr_fnmatch.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
strings/fspr_snprintf.lo: strings/fspr_snprintf.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
tables/fspr_tables.lo: tables/fspr_tables.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h include/fspr_tables.h
tables/fspr_hash.lo: tables/fspr_hash.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_hash.h include/fspr_pools.h
OBJECTS_all = passwd/apr_getpass.lo strings/apr_cpystrn.lo strings/apr_strnatcmp.lo strings/apr_strings.lo strings/apr_strtok.lo strings/apr_fnmatch.lo strings/apr_snprintf.lo tables/apr_tables.lo tables/apr_hash.lo
OBJECTS_all = passwd/fspr_getpass.lo strings/fspr_cpystrn.lo strings/fspr_strnatcmp.lo strings/fspr_strings.lo strings/fspr_strtok.lo strings/fspr_fnmatch.lo strings/fspr_snprintf.lo tables/fspr_tables.lo tables/fspr_hash.lo
atomic/unix/apr_atomic.lo: atomic/unix/apr_atomic.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_thread_mutex.h include/apr_atomic.h include/apr_pools.h
atomic/unix/fspr_atomic.lo: atomic/unix/fspr_atomic.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_atomic.h include/fspr_pools.h
OBJECTS_atomic_unix = atomic/unix/apr_atomic.lo
OBJECTS_atomic_unix = atomic/unix/fspr_atomic.lo
dso/unix/dso.lo: dso/unix/dso.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
dso/unix/dso.lo: dso/unix/dso.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_dso_unix = dso/unix/dso.lo
file_io/unix/flock.lo: file_io/unix/flock.c .make.dirs
file_io/unix/readwrite.lo: file_io/unix/readwrite.c .make.dirs include/apr_support.h include/apr_allocator.h include/apr_network_io.h include/apr_general.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_time.h include/apr_pools.h
file_io/unix/filepath_util.lo: file_io/unix/filepath_util.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_pools.h include/apr_tables.h
file_io/unix/readwrite.lo: file_io/unix/readwrite.c .make.dirs include/fspr_support.h include/fspr_allocator.h include/fspr_network_io.h include/fspr_general.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_time.h include/fspr_pools.h
file_io/unix/filepath_util.lo: file_io/unix/filepath_util.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_pools.h include/fspr_tables.h
file_io/unix/seek.lo: file_io/unix/seek.c .make.dirs
file_io/unix/dir.lo: file_io/unix/dir.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/unix/mktemp.lo: file_io/unix/mktemp.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/unix/filedup.lo: file_io/unix/filedup.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/unix/tempdir.lo: file_io/unix/tempdir.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_env.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_thread_mutex.h include/apr_inherit.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/unix/filepath.lo: file_io/unix/filepath.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_inherit.h include/apr_thread_mutex.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/unix/pipe.lo: file_io/unix/pipe.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/unix/open.lo: file_io/unix/open.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_hash.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/unix/filestat.lo: file_io/unix/filestat.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_inherit.h include/apr_thread_mutex.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/unix/copy.lo: file_io/unix/copy.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/unix/fileacc.lo: file_io/unix/fileacc.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_thread_mutex.h include/apr_errno.h include/apr_want.h include/apr_pools.h include/apr_strings.h
file_io/unix/fullrw.lo: file_io/unix/fullrw.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/unix/dir.lo: file_io/unix/dir.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/unix/mktemp.lo: file_io/unix/mktemp.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/unix/filedup.lo: file_io/unix/filedup.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/unix/tempdir.lo: file_io/unix/tempdir.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_env.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_inherit.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/unix/filepath.lo: file_io/unix/filepath.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_inherit.h include/fspr_thread_mutex.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/unix/pipe.lo: file_io/unix/pipe.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/unix/open.lo: file_io/unix/open.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_hash.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/unix/filestat.lo: file_io/unix/filestat.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_inherit.h include/fspr_thread_mutex.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/unix/copy.lo: file_io/unix/copy.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/unix/fileacc.lo: file_io/unix/fileacc.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_errno.h include/fspr_want.h include/fspr_pools.h include/fspr_strings.h
file_io/unix/fullrw.lo: file_io/unix/fullrw.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
OBJECTS_file_io_unix = file_io/unix/flock.lo file_io/unix/readwrite.lo file_io/unix/filepath_util.lo file_io/unix/seek.lo file_io/unix/dir.lo file_io/unix/mktemp.lo file_io/unix/filedup.lo file_io/unix/tempdir.lo file_io/unix/filepath.lo file_io/unix/pipe.lo file_io/unix/open.lo file_io/unix/filestat.lo file_io/unix/copy.lo file_io/unix/fileacc.lo file_io/unix/fullrw.lo
locks/unix/thread_rwlock.lo: locks/unix/thread_rwlock.c .make.dirs
locks/unix/thread_mutex.lo: locks/unix/thread_mutex.c .make.dirs include/apr_want.h
locks/unix/thread_mutex.lo: locks/unix/thread_mutex.c .make.dirs include/fspr_want.h
locks/unix/thread_cond.lo: locks/unix/thread_cond.c .make.dirs
locks/unix/proc_mutex.lo: locks/unix/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_thread_mutex.h include/apr_errno.h include/apr_want.h include/apr_pools.h include/apr_strings.h
locks/unix/global_mutex.lo: locks/unix/global_mutex.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/unix/proc_mutex.lo: locks/unix/proc_mutex.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_errno.h include/fspr_want.h include/fspr_pools.h include/fspr_strings.h
locks/unix/global_mutex.lo: locks/unix/global_mutex.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_locks_unix = locks/unix/thread_rwlock.lo locks/unix/thread_mutex.lo locks/unix/thread_cond.lo locks/unix/proc_mutex.lo locks/unix/global_mutex.lo
memory/unix/apr_pools.lo: memory/unix/apr_pools.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_env.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_atomic.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_inherit.h include/apr_hash.h include/apr_lib.h include/apr_proc_mutex.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
memory/unix/fspr_pools.lo: memory/unix/fspr_pools.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_env.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_atomic.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_inherit.h include/fspr_hash.h include/fspr_lib.h include/fspr_proc_mutex.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_memory_unix = memory/unix/apr_pools.lo
OBJECTS_memory_unix = memory/unix/fspr_pools.lo
misc/unix/charset.lo: misc/unix/charset.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
misc/unix/env.lo: misc/unix/env.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_env.h include/apr_thread_mutex.h include/apr_pools.h
misc/unix/version.lo: misc/unix/version.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_version.h include/apr_thread_mutex.h include/apr_pools.h
misc/unix/rand.lo: misc/unix/rand.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_thread_mutex.h include/apr_pools.h
misc/unix/start.lo: misc/unix/start.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_signal.h include/apr_want.h include/apr_thread_mutex.h include/apr_atomic.h include/apr_pools.h
misc/unix/errorcodes.lo: misc/unix/errorcodes.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_dso.h include/apr_pools.h
misc/unix/getopt.lo: misc/unix/getopt.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h
misc/unix/charset.lo: misc/unix/charset.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
misc/unix/env.lo: misc/unix/env.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_env.h include/fspr_thread_mutex.h include/fspr_pools.h
misc/unix/version.lo: misc/unix/version.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_version.h include/fspr_thread_mutex.h include/fspr_pools.h
misc/unix/rand.lo: misc/unix/rand.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_pools.h
misc/unix/start.lo: misc/unix/start.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_signal.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_atomic.h include/fspr_pools.h
misc/unix/errorcodes.lo: misc/unix/errorcodes.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_dso.h include/fspr_pools.h
misc/unix/getopt.lo: misc/unix/getopt.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h
misc/unix/otherchild.lo: misc/unix/otherchild.c .make.dirs
OBJECTS_misc_unix = misc/unix/charset.lo misc/unix/env.lo misc/unix/version.lo misc/unix/rand.lo misc/unix/start.lo misc/unix/errorcodes.lo misc/unix/getopt.lo misc/unix/otherchild.lo
mmap/unix/mmap.lo: mmap/unix/mmap.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_shm.h include/apr_ring.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h include/apr_mmap.h
mmap/unix/common.lo: mmap/unix/common.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_ring.h include/apr_tables.h include/apr_time.h include/apr_pools.h include/apr_mmap.h
mmap/unix/mmap.lo: mmap/unix/mmap.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_shm.h include/fspr_ring.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h include/fspr_mmap.h
mmap/unix/common.lo: mmap/unix/common.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_ring.h include/fspr_tables.h include/fspr_time.h include/fspr_pools.h include/fspr_mmap.h
OBJECTS_mmap_unix = mmap/unix/mmap.lo mmap/unix/common.lo
network_io/unix/sockaddr.lo: network_io/unix/sockaddr.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h
network_io/unix/sockopt.lo: network_io/unix/sockopt.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_thread_mutex.h include/apr_errno.h include/apr_want.h include/apr_pools.h include/apr_strings.h
network_io/unix/sendrecv.lo: network_io/unix/sendrecv.c .make.dirs include/apr_support.h include/apr_allocator.h include/apr_user.h include/apr_network_io.h include/apr_general.h include/apr_inherit.h include/apr_file_info.h include/apr_errno.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_time.h include/apr_pools.h include/apr_tables.h
network_io/unix/multicast.lo: network_io/unix/multicast.c .make.dirs include/apr_support.h include/apr_allocator.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_general.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_proc_mutex.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
network_io/unix/sockets.lo: network_io/unix/sockets.c .make.dirs include/apr_support.h include/apr_allocator.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_general.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
network_io/unix/inet_ntop.lo: network_io/unix/inet_ntop.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_thread_mutex.h include/apr_errno.h include/apr_want.h include/apr_pools.h include/apr_strings.h
network_io/unix/sockaddr.lo: network_io/unix/sockaddr.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h
network_io/unix/sockopt.lo: network_io/unix/sockopt.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_errno.h include/fspr_want.h include/fspr_pools.h include/fspr_strings.h
network_io/unix/sendrecv.lo: network_io/unix/sendrecv.c .make.dirs include/fspr_support.h include/fspr_allocator.h include/fspr_user.h include/fspr_network_io.h include/fspr_general.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_errno.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
network_io/unix/multicast.lo: network_io/unix/multicast.c .make.dirs include/fspr_support.h include/fspr_allocator.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_proc_mutex.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
network_io/unix/sockets.lo: network_io/unix/sockets.c .make.dirs include/fspr_support.h include/fspr_allocator.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
network_io/unix/inet_ntop.lo: network_io/unix/inet_ntop.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_errno.h include/fspr_want.h include/fspr_pools.h include/fspr_strings.h
network_io/unix/inet_pton.lo: network_io/unix/inet_pton.c .make.dirs
OBJECTS_network_io_unix = network_io/unix/sockaddr.lo network_io/unix/sockopt.lo network_io/unix/sendrecv.lo network_io/unix/multicast.lo network_io/unix/sockets.lo network_io/unix/inet_ntop.lo network_io/unix/inet_pton.lo
poll/unix/epoll.lo: poll/unix/epoll.c .make.dirs
poll/unix/select.lo: poll/unix/select.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_poll.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
poll/unix/select.lo: poll/unix/select.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_poll.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
poll/unix/poll.lo: poll/unix/poll.c .make.dirs
poll/unix/port.lo: poll/unix/port.c .make.dirs
poll/unix/kqueue.lo: poll/unix/kqueue.c .make.dirs
@ -85,147 +85,147 @@ poll/unix/kqueue.lo: poll/unix/kqueue.c .make.dirs
OBJECTS_poll_unix = poll/unix/epoll.lo poll/unix/select.lo poll/unix/poll.lo poll/unix/port.lo poll/unix/kqueue.lo
random/unix/sha2.lo: random/unix/sha2.c .make.dirs
random/unix/apr_random.lo: random/unix/apr_random.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_random.h include/apr_thread_proc.h include/apr_time.h include/apr_pools.h include/apr_tables.h
random/unix/sha2_glue.lo: random/unix/sha2_glue.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_thread_mutex.h include/apr_random.h include/apr_pools.h
random/unix/fspr_random.lo: random/unix/fspr_random.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_random.h include/fspr_thread_proc.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
random/unix/sha2_glue.lo: random/unix/sha2_glue.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_random.h include/fspr_pools.h
OBJECTS_random_unix = random/unix/sha2.lo random/unix/apr_random.lo random/unix/sha2_glue.lo
OBJECTS_random_unix = random/unix/sha2.lo random/unix/fspr_random.lo random/unix/sha2_glue.lo
shmem/unix/shm.lo: shmem/unix/shm.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_strings.h include/apr_thread_mutex.h include/apr_pools.h
shmem/unix/shm.lo: shmem/unix/shm.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_pools.h
OBJECTS_shmem_unix = shmem/unix/shm.lo
support/unix/waitio.lo: support/unix/waitio.c .make.dirs include/apr_support.h include/apr_allocator.h include/apr_network_io.h include/apr_general.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_poll.h include/apr_time.h include/apr_pools.h
support/unix/waitio.lo: support/unix/waitio.c .make.dirs include/fspr_support.h include/fspr_allocator.h include/fspr_network_io.h include/fspr_general.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_poll.h include/fspr_time.h include/fspr_pools.h
OBJECTS_support_unix = support/unix/waitio.lo
threadproc/unix/procsup.lo: threadproc/unix/procsup.c .make.dirs
threadproc/unix/thread.lo: threadproc/unix/thread.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
threadproc/unix/signals.lo: threadproc/unix/signals.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_signal.h include/apr_strings.h include/apr_want.h include/apr_thread_mutex.h include/apr_pools.h
threadproc/unix/proc.lo: threadproc/unix/proc.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_signal.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_proc_mutex.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_inherit.h include/apr_random.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
threadproc/unix/threadpriv.lo: threadproc/unix/threadpriv.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
threadproc/unix/thread.lo: threadproc/unix/thread.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
threadproc/unix/signals.lo: threadproc/unix/signals.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_signal.h include/fspr_strings.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_pools.h
threadproc/unix/proc.lo: threadproc/unix/proc.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_signal.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_proc_mutex.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_inherit.h include/fspr_random.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
threadproc/unix/threadpriv.lo: threadproc/unix/threadpriv.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_threadproc_unix = threadproc/unix/procsup.lo threadproc/unix/thread.lo threadproc/unix/signals.lo threadproc/unix/proc.lo threadproc/unix/threadpriv.lo
time/unix/time.lo: time/unix/time.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
time/unix/timestr.lo: time/unix/timestr.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
time/unix/time.lo: time/unix/time.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
time/unix/timestr.lo: time/unix/timestr.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_time_unix = time/unix/time.lo time/unix/timestr.lo
user/unix/userinfo.lo: user/unix/userinfo.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
user/unix/groupinfo.lo: user/unix/groupinfo.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
user/unix/userinfo.lo: user/unix/userinfo.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
user/unix/groupinfo.lo: user/unix/groupinfo.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_user_unix = user/unix/userinfo.lo user/unix/groupinfo.lo
OBJECTS_unix = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_unix) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/aix/dso.lo: dso/aix/dso.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
dso/aix/dso.lo: dso/aix/dso.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_dso_aix = dso/aix/dso.lo
OBJECTS_aix = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_aix) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/beos/dso.lo: dso/beos/dso.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
dso/beos/dso.lo: dso/beos/dso.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_dso_beos = dso/beos/dso.lo
locks/beos/thread_rwlock.lo: locks/beos/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/beos/thread_mutex.lo: locks/beos/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/beos/thread_cond.lo: locks/beos/thread_cond.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/beos/proc_mutex.lo: locks/beos/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/beos/thread_rwlock.lo: locks/beos/thread_rwlock.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
locks/beos/thread_mutex.lo: locks/beos/thread_mutex.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
locks/beos/thread_cond.lo: locks/beos/thread_cond.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
locks/beos/proc_mutex.lo: locks/beos/proc_mutex.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_locks_beos = locks/beos/thread_rwlock.lo locks/beos/thread_mutex.lo locks/beos/thread_cond.lo locks/beos/proc_mutex.lo
network_io/beos/socketcommon.lo: network_io/beos/socketcommon.c .make.dirs
network_io/beos/sendrecv.lo: network_io/beos/sendrecv.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_thread_mutex.h include/apr_errno.h include/apr_want.h include/apr_time.h include/apr_pools.h
network_io/beos/sendrecv.lo: network_io/beos/sendrecv.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_errno.h include/fspr_want.h include/fspr_time.h include/fspr_pools.h
OBJECTS_network_io_beos = network_io/beos/socketcommon.lo network_io/beos/sendrecv.lo
shmem/beos/shm.lo: shmem/beos/shm.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
shmem/beos/shm.lo: shmem/beos/shm.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_shmem_beos = shmem/beos/shm.lo
threadproc/beos/apr_proc_stub.lo: threadproc/beos/apr_proc_stub.c .make.dirs
threadproc/beos/thread.lo: threadproc/beos/thread.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
threadproc/beos/proc.lo: threadproc/beos/proc.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_thread_mutex.h include/apr_errno.h include/apr_want.h include/apr_pools.h include/apr_strings.h
threadproc/beos/fspr_proc_stub.lo: threadproc/beos/fspr_proc_stub.c .make.dirs
threadproc/beos/thread.lo: threadproc/beos/thread.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
threadproc/beos/proc.lo: threadproc/beos/proc.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_errno.h include/fspr_want.h include/fspr_pools.h include/fspr_strings.h
threadproc/beos/threadpriv.lo: threadproc/beos/threadpriv.c .make.dirs
threadproc/beos/threadproc_common.lo: threadproc/beos/threadproc_common.c .make.dirs
OBJECTS_threadproc_beos = threadproc/beos/apr_proc_stub.lo threadproc/beos/thread.lo threadproc/beos/proc.lo threadproc/beos/threadpriv.lo threadproc/beos/threadproc_common.lo
OBJECTS_threadproc_beos = threadproc/beos/fspr_proc_stub.lo threadproc/beos/thread.lo threadproc/beos/proc.lo threadproc/beos/threadpriv.lo threadproc/beos/threadproc_common.lo
OBJECTS_beos = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_beos) $(OBJECTS_file_io_unix) $(OBJECTS_locks_beos) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_beos) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_beos) $(OBJECTS_support_unix) $(OBJECTS_threadproc_beos) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
dso/os2/dso.lo: dso/os2/dso.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
dso/os2/dso.lo: dso/os2/dso.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_dso_os2 = dso/os2/dso.lo
file_io/os2/dir_make_recurse.lo: file_io/os2/dir_make_recurse.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/os2/filesys.lo: file_io/os2/filesys.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_want.h include/apr_strings.h include/apr_thread_mutex.h include/apr_lib.h include/apr_pools.h
file_io/os2/dir_make_recurse.lo: file_io/os2/dir_make_recurse.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/os2/filesys.lo: file_io/os2/filesys.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_want.h include/fspr_strings.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_pools.h
file_io/os2/flock.lo: file_io/os2/flock.c .make.dirs
file_io/os2/readwrite.lo: file_io/os2/readwrite.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/os2/readwrite.lo: file_io/os2/readwrite.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/os2/filepath_util.lo: file_io/os2/filepath_util.c .make.dirs
file_io/os2/seek.lo: file_io/os2/seek.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/os2/dir.lo: file_io/os2/dir.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_proc_mutex.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/os2/seek.lo: file_io/os2/seek.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/os2/dir.lo: file_io/os2/dir.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_proc_mutex.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/os2/mktemp.lo: file_io/os2/mktemp.c .make.dirs
file_io/os2/filedup.lo: file_io/os2/filedup.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/os2/filedup.lo: file_io/os2/filedup.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/os2/tempdir.lo: file_io/os2/tempdir.c .make.dirs
file_io/os2/maperrorcode.lo: file_io/os2/maperrorcode.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/os2/maperrorcode.lo: file_io/os2/maperrorcode.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/os2/filepath.lo: file_io/os2/filepath.c .make.dirs
file_io/os2/pipe.lo: file_io/os2/pipe.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/os2/open.lo: file_io/os2/open.c .make.dirs include/apr_allocator.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_shm.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_dso.h include/apr_proc_mutex.h include/apr_lib.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
file_io/os2/filestat.lo: file_io/os2/filestat.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_want.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
file_io/os2/pipe.lo: file_io/os2/pipe.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/os2/open.lo: file_io/os2/open.c .make.dirs include/fspr_allocator.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_shm.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_dso.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
file_io/os2/filestat.lo: file_io/os2/filestat.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
file_io/os2/copy.lo: file_io/os2/copy.c .make.dirs
file_io/os2/fileacc.lo: file_io/os2/fileacc.c .make.dirs
file_io/os2/fullrw.lo: file_io/os2/fullrw.c .make.dirs
OBJECTS_file_io_os2 = file_io/os2/dir_make_recurse.lo file_io/os2/filesys.lo file_io/os2/flock.lo file_io/os2/readwrite.lo file_io/os2/filepath_util.lo file_io/os2/seek.lo file_io/os2/dir.lo file_io/os2/mktemp.lo file_io/os2/filedup.lo file_io/os2/tempdir.lo file_io/os2/maperrorcode.lo file_io/os2/filepath.lo file_io/os2/pipe.lo file_io/os2/open.lo file_io/os2/filestat.lo file_io/os2/copy.lo file_io/os2/fileacc.lo file_io/os2/fullrw.lo
locks/os2/thread_rwlock.lo: locks/os2/thread_rwlock.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/os2/thread_mutex.lo: locks/os2/thread_mutex.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/os2/thread_cond.lo: locks/os2/thread_cond.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/os2/proc_mutex.lo: locks/os2/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
locks/os2/thread_rwlock.lo: locks/os2/thread_rwlock.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
locks/os2/thread_mutex.lo: locks/os2/thread_mutex.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
locks/os2/thread_cond.lo: locks/os2/thread_cond.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
locks/os2/proc_mutex.lo: locks/os2/proc_mutex.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_locks_os2 = locks/os2/thread_rwlock.lo locks/os2/thread_mutex.lo locks/os2/thread_cond.lo locks/os2/proc_mutex.lo
network_io/os2/sockaddr.lo: network_io/os2/sockaddr.c .make.dirs
network_io/os2/sockopt.lo: network_io/os2/sockopt.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_errno.h include/apr_want.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_inherit.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
network_io/os2/sendrecv_udp.lo: network_io/os2/sendrecv_udp.c .make.dirs include/apr_support.h include/apr_general.h include/apr_network_io.h include/apr_inherit.h include/apr_file_info.h include/apr_allocator.h include/apr_thread_mutex.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_lib.h include/apr_time.h include/apr_pools.h
network_io/os2/sendrecv.lo: network_io/os2/sendrecv.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_errno.h include/apr_want.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_inherit.h include/apr_thread_mutex.h include/apr_lib.h include/apr_time.h include/apr_pools.h include/apr_tables.h
network_io/os2/os2calls.lo: network_io/os2/os2calls.c .make.dirs include/apr_allocator.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_shm.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_dso.h include/apr_proc_mutex.h include/apr_lib.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
network_io/os2/sockets.lo: network_io/os2/sockets.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
network_io/os2/sockopt.lo: network_io/os2/sockopt.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_errno.h include/fspr_want.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_inherit.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
network_io/os2/sendrecv_udp.lo: network_io/os2/sendrecv_udp.c .make.dirs include/fspr_support.h include/fspr_general.h include/fspr_network_io.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_allocator.h include/fspr_thread_mutex.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h
network_io/os2/sendrecv.lo: network_io/os2/sendrecv.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_errno.h include/fspr_want.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_inherit.h include/fspr_thread_mutex.h include/fspr_lib.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
network_io/os2/os2calls.lo: network_io/os2/os2calls.c .make.dirs include/fspr_allocator.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_shm.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_dso.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
network_io/os2/sockets.lo: network_io/os2/sockets.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
network_io/os2/inet_ntop.lo: network_io/os2/inet_ntop.c .make.dirs
network_io/os2/inet_pton.lo: network_io/os2/inet_pton.c .make.dirs
OBJECTS_network_io_os2 = network_io/os2/sockaddr.lo network_io/os2/sockopt.lo network_io/os2/sendrecv_udp.lo network_io/os2/sendrecv.lo network_io/os2/os2calls.lo network_io/os2/sockets.lo network_io/os2/inet_ntop.lo network_io/os2/inet_pton.lo
poll/os2/pollset.lo: poll/os2/pollset.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_poll.h include/apr_time.h include/apr_pools.h include/apr_tables.h
poll/os2/poll.lo: poll/os2/poll.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_errno.h include/apr_inherit.h include/apr_file_info.h include/apr_user.h include/apr_file_io.h include/apr_want.h include/apr_thread_mutex.h include/apr_poll.h include/apr_time.h include/apr_pools.h include/apr_tables.h
poll/os2/pollset.lo: poll/os2/pollset.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_poll.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
poll/os2/poll.lo: poll/os2/poll.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_errno.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_user.h include/fspr_file_io.h include/fspr_want.h include/fspr_thread_mutex.h include/fspr_poll.h include/fspr_time.h include/fspr_pools.h include/fspr_tables.h
OBJECTS_poll_os2 = poll/os2/pollset.lo poll/os2/poll.lo
shmem/os2/shm.lo: shmem/os2/shm.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
shmem/os2/shm.lo: shmem/os2/shm.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_shmem_os2 = shmem/os2/shm.lo
threadproc/os2/thread.lo: threadproc/os2/thread.c .make.dirs include/apr_allocator.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_shm.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_dso.h include/apr_proc_mutex.h include/apr_lib.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
threadproc/os2/thread.lo: threadproc/os2/thread.c .make.dirs include/fspr_allocator.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_shm.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_dso.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
threadproc/os2/signals.lo: threadproc/os2/signals.c .make.dirs
threadproc/os2/proc.lo: threadproc/os2/proc.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_signal.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_proc_mutex.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_inherit.h include/apr_lib.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
threadproc/os2/threadpriv.lo: threadproc/os2/threadpriv.c .make.dirs include/apr_allocator.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_shm.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_dso.h include/apr_proc_mutex.h include/apr_lib.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
threadproc/os2/proc.lo: threadproc/os2/proc.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_signal.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_proc_mutex.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_inherit.h include/fspr_lib.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
threadproc/os2/threadpriv.lo: threadproc/os2/threadpriv.c .make.dirs include/fspr_allocator.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_shm.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_dso.h include/fspr_proc_mutex.h include/fspr_lib.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_threadproc_os2 = threadproc/os2/thread.lo threadproc/os2/signals.lo threadproc/os2/proc.lo threadproc/os2/threadpriv.lo
OBJECTS_os2 = $(OBJECTS_all) $(OBJECTS_atomic_unix) $(OBJECTS_dso_os2) $(OBJECTS_file_io_os2) $(OBJECTS_locks_os2) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_os2) $(OBJECTS_poll_os2) $(OBJECTS_random_unix) $(OBJECTS_shmem_os2) $(OBJECTS_support_unix) $(OBJECTS_threadproc_os2) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
atomic/os390/atomic.lo: atomic/os390/atomic.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_thread_mutex.h include/apr_errno.h include/apr_want.h include/apr_atomic.h include/apr_pools.h
atomic/os390/atomic.lo: atomic/os390/atomic.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_thread_mutex.h include/fspr_errno.h include/fspr_want.h include/fspr_atomic.h include/fspr_pools.h
OBJECTS_atomic_os390 = atomic/os390/atomic.lo
dso/os390/dso.lo: dso/os390/dso.c .make.dirs include/apr_allocator.h include/apr_general.h include/apr_network_io.h include/apr_portable.h include/apr_inherit.h include/apr_file_info.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_dso.h include/apr_tables.h include/apr_errno.h include/apr_want.h include/apr_user.h include/apr_file_io.h include/apr_strings.h include/apr_proc_mutex.h include/apr_shm.h include/apr_global_mutex.h include/apr_time.h include/apr_pools.h
dso/os390/dso.lo: dso/os390/dso.c .make.dirs include/fspr_allocator.h include/fspr_general.h include/fspr_network_io.h include/fspr_portable.h include/fspr_inherit.h include/fspr_file_info.h include/fspr_thread_mutex.h include/fspr_thread_proc.h include/fspr_dso.h include/fspr_tables.h include/fspr_errno.h include/fspr_want.h include/fspr_user.h include/fspr_file_io.h include/fspr_strings.h include/fspr_proc_mutex.h include/fspr_shm.h include/fspr_global_mutex.h include/fspr_time.h include/fspr_pools.h
OBJECTS_dso_os390 = dso/os390/dso.lo
OBJECTS_os390 = $(OBJECTS_all) $(OBJECTS_atomic_os390) $(OBJECTS_dso_os390) $(OBJECTS_file_io_unix) $(OBJECTS_locks_unix) $(OBJECTS_memory_unix) $(OBJECTS_misc_unix) $(OBJECTS_mmap_unix) $(OBJECTS_network_io_unix) $(OBJECTS_poll_unix) $(OBJECTS_random_unix) $(OBJECTS_shmem_unix) $(OBJECTS_support_unix) $(OBJECTS_threadproc_unix) $(OBJECTS_time_unix) $(OBJECTS_user_unix)
HEADERS = $(top_srcdir)/include/apr_thread_mutex.h $(top_srcdir)/include/apr_env.h $(top_srcdir)/include/apr_poll.h $(top_srcdir)/include/apr_fnmatch.h $(top_srcdir)/include/apr_global_mutex.h $(top_srcdir)/include/apr_pools.h $(top_srcdir)/include/apr_want.h $(top_srcdir)/include/apr_file_io.h $(top_srcdir)/include/apr_version.h $(top_srcdir)/include/apr_mmap.h $(top_srcdir)/include/apr_dso.h $(top_srcdir)/include/apr_thread_proc.h $(top_srcdir)/include/apr_errno.h $(top_srcdir)/include/apr_shm.h $(top_srcdir)/include/apr_network_io.h $(top_srcdir)/include/apr_signal.h $(top_srcdir)/include/apr_user.h $(top_srcdir)/include/apr_support.h $(top_srcdir)/include/apr_atomic.h $(top_srcdir)/include/apr_random.h $(top_srcdir)/include/apr_thread_cond.h $(top_srcdir)/include/apr_thread_rwlock.h $(top_srcdir)/include/apr_getopt.h $(top_srcdir)/include/apr_inherit.h $(top_srcdir)/include/apr_strings.h $(top_srcdir)/include/apr_general.h $(top_srcdir)/include/apr_proc_mutex.h $(top_srcdir)/include/apr_tables.h $(top_srcdir)/include/apr_ring.h $(top_srcdir)/include/apr_file_info.h $(top_srcdir)/include/apr_allocator.h $(top_srcdir)/include/apr_portable.h $(top_srcdir)/include/apr_hash.h $(top_srcdir)/include/apr_time.h $(top_srcdir)/include/apr_lib.h
HEADERS = $(top_srcdir)/include/fspr_thread_mutex.h $(top_srcdir)/include/fspr_env.h $(top_srcdir)/include/fspr_poll.h $(top_srcdir)/include/fspr_fnmatch.h $(top_srcdir)/include/fspr_global_mutex.h $(top_srcdir)/include/fspr_pools.h $(top_srcdir)/include/fspr_want.h $(top_srcdir)/include/fspr_file_io.h $(top_srcdir)/include/fspr_version.h $(top_srcdir)/include/fspr_mmap.h $(top_srcdir)/include/fspr_dso.h $(top_srcdir)/include/fspr_thread_proc.h $(top_srcdir)/include/fspr_errno.h $(top_srcdir)/include/fspr_shm.h $(top_srcdir)/include/fspr_network_io.h $(top_srcdir)/include/fspr_signal.h $(top_srcdir)/include/fspr_user.h $(top_srcdir)/include/fspr_support.h $(top_srcdir)/include/fspr_atomic.h $(top_srcdir)/include/fspr_random.h $(top_srcdir)/include/fspr_thread_cond.h $(top_srcdir)/include/fspr_thread_rwlock.h $(top_srcdir)/include/fspr_getopt.h $(top_srcdir)/include/fspr_inherit.h $(top_srcdir)/include/fspr_strings.h $(top_srcdir)/include/fspr_general.h $(top_srcdir)/include/fspr_proc_mutex.h $(top_srcdir)/include/fspr_tables.h $(top_srcdir)/include/fspr_ring.h $(top_srcdir)/include/fspr_file_info.h $(top_srcdir)/include/fspr_allocator.h $(top_srcdir)/include/fspr_portable.h $(top_srcdir)/include/fspr_hash.h $(top_srcdir)/include/fspr_time.h $(top_srcdir)/include/fspr_lib.h
SOURCE_DIRS = random/unix dso/os2 time/unix locks/unix user/unix locks/beos tables support/unix file_io/unix mmap/unix atomic/unix poll/os2 dso/os390 atomic/os390 dso/beos poll/unix passwd network_io/beos threadproc/os2 network_io/os2 threadproc/beos shmem/unix network_io/unix file_io/os2 dso/aix threadproc/unix misc/unix shmem/beos dso/unix locks/os2 shmem/os2 memory/unix strings $(EXTRA_SOURCE_DIRS)

View File

@ -164,9 +164,9 @@ ifeq "$(RELEASE)" "optimized"
CFLAGS += -O4,p
endif
# -prefix apr_arch_pre_nw.h #include pre_nw.h for all files
# -prefix fspr_arch_pre_nw.h #include pre_nw.h for all files
CFLAGS += -prefix apr_arch_pre_nw.h
CFLAGS += -prefix fspr_arch_pre_nw.h
PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools

View File

@ -16,10 +16,10 @@ include $(APR_WORK)\build\NWGNUhead.inc
# build this level's files
FILES_prebuild_headers = \
$(APR)/include/apr.h \
$(APR)/include/fspr.h \
$(APRUTIL)/include/apu.h \
$(APRUTIL)/include/apu_want.h \
$(APRUTIL)/include/apr_ldap.h \
$(APRUTIL)/include/fspr_ldap.h \
$(APRUTIL)/include/private/apu_config.h \
$(APRUTIL)/include/private/apu_select_dbm.h \
$(APRUTIL)/xml/expat/lib/expat.h \
@ -83,9 +83,9 @@ clean ::
$(CHK) nw_export.i $(DEL) nw_export.i
$(CHK) $(NLM_NAME)_cc.opt $(DEL) $(NLM_NAME)_cc.opt
$(CHK) NWGNUversion.inc $(DEL) NWGNUversion.inc
$(CHK) $(subst /,\,$(APR))\include\apr.h $(DEL) $(subst /,\,$(APR))\include\apr.h
$(CHK) $(subst /,\,$(APR))\include\fspr.h $(DEL) $(subst /,\,$(APR))\include\fspr.h
$(CHK) $(subst /,\,$(APRUTIL))\include\apu.h $(DEL) $(subst /,\,$(APRUTIL))\include\apu.h
$(CHK) $(subst /,\,$(APRUTIL))\include\apr_ldap.h $(DEL) $(subst /,\,$(APRUTIL))\include\apr_ldap.h
$(CHK) $(subst /,\,$(APRUTIL))\include\fspr_ldap.h $(DEL) $(subst /,\,$(APRUTIL))\include\fspr_ldap.h
$(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_config.h $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_config.h
$(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h
$(CHK) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h

View File

@ -88,9 +88,9 @@ endif
# Generic compiler rules
#
$(APR_WORK)\build\NWGNUversion.inc : $(APR_WORK)\include\apr_version.h $(APR_WORK)\build\nw_ver.awk
$(APR_WORK)\build\NWGNUversion.inc : $(APR_WORK)\include\fspr_version.h $(APR_WORK)\build\nw_ver.awk
@echo Generating $(subst /,\,$@)
awk -f $(APR_WORK)\build\nw_ver.awk $(APR_WORK)\include\apr_version.h > $(APR_WORK)\build\NWGNUversion.inc
awk -f $(APR_WORK)\build\nw_ver.awk $(APR_WORK)\include\fspr_version.h > $(APR_WORK)\build\NWGNUversion.inc
-include $(APR_WORK)\build\NWGNUversion.inc

View File

@ -83,7 +83,7 @@ LIB32=link.exe -lib
# Name "apr_app - Win32 Debug"
# Begin Source File
SOURCE=..\misc\win32\apr_app.c
SOURCE=..\misc\win32\fspr_app.c
# End Source File
# End Target
# End Project

View File

@ -338,7 +338,7 @@ AC_DEFUN([APR_CHECK_APR_DEFINE],[
apr_old_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $INCLUDES"
AC_EGREP_CPP(YES_IS_DEFINED, [
#include <apr.h>
#include <fspr.h>
#if $1
YES_IS_DEFINED
#endif
@ -403,7 +403,7 @@ ac_decision=''
AC_DEFUN([APR_DECIDE],[dnl
dnl Define the flag (or not) in apr_private.h via autoheader
dnl Define the flag (or not) in fspr_private.h via autoheader
AH_TEMPLATE($1, [Define if $2 will be used])
ac_decision='$1'
ac_decision_msg='$2'

View File

@ -143,7 +143,7 @@ AC_DEFUN([APR_FIND_APR], [
if test "$apr_found" = "no" && test -d "$1"; then
apr_temp_abs_srcdir="`cd $1 && pwd`"
apr_found="reconfig"
apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/apr_version.h\"`"
apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"$1/include/fspr_version.h\"`"
case $apr_bundled_major in
"")
AC_MSG_ERROR([failed to find major version of bundled APR])

View File

@ -83,7 +83,7 @@ LIB32=link.exe -lib
# Name "libapr_app - Win32 Debug"
# Begin Source File
SOURCE=..\misc\win32\apr_app.c
SOURCE=..\misc\win32\fspr_app.c
# End Source File
# Begin Source File

View File

@ -100,21 +100,21 @@ function add_symbol(symbol) {
/^[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(][^)]*[)]/ {
sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
add_symbol("apr_" $0 "_pool_get")
add_symbol("fspr_" $0 "_pool_get")
next
}
/^[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(][^)]*[)]/ {
sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
add_symbol("apr_" $0 "_inherit_set")
add_symbol("fspr_" $0 "_inherit_set")
next
}
/^[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(][^)]*[)]/ {
sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
add_symbol("apr_" $0 "_inherit_unset")
add_symbol("fspr_" $0 "_inherit_unset")
next
}

View File

@ -6,8 +6,8 @@ BEGIN {
}
# List of functions that we don't support, yet??
#/apr_##name##_set_inherit/{next}
#/apr_##name##_unset_inherit/{next}
#/fspr_##name##_set_inherit/{next}
#/fspr_##name##_unset_inherit/{next}
function add_symbol (sym_name) {
@ -47,21 +47,21 @@ function add_symbol (sym_name) {
/^[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(][^)]*[)]/ {
sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
add_symbol("apr_" $0 "_pool_get")
add_symbol("fspr_" $0 "_pool_get")
next
}
/^[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(][^)]*[)]/ {
sub("[ \t]*APR_DECLARE_INHERIT_SET[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
add_symbol("apr_" $0 "_inherit_set")
add_symbol("fspr_" $0 "_inherit_set")
next
}
/^[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(][^)]*[)]/ {
sub("[ \t]*APR_DECLARE_INHERIT_UNSET[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
add_symbol("apr_" $0 "_inherit_unset")
add_symbol("fspr_" $0 "_inherit_unset")
next
}

View File

@ -1,7 +1,7 @@
/* Must include apr.h first so that we can undefine
the standard prototypes macros after it messes with
them. */
#include "apr.h"
#include "fspr.h"
#undef APR_DECLARE
#undef APR_DECLARE_NONSTD
@ -10,41 +10,41 @@
#undef APR_DECLARE_DATA
/* Preprocess all of the standard APR headers. */
#include "apr_allocator.h"
#include "apr_atomic.h"
#include "apr_dso.h"
#include "apr_env.h"
#include "apr_errno.h"
#include "apr_file_info.h"
#include "apr_file_io.h"
#include "apr_fnmatch.h"
#include "apr_general.h"
#include "apr_getopt.h"
#include "apr_global_mutex.h"
#include "apr_hash.h"
#include "apr_inherit.h"
#include "apr_lib.h"
#include "apr_mmap.h"
#include "apr_network_io.h"
#include "apr_poll.h"
#include "apr_pools.h"
#include "apr_portable.h"
#include "apr_proc_mutex.h"
#include "apr_ring.h"
#include "apr_random.h"
#include "apr_shm.h"
#include "apr_signal.h"
#include "apr_strings.h"
#include "apr_support.h"
#include "apr_tables.h"
#include "apr_thread_cond.h"
#include "apr_thread_mutex.h"
#include "apr_thread_proc.h"
#include "apr_thread_rwlock.h"
#include "apr_time.h"
#include "apr_user.h"
#include "apr_version.h"
#include "apr_want.h"
#include "fspr_allocator.h"
#include "fspr_atomic.h"
#include "fspr_dso.h"
#include "fspr_env.h"
#include "fspr_errno.h"
#include "fspr_file_info.h"
#include "fspr_file_io.h"
#include "fspr_fnmatch.h"
#include "fspr_general.h"
#include "fspr_getopt.h"
#include "fspr_global_mutex.h"
#include "fspr_hash.h"
#include "fspr_inherit.h"
#include "fspr_lib.h"
#include "fspr_mmap.h"
#include "fspr_network_io.h"
#include "fspr_poll.h"
#include "fspr_pools.h"
#include "fspr_portable.h"
#include "fspr_proc_mutex.h"
#include "fspr_ring.h"
#include "fspr_random.h"
#include "fspr_shm.h"
#include "fspr_signal.h"
#include "fspr_strings.h"
#include "fspr_support.h"
#include "fspr_tables.h"
#include "fspr_thread_cond.h"
#include "fspr_thread_mutex.h"
#include "fspr_thread_proc.h"
#include "fspr_thread_rwlock.h"
#include "fspr_time.h"
#include "fspr_user.h"
#include "fspr_version.h"
#include "fspr_want.h"
/* Must include apu.h first so that we can undefine
@ -57,29 +57,29 @@
#undef APU_DECLARE_DATA
/* Preprocess all of the standard APR headers. */
#include "apr_anylock.h"
#include "apr_base64.h"
#include "apr_buckets.h"
#include "apr_date.h"
#include "apr_dbd.h"
#include "apr_dbm.h"
#include "apr_hooks.h"
#include "apr_ldap.h"
#include "apr_ldap_url.h"
#include "apr_md4.h"
#include "apr_md5.h"
#include "apr_optional.h"
#include "apr_optional_hooks.h"
#include "apr_queue.h"
#include "apr_reslist.h"
#include "apr_rmm.h"
#include "apr_sdbm.h"
#include "apr_sha1.h"
#include "apr_strmatch.h"
#include "apr_uri.h"
#include "apr_uuid.h"
#include "apr_xlate.h"
#include "apr_xml.h"
#include "fspr_anylock.h"
#include "fspr_base64.h"
#include "fspr_buckets.h"
#include "fspr_date.h"
#include "fspr_dbd.h"
#include "fspr_dbm.h"
#include "fspr_hooks.h"
#include "fspr_ldap.h"
#include "fspr_ldap_url.h"
#include "fspr_md4.h"
#include "fspr_md5.h"
#include "fspr_optional.h"
#include "fspr_optional_hooks.h"
#include "fspr_queue.h"
#include "fspr_reslist.h"
#include "fspr_rmm.h"
#include "fspr_sdbm.h"
#include "fspr_sha1.h"
#include "fspr_strmatch.h"
#include "fspr_uri.h"
#include "fspr_uuid.h"
#include "fspr_xlate.h"
#include "fspr_xml.h"
#include "apu_version.h"
#include "apu_want.h"

View File

@ -24,7 +24,7 @@ goto Done
@echo # "apr-util\uri\uri_delims.h" on the build machine.
@echo Fixing up the APR headers
copy ..\include\apr.hnw ..\include\apr.h
copy ..\include\fspr.hnw ..\include\fspr.h
@echo Fixing up the APR-Util headers
copy ..\..\apr-util\include\apu.hnw ..\..\apr-util\include\apu.h

View File

@ -7,7 +7,7 @@ dnl Use ./buildconf to prepare build files and run autoconf for APR.
AC_PREREQ(2.50)
AC_INIT(build/apr_common.m4)
AC_CONFIG_HEADER(include/arch/unix/apr_private.h)
AC_CONFIG_HEADER(include/arch/unix/fspr_private.h)
AC_CONFIG_AUX_DIR(build)
dnl
@ -24,7 +24,7 @@ CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
dnl Hard-coded inclusion at the tail end of apr_private.h:
dnl Hard-coded inclusion at the tail end of fspr_private.h:
AH_BOTTOM([
/* switch this on if we have a BeOS version below BONE */
#if BEOS && !HAVE_BONE_VERSION
@ -36,7 +36,7 @@ AH_BOTTOM([
/*
* Include common private declarations.
*/
#include "../apr_private_common.h"
#include "../fspr_private_common.h"
])
dnl Save user-defined environment settings for later restoration
@ -95,7 +95,7 @@ APR_MKDIR_P_CHECK($apr_builders/mkdir.sh)
# get our version information
get_version="$apr_builders/get-version.sh"
version_hdr="$apr_srcdir/include/apr_version.h"
version_hdr="$apr_srcdir/include/fspr_version.h"
APR_MAJOR_VERSION="`$get_version major $version_hdr APR`"
APR_DOTTED_VERSION="`$get_version all $version_hdr APR`"
@ -1169,7 +1169,7 @@ fi
if test "$ac_cv_sizeof_int" = "4"; then
int_value=int
fi
# Now we need to find what apr_int64_t (sizeof == 8) will be.
# Now we need to find what fspr_int64_t (sizeof == 8) will be.
# The first match is our preference.
if test "$ac_cv_sizeof_int" = "8"; then
int64_literal='#define APR_INT64_C(val) (val)'
@ -1243,12 +1243,12 @@ fi
if test "$ac_cv_type_size_t" = "yes"; then
size_t_value="size_t"
else
size_t_value="apr_int32_t"
size_t_value="fspr_int32_t"
fi
if test "$ac_cv_type_ssize_t" = "yes"; then
ssize_t_value="ssize_t"
else
ssize_t_value="apr_int32_t"
ssize_t_value="fspr_int32_t"
fi
if test "$ac_cv_socklen_t" = "yes"; then
socklen_t_value="socklen_t"
@ -1298,17 +1298,17 @@ else
aprlfs=0
fi
AC_MSG_CHECKING([which type to use for apr_off_t])
AC_MSG_CHECKING([which type to use for fspr_off_t])
if test "${ac_cv_sizeof_off_t}${apr_cv_use_lfs64}" = "4yes"; then
# LFS is go!
off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT'
off_t_value='off64_t'
off_t_strfn='apr_strtoi64'
off_t_strfn='fspr_strtoi64'
elif test "${ac_cv_sizeof_off_t}x${ac_cv_sizeof_long}" = "4x4"; then
# Special case: off_t may change size with _FILE_OFFSET_BITS
# on 32-bit systems with LFS support. To avoid compatibility
# issues when other packages do define _FILE_OFFSET_BITS,
# hard-code apr_off_t to long.
# hard-code fspr_off_t to long.
off_t_value=long
off_t_fmt='#define APR_OFF_T_FMT "ld"'
off_t_strfn='strtol'
@ -1324,13 +1324,13 @@ elif test "$ac_cv_type_off_t" = "yes"; then
off_t_strfn='strtoi'
elif test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT'
off_t_strfn='apr_strtoi64'
off_t_strfn='fspr_strtoi64'
else
AC_ERROR([could not determine the size of off_t])
fi
else
# Fallback on int
off_t_value=apr_int32_t
off_t_value=fspr_int32_t
off_t_fmt=d
off_t_strfn='strtoi'
fi
@ -1440,7 +1440,7 @@ fi
if test "$have_int64_strfn" = "1"; then
AC_DEFINE_UNQUOTED(APR_INT64_STRFN, [$int64_strfn],
[Define as function which can be used for conversion of strings to apr_int64_t])
[Define as function which can be used for conversion of strings to fspr_int64_t])
fi
AC_SUBST(have_strnicmp)
@ -1451,11 +1451,11 @@ AC_SUBST(have_strdup)
AC_SUBST(have_strstr)
AC_SUBST(have_memchr)
if test "$off_t_strfn" = "apr_strtoi64" && test "$have_int64_strfn" = "1"; then
if test "$off_t_strfn" = "fspr_strtoi64" && test "$have_int64_strfn" = "1"; then
off_t_strfn=$int64_strfn
fi
AC_DEFINE_UNQUOTED(APR_OFF_T_STRFN, [$off_t_strfn],
[Define as function used for conversion of strings to apr_off_t])
[Define as function used for conversion of strings to fspr_off_t])
dnl ----------------------------- Checking for DSO support
echo "${nl}Checking for DSO..."
@ -1949,7 +1949,7 @@ AC_SUBST(file_as_socket)
if test "$ac_cv_func_poll $file_as_socket" = "yes 1"; then
AC_DEFINE(WAITIO_USES_POLL, 1,
[Define if apr_wait_for_io_or_timeout() uses poll(2)])
[Define if fspr_wait_for_io_or_timeout() uses poll(2)])
fi
# Check the types only if we have gethostbyname_r
@ -2135,7 +2135,7 @@ AC_SUBST(INCLUDE_RULES)
AC_SUBST(INCLUDE_OUTPUTS)
AC_CONFIG_FILES([Makefile
include/apr.h
include/fspr.h
build/apr_rules.mk
build/pkg/pkginfo
apr-$APR_MAJOR_VERSION-config:apr-config.in
@ -2163,7 +2163,7 @@ dnl This section is expanded by configure UNQUOTED so variable
dnl references must be backslash-escaped as necessary.
# Commands run at the beginning of config.status:
APR_SAVE_HEADERS="include/apr.h include/arch/unix/apr_private.h"
APR_SAVE_HEADERS="include/fspr.h include/arch/unix/fspr_private.h"
APR_MAJOR_VERSION=$APR_MAJOR_VERSION
for apri in \${APR_SAVE_HEADERS}; do

View File

@ -22,10 +22,10 @@ code to the effort.</p>
<h2>APR On Windows and Netware</h2>
<p>APR on Windows and Netware is different from APR on all other systems,
because those platforms don't use autoconf. On Unix, apr_private.h (private to
because those platforms don't use autoconf. On Unix, fspr_private.h (private to
APR) and apr.h (public, used by applications that use APR) are generated by
autoconf from acconfig.h and apr.h.in respectively. On Windows (and Netware),
apr_private.h and apr.h are created from apr_private.hw (apr_private.hwn)
fspr_private.h and apr.h are created from fspr_private.hw (fspr_private.hwn)
and apr.hw (apr.hwn) respectively.</p>
<p> <strong>
@ -34,7 +34,7 @@ and apr.hw (apr.hwn) respectively.</p>
these additions as well. A general rule of thumb, is that if it is
a feature macro, such as APR_HAS_THREADS, Windows and Netware need it.
In other words, if the definition is going to be used in a public APR
header file, such as apr_general.h, Windows needs it.
header file, such as fspr_general.h, Windows needs it.
The only time it is safe to add a macro or test without also adding
the macro to apr*.h[n]w, is if the macro tells APR how to build. For
@ -161,7 +161,7 @@ implemented one way. For example, time is a complete type because there
is only one reasonable time implementation.
<li>The second exception to the incomplete type rule can be found in
apr_portable.h. This file defines the native types for each platform.
fspr_portable.h. This file defines the native types for each platform.
Using these types, it is possible to extract native types for any APR type.</p>
</ul>
@ -171,14 +171,14 @@ in file_io/unix/fileio.h:</p>
<pre>
struct ap_file_t {
apr_pool_t *cntxt;
fspr_pool_t *cntxt;
int filedes;
FILE *filehand;
...
}
</pre>
<p>In include/apr_file_io.h:</p>
<p>In include/fspr_file_io.h:</p>
</pre>
typedef struct ap_file_t ap_file_t;
</pre>
@ -187,7 +187,7 @@ in file_io/unix/fileio.h:</p>
field in this structure. Windows does not have a filedes field, so obviously,
it is important that programs not be able to access these.</p>
<p>You may notice the apr_pool_t field. Most APR types have this field. This
<p>You may notice the fspr_pool_t field. Most APR types have this field. This
type is used to allocate memory within APR. Because every APR type has a pool,
any APR function can allocate memory if it needs to. This is very important
and it is one of the reasons that APR works. If you create a new type, you
@ -281,15 +281,15 @@ the error code indicates an error condition or a status codition.</strong>
<p>If your function has multiple return codes that all indicate success, but
with different results, or if your function can only return PASS/FAIL, you
should still return an apr_status_t. In the first case, define one
should still return an fspr_status_t. In the first case, define one
APR status code for each return value, an example of this is
<code>apr_proc_wait</code>, which can only return APR_CHILDDONE,
<code>fspr_proc_wait</code>, which can only return APR_CHILDDONE,
APR_CHILDNOTDONE, or an error code. In the second case, please return
APR_SUCCESS for PASS, and define a new APR status code for failure, an
example of this is <code>apr_compare_users</code>, which can only return
example of this is <code>fspr_compare_users</code>, which can only return
APR_SUCCESS, APR_EMISMATCH, or an error code.</p>
<p>All of these definitions can be found in apr_errno.h for all platforms. When
<p>All of these definitions can be found in fspr_errno.h for all platforms. When
an error occurs in an APR function, the function must return an error code.
If the error occurred in a system call and that system call uses errno to
report an error, then the code is returned unchanged. For example: </p>
@ -320,7 +320,7 @@ case. We'll get to how this problem is solved in a little while.</p>
<p>If the error occurs in an APR function but it is not due to a system call,
but it is actually an APR error or just a status code from APR, then the
appropriate code should be returned. These codes are defined in apr_errno.h
appropriate code should be returned. These codes are defined in fspr_errno.h
and should be self explanatory.</p>
<p>No APR code should ever return a code between APR_OS_START_USEERR and

View File

@ -88,7 +88,7 @@ system objects.</p>
<h2>Canonical API</h2>
Functions to manipulate the apr_canon_file_t (an opaque type) include:
Functions to manipulate the fspr_canon_file_t (an opaque type) include:
<ul>
<li>Create canon_file_t (from char* path and canon_file_t parent path)
@ -99,7 +99,7 @@ Functions to manipulate the apr_canon_file_t (an opaque type) include:
</ul>
<p>The path is corrected to the file system case only if is in absolute
form. The apr_canon_file_t should be preserved as long as possible and
form. The fspr_canon_file_t should be preserved as long as possible and
used as the parent to create child entries to reduce the number of expensive
stat and case canonicalization calls to the OS.</p>

View File

@ -14,9 +14,9 @@ EXPAND_ONLY_PREDEF=YES
PREDEFINED="APR_DECLARE(x)=x" \
"APR_DECLARE_NONSTD(x)=x" \
"APR_DECLARE_DATA" \
"APR_POOL_DECLARE_ACCESSOR(x)=apr_pool_t* apr_##x##_pool_get (const apr_##x##_t *the##x)" \
"APR_DECLARE_INHERIT_SET(x)=apr_status_t apr_##x##_inherit_set(apr_##x##_t *the##x)" \
"APR_DECLARE_INHERIT_UNSET(x)=apr_status_t apr_##x##_inherit_unset(apr_##x##_t *the##x)" \
"APR_POOL_DECLARE_ACCESSOR(x)=fspr_pool_t* fspr_##x##_pool_get (const fspr_##x##_t *the##x)" \
"APR_DECLARE_INHERIT_SET(x)=fspr_status_t fspr_##x##_inherit_set(fspr_##x##_t *the##x)" \
"APR_DECLARE_INHERIT_UNSET(x)=fspr_status_t fspr_##x##_inherit_unset(fspr_##x##_t *the##x)" \
"APR_HAS_THREADS" \
"__attribute__(x)=" \
DOXYGEN=

View File

@ -6,7 +6,7 @@ we don't expect them to migrate to using APR just because APR has been
released. So, we have provided a way for non-APR'ized programs to interact
very cleanly with APR.
There are a set of functions, all documented in apr_portable.h, which allow
There are a set of functions, all documented in fspr_portable.h, which allow
a programmer to either get a native type from an APR type, or to setup an
APR type from a native type.
@ -15,11 +15,11 @@ APR for file I/O, but you (in your infinite wisdom) want to use APR to make
sure your section is portable. Assume the program provides a type foo_t with
a file descriptor in it (fd).
void function_using_apr(foo_t non_apr_struct, ap_pool_t *p)
void function_using_apr(foo_t non_fspr_struct, ap_pool_t *p)
{
ap_file_t *apr_file = NULL;
ap_file_t *fspr_file = NULL;
ap_put_os_file(&apr_file, &non_apr_struct->fd, p);
ap_put_os_file(&fspr_file, &non_fspr_struct->fd, p);
...
}
@ -28,20 +28,20 @@ There are portable functions for each APR incomplete type. They are all
called ap_put_os_foobar(), and they each take the same basic arguments, a
pointer to a pointer to the incomplete type (the last pointer in that list
should be NULL), a pointer to the native type, and a pool. Each of these can
be found in apr_portable.h.
be found in fspr_portable.h.
If you have to do the exact opposite (take an APR type and convert it to a
native type, there are functions for that too. For example:
void function_not_using_apr(apr_file_t *apr_file)
void function_not_using_apr(fspr_file_t *fspr_file)
{
int unix_file_desc;
ap_get_os_file(&unix_file_desc, apr_file);
ap_get_os_file(&unix_file_desc, fspr_file);
...
}
For each ap_put_os_foobar, there is a corresponding ap_get_os_file. These are
also documented in apr_portable.h.
also documented in fspr_portable.h.

View File

@ -60,13 +60,13 @@
</p>
<blockquote>
<pre>
subpool = apr_create_subpool(pool);
subpool = fspr_create_subpool(pool);
for (i = 0; i < n; ++i) {
apr_pool_clear(subpool);
fspr_pool_clear(subpool);
do_operation(..., subpool);
}
apr_pool_destroy(subpool);</pre>
fspr_pool_destroy(subpool);</pre>
</blockquote>
<p>
This pattern prevents the 'pool' from growing unbounded and

View File

@ -43,7 +43,7 @@
link with the /pdbtype:sept flag! At the time your application links to
an APR library, the corresponding _src.pdb file should exist in the original
path the library was built, or it may be sufficient to keep the _src.pdb file
in the same path as the library file. (E.g. apr.lib and apr_src.pdb should
in the same path as the library file. (E.g. apr.lib and fspr_src.pdb should
reside together in your lib directory.) The later option is unconfirmed.</p>
<p>In order to keep the symbols compiled into the static library, your application

View File

@ -49,8 +49,8 @@
#include <sys/types.h>
#include <sys/ldr.h>
#include <a.out.h>
#include "apr_arch_dso.h"
#include "apr_portable.h"
#include "fspr_arch_dso.h"
#include "fspr_portable.h"
#if APR_HAS_DSO
@ -97,26 +97,26 @@ struct dl_info {
* add the basic "wrappers" here.
*/
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_put(fspr_dso_handle_t **aprdso,
fspr_os_dso_handle_t osdso,
fspr_pool_t *pool)
{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
*aprdso = fspr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->pool = pool;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
apr_dso_handle_t *aprdso)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_get(fspr_os_dso_handle_t *osdso,
fspr_dso_handle_t *aprdso)
{
*osdso = aprdso->handle;
return APR_SUCCESS;
}
static apr_status_t dso_cleanup(void *thedso)
static fspr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
fspr_dso_handle_t *dso = thedso;
if (dso->handle != NULL && dlclose(dso->handle) != 0)
return APR_EINIT;
@ -125,12 +125,12 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *ctx)
APR_DECLARE(fspr_status_t) fspr_dso_load(fspr_dso_handle_t **res_handle,
const char *path, fspr_pool_t *ctx)
{
void *os_handle = dlopen((char *)path, RTLD_NOW | RTLD_GLOBAL);
*res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
*res_handle = fspr_pcalloc(ctx, sizeof(*res_handle));
if(os_handle == NULL) {
(*res_handle)->errormsg = dlerror();
@ -141,18 +141,18 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
(*res_handle)->pool = ctx;
(*res_handle)->errormsg = NULL;
apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
APR_DECLARE(fspr_status_t) fspr_dso_unload(fspr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
return fspr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
apr_dso_handle_t *handle,
APR_DECLARE(fspr_status_t) fspr_dso_sym(fspr_dso_handle_sym_t *ressym,
fspr_dso_handle_t *handle,
const char *symname)
{
void *retval = dlsym(handle->handle, symname);
@ -166,10 +166,10 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
return APR_SUCCESS;
}
APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer, apr_size_t buflen)
APR_DECLARE(const char *) fspr_dso_error(fspr_dso_handle_t *dso, char *buffer, fspr_size_t buflen)
{
if (dso->errormsg) {
apr_cpystrn(buffer, dso->errormsg, buflen);
fspr_cpystrn(buffer, dso->errormsg, buflen);
return dso->errormsg;
}
return "No Error";

View File

@ -14,14 +14,14 @@
* limitations under the License.
*/
#include "apr_arch_dso.h"
#include "apr_portable.h"
#include "fspr_arch_dso.h"
#include "fspr_portable.h"
#if APR_HAS_DSO
static apr_status_t dso_cleanup(void *thedso)
static fspr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
fspr_dso_handle_t *dso = thedso;
if (dso->handle > 0 && unload_add_on(dso->handle) < B_NO_ERROR)
return APR_EINIT;
@ -30,12 +30,12 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dso_load(fspr_dso_handle_t **res_handle,
const char *path, fspr_pool_t *pool)
{
image_id newid = -1;
*res_handle = apr_pcalloc(pool, sizeof(*res_handle));
*res_handle = fspr_pcalloc(pool, sizeof(*res_handle));
if((newid = load_add_on(path)) < B_NO_ERROR) {
(*res_handle)->errormsg = strerror(newid);
@ -45,17 +45,17 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
(*res_handle)->pool = pool;
(*res_handle)->handle = newid;
apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, *res_handle, dso_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
APR_DECLARE(fspr_status_t) fspr_dso_unload(fspr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
return fspr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym, apr_dso_handle_t *handle,
APR_DECLARE(fspr_status_t) fspr_dso_sym(fspr_dso_handle_sym_t *ressym, fspr_dso_handle_t *handle,
const char *symname)
{
int err;
@ -72,24 +72,24 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym, apr_dso_hand
return APR_SUCCESS;
}
APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer, apr_size_t buflen)
APR_DECLARE(const char *) fspr_dso_error(fspr_dso_handle_t *dso, char *buffer, fspr_size_t buflen)
{
strncpy(buffer, strerror(errno), buflen);
return buffer;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_put(fspr_dso_handle_t **aprdso,
fspr_os_dso_handle_t osdso,
fspr_pool_t *pool)
{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
*aprdso = fspr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->pool = pool;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
apr_dso_handle_t *aprdso)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_get(fspr_os_dso_handle_t *osdso,
fspr_dso_handle_t *aprdso)
{
*osdso = aprdso->handle;
return APR_SUCCESS;

View File

@ -14,33 +14,33 @@
* limitations under the License.
*/
#include "apr_arch_dso.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "fspr_arch_dso.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include <library.h>
#include <unistd.h>
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_put(fspr_dso_handle_t **aprdso,
fspr_os_dso_handle_t osdso,
fspr_pool_t *pool)
{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
*aprdso = fspr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->pool = pool;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
apr_dso_handle_t *aprdso)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_get(fspr_os_dso_handle_t *osdso,
fspr_dso_handle_t *aprdso)
{
*osdso = aprdso->handle;
return APR_SUCCESS;
}
static apr_status_t dso_cleanup(void *thedso)
static fspr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
fspr_dso_handle_t *dso = thedso;
sym_list *symbol = NULL;
void *NLMHandle = getnlmhandle();
@ -65,22 +65,22 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dso_load(fspr_dso_handle_t **res_handle,
const char *path, fspr_pool_t *pool)
{
void *os_handle = NULL;
char *fullpath = NULL;
apr_status_t rv;
fspr_status_t rv;
if ((rv = apr_filepath_merge(&fullpath, NULL, path,
if ((rv = fspr_filepath_merge(&fullpath, NULL, path,
APR_FILEPATH_NATIVE, pool)) != APR_SUCCESS) {
return rv;
}
os_handle = dlopen(fullpath, RTLD_NOW | RTLD_LOCAL);
*res_handle = apr_pcalloc(pool, sizeof(**res_handle));
*res_handle = fspr_pcalloc(pool, sizeof(**res_handle));
if(os_handle == NULL) {
(*res_handle)->errormsg = dlerror();
@ -91,20 +91,20 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
(*res_handle)->pool = pool;
(*res_handle)->errormsg = NULL;
(*res_handle)->symbols = NULL;
(*res_handle)->path = apr_pstrdup(pool, fullpath);
(*res_handle)->path = fspr_pstrdup(pool, fullpath);
apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, *res_handle, dso_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
APR_DECLARE(fspr_status_t) fspr_dso_unload(fspr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
return fspr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
apr_dso_handle_t *handle,
APR_DECLARE(fspr_status_t) fspr_dso_sym(fspr_dso_handle_sym_t *ressym,
fspr_dso_handle_t *handle,
const char *symname)
{
sym_list *symbol = NULL;
@ -115,21 +115,21 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
return APR_ESYMNOTFOUND;
}
symbol = apr_pcalloc(handle->pool, sizeof(sym_list));
symbol = fspr_pcalloc(handle->pool, sizeof(sym_list));
symbol->next = handle->symbols;
handle->symbols = symbol;
symbol->symbol = apr_pstrdup(handle->pool, symname);
symbol->symbol = fspr_pstrdup(handle->pool, symname);
*ressym = retval;
return APR_SUCCESS;
}
APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer,
apr_size_t buflen)
APR_DECLARE(const char *) fspr_dso_error(fspr_dso_handle_t *dso, char *buffer,
fspr_size_t buflen)
{
if (dso->errormsg) {
apr_cpystrn(buffer, dso->errormsg, buflen);
fspr_cpystrn(buffer, dso->errormsg, buflen);
return dso->errormsg;
}
return "No Error";

View File

@ -14,17 +14,17 @@
* limitations under the License.
*/
#include "apr_arch_dso.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "fspr_arch_dso.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include <stdio.h>
#include <string.h>
#if APR_HAS_DSO
static apr_status_t dso_cleanup(void *thedso)
static fspr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
fspr_dso_handle_t *dso = thedso;
int rc;
if (dso->handle == 0)
@ -39,39 +39,39 @@ static apr_status_t dso_cleanup(void *thedso)
}
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, const char *path, apr_pool_t *ctx)
APR_DECLARE(fspr_status_t) fspr_dso_load(fspr_dso_handle_t **res_handle, const char *path, fspr_pool_t *ctx)
{
char failed_module[200];
HMODULE handle;
int rc;
*res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
*res_handle = fspr_pcalloc(ctx, sizeof(**res_handle));
(*res_handle)->cont = ctx;
(*res_handle)->load_error = APR_SUCCESS;
(*res_handle)->failed_module = NULL;
if ((rc = DosLoadModule(failed_module, sizeof(failed_module), path, &handle)) != 0) {
(*res_handle)->load_error = APR_FROM_OS_ERROR(rc);
(*res_handle)->failed_module = apr_pstrdup(ctx, failed_module);
(*res_handle)->failed_module = fspr_pstrdup(ctx, failed_module);
return APR_FROM_OS_ERROR(rc);
}
(*res_handle)->handle = handle;
apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
APR_DECLARE(fspr_status_t) fspr_dso_unload(fspr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
return fspr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
apr_dso_handle_t *handle,
APR_DECLARE(fspr_status_t) fspr_dso_sym(fspr_dso_handle_sym_t *ressym,
fspr_dso_handle_t *handle,
const char *symname)
{
PFN func;
@ -91,10 +91,10 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer, apr_size_t buflen)
APR_DECLARE(const char *) fspr_dso_error(fspr_dso_handle_t *dso, char *buffer, fspr_size_t buflen)
{
char message[200];
apr_strerror(dso->load_error, message, sizeof(message));
fspr_strerror(dso->load_error, message, sizeof(message));
if (dso->failed_module != NULL) {
strcat(message, " (");
@ -102,17 +102,17 @@ APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer, apr
strcat(message, ")");
}
apr_cpystrn(buffer, message, buflen);
fspr_cpystrn(buffer, message, buflen);
return buffer;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_put(fspr_dso_handle_t **aprdso,
fspr_os_dso_handle_t osdso,
fspr_pool_t *pool)
{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
*aprdso = fspr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->cont = pool;
(*aprdso)->load_error = APR_SUCCESS;
@ -122,8 +122,8 @@ APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
apr_dso_handle_t *aprdso)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_get(fspr_os_dso_handle_t *osdso,
fspr_dso_handle_t *aprdso)
{
*osdso = aprdso->handle;
return APR_SUCCESS;

View File

@ -14,34 +14,34 @@
* limitations under the License.
*/
#include "apr_portable.h"
#include "apr_strings.h"
#include "apr_arch_dso.h"
#include "fspr_portable.h"
#include "fspr_strings.h"
#include "fspr_arch_dso.h"
#include <errno.h>
#include <string.h>
#if APR_HAS_DSO
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_put(fspr_dso_handle_t **aprdso,
fspr_os_dso_handle_t osdso,
fspr_pool_t *pool)
{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
*aprdso = fspr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->pool = pool;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
apr_dso_handle_t *aprdso)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_get(fspr_os_dso_handle_t *osdso,
fspr_dso_handle_t *aprdso)
{
*osdso = aprdso->handle;
return APR_SUCCESS;
}
static apr_status_t dso_cleanup(void *thedso)
static fspr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
fspr_dso_handle_t *dso = thedso;
int rc;
if (dso->handle == 0)
@ -57,17 +57,17 @@ static apr_status_t dso_cleanup(void *thedso)
return errno;
}
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *ctx)
APR_DECLARE(fspr_status_t) fspr_dso_load(fspr_dso_handle_t **res_handle,
const char *path, fspr_pool_t *ctx)
{
dllhandle *handle;
int rc;
*res_handle = apr_pcalloc(ctx, sizeof(*res_handle));
*res_handle = fspr_pcalloc(ctx, sizeof(*res_handle));
(*res_handle)->pool = ctx;
if ((handle = dllload(path)) != NULL) {
(*res_handle)->handle = handle;
apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
@ -75,13 +75,13 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
return errno;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
APR_DECLARE(fspr_status_t) fspr_dso_unload(fspr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
return fspr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
apr_dso_handle_t *handle,
APR_DECLARE(fspr_status_t) fspr_dso_sym(fspr_dso_handle_sym_t *ressym,
fspr_dso_handle_t *handle,
const char *symname)
{
void *func_ptr;
@ -99,10 +99,10 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
return errno;
}
APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *handle, char *buffer,
apr_size_t buflen)
APR_DECLARE(const char *) fspr_dso_error(fspr_dso_handle_t *handle, char *buffer,
fspr_size_t buflen)
{
apr_cpystrn(buffer, strerror(handle->failing_errno), buflen);
fspr_cpystrn(buffer, strerror(handle->failing_errno), buflen);
return buffer;
}

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
#include "apr_arch_dso.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "fspr_arch_dso.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#if APR_HAS_DSO
@ -38,26 +38,26 @@
#define DYLD_LIBRARY_HANDLE (void *)-1
#endif
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_put(fspr_dso_handle_t **aprdso,
fspr_os_dso_handle_t osdso,
fspr_pool_t *pool)
{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
*aprdso = fspr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->pool = pool;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
apr_dso_handle_t *aprdso)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_get(fspr_os_dso_handle_t *osdso,
fspr_dso_handle_t *aprdso)
{
*osdso = aprdso->handle;
return APR_SUCCESS;
}
static apr_status_t dso_cleanup(void *thedso)
static fspr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
fspr_dso_handle_t *dso = thedso;
if (dso->handle == NULL)
return APR_SUCCESS;
@ -77,8 +77,8 @@ static apr_status_t dso_cleanup(void *thedso)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dso_load(fspr_dso_handle_t **res_handle,
const char *path, fspr_pool_t *pool)
{
#if defined(DSO_USE_SHL)
shl_t os_handle = shl_load(path, BIND_IMMEDIATE, 0L);
@ -140,7 +140,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
#endif
#endif /* DSO_USE_x */
*res_handle = apr_pcalloc(pool, sizeof(**res_handle));
*res_handle = fspr_pcalloc(pool, sizeof(**res_handle));
if(os_handle == NULL) {
#if defined(DSO_USE_SHL)
@ -159,18 +159,18 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle,
(*res_handle)->pool = pool;
(*res_handle)->errormsg = NULL;
apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, *res_handle, dso_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(apr_dso_handle_t *handle)
APR_DECLARE(fspr_status_t) fspr_dso_unload(fspr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
return fspr_pool_cleanup_run(handle->pool, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
apr_dso_handle_t *handle,
APR_DECLARE(fspr_status_t) fspr_dso_sym(fspr_dso_handle_sym_t *ressym,
fspr_dso_handle_t *handle,
const char *symname)
{
#if defined(DSO_USE_SHL)
@ -238,11 +238,11 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
#endif /* DSO_USE_x */
}
APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer,
apr_size_t buflen)
APR_DECLARE(const char *) fspr_dso_error(fspr_dso_handle_t *dso, char *buffer,
fspr_size_t buflen)
{
if (dso->errormsg) {
apr_cpystrn(buffer, dso->errormsg, buflen);
fspr_cpystrn(buffer, dso->errormsg, buflen);
return dso->errormsg;
}
return "No Error";

View File

@ -14,48 +14,48 @@
* limitations under the License.
*/
#include "apr_arch_dso.h"
#include "apr_strings.h"
#include "apr_private.h"
#include "apr_arch_file_io.h"
#include "apr_arch_utf8.h"
#include "fspr_arch_dso.h"
#include "fspr_strings.h"
#include "fspr_private.h"
#include "fspr_arch_file_io.h"
#include "fspr_arch_utf8.h"
#if APR_HAS_DSO
APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso,
apr_os_dso_handle_t osdso,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_put(fspr_dso_handle_t **aprdso,
fspr_os_dso_handle_t osdso,
fspr_pool_t *pool)
{
*aprdso = apr_pcalloc(pool, sizeof **aprdso);
*aprdso = fspr_pcalloc(pool, sizeof **aprdso);
(*aprdso)->handle = osdso;
(*aprdso)->cont = pool;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *osdso,
apr_dso_handle_t *aprdso)
APR_DECLARE(fspr_status_t) fspr_os_dso_handle_get(fspr_os_dso_handle_t *osdso,
fspr_dso_handle_t *aprdso)
{
*osdso = aprdso->handle;
return APR_SUCCESS;
}
static apr_status_t dso_cleanup(void *thedso)
static fspr_status_t dso_cleanup(void *thedso)
{
apr_dso_handle_t *dso = thedso;
fspr_dso_handle_t *dso = thedso;
if (dso->handle != NULL && !FreeLibrary(dso->handle)) {
return apr_get_os_error();
return fspr_get_os_error();
}
dso->handle = NULL;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
const char *path, apr_pool_t *ctx)
APR_DECLARE(fspr_status_t) fspr_dso_load(struct fspr_dso_handle_t **res_handle,
const char *path, fspr_pool_t *ctx)
{
HINSTANCE os_handle;
apr_status_t rv;
fspr_status_t rv;
#ifndef _WIN32_WCE
UINT em;
#endif
@ -63,11 +63,11 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wpath[APR_PATH_MAX];
fspr_wchar_t wpath[APR_PATH_MAX];
if ((rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path))
/ sizeof(fspr_wchar_t), path))
!= APR_SUCCESS) {
*res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
*res_handle = fspr_pcalloc(ctx, sizeof(**res_handle));
return ((*res_handle)->load_error = rv);
}
/* Prevent ugly popups from killing our app */
@ -78,7 +78,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
if (!os_handle)
os_handle = LoadLibraryExW(wpath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
if (!os_handle)
rv = apr_get_os_error();
rv = fspr_get_os_error();
#ifndef _WIN32_WCE
SetErrorMode(em);
#endif
@ -94,7 +94,7 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
* LoadLibrary in the MS PSDK also reveals that it -explicitly- states
* that backslashes must be used for the LoadLibrary family of calls.
*/
apr_cpystrn(fspec, path, sizeof(fspec));
fspr_cpystrn(fspec, path, sizeof(fspec));
while ((p = strchr(p, '/')) != NULL)
*p = '\\';
@ -104,14 +104,14 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
if (!os_handle)
os_handle = LoadLibraryEx(path, NULL, 0);
if (!os_handle)
rv = apr_get_os_error();
rv = fspr_get_os_error();
else
rv = APR_SUCCESS;
SetErrorMode(em);
}
#endif
*res_handle = apr_pcalloc(ctx, sizeof(**res_handle));
*res_handle = fspr_pcalloc(ctx, sizeof(**res_handle));
(*res_handle)->cont = ctx;
if (rv) {
@ -121,27 +121,27 @@ APR_DECLARE(apr_status_t) apr_dso_load(struct apr_dso_handle_t **res_handle,
(*res_handle)->handle = (void*)os_handle;
(*res_handle)->load_error = APR_SUCCESS;
apr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(ctx, *res_handle, dso_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dso_unload(struct apr_dso_handle_t *handle)
APR_DECLARE(fspr_status_t) fspr_dso_unload(struct fspr_dso_handle_t *handle)
{
return apr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
return fspr_pool_cleanup_run(handle->cont, handle, dso_cleanup);
}
APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
struct apr_dso_handle_t *handle,
APR_DECLARE(fspr_status_t) fspr_dso_sym(fspr_dso_handle_sym_t *ressym,
struct fspr_dso_handle_t *handle,
const char *symname)
{
#ifdef _WIN32_WCE
apr_size_t symlen = strlen(symname) + 1;
apr_size_t wsymlen = 256;
apr_wchar_t wsymname[256];
apr_status_t rv;
fspr_size_t symlen = strlen(symname) + 1;
fspr_size_t wsymlen = 256;
fspr_wchar_t wsymname[256];
fspr_status_t rv;
rv = apr_conv_utf8_to_ucs2(wsymname, &wsymlen, symname, &symlen);
rv = fspr_conv_utf8_to_ucs2(wsymname, &wsymlen, symname, &symlen);
if (rv != APR_SUCCESS) {
return rv;
}
@ -149,19 +149,19 @@ APR_DECLARE(apr_status_t) apr_dso_sym(apr_dso_handle_sym_t *ressym,
return APR_ENAMETOOLONG;
}
*ressym = (apr_dso_handle_sym_t)GetProcAddressW(handle->handle, wsymname);
*ressym = (fspr_dso_handle_sym_t)GetProcAddressW(handle->handle, wsymname);
#else
*ressym = (apr_dso_handle_sym_t)GetProcAddress(handle->handle, symname);
*ressym = (fspr_dso_handle_sym_t)GetProcAddress(handle->handle, symname);
#endif
if (!*ressym) {
return apr_get_os_error();
return fspr_get_os_error();
}
return APR_SUCCESS;
}
APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buf, apr_size_t bufsize)
APR_DECLARE(const char *) fspr_dso_error(fspr_dso_handle_t *dso, char *buf, fspr_size_t bufsize)
{
return apr_strerror(dso->load_error, buf, bufsize);
return fspr_strerror(dso->load_error, buf, bufsize);
}
#endif

View File

@ -14,15 +14,15 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "fspr_arch_file_io.h"
#include "fsio.h"
#include "nks/dirio.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_errno.h"
#include "apr_hash.h"
#include "apr_thread_rwlock.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_strings.h"
#include "fspr_errno.h"
#include "fspr_hash.h"
#include "fspr_thread_rwlock.h"
#ifdef HAVE_UTIME_H
#include <utime.h>
@ -30,9 +30,9 @@
#define APR_HAS_PSA
static apr_filetype_e filetype_from_mode(mode_t mode)
static fspr_filetype_e filetype_from_mode(mode_t mode)
{
apr_filetype_e type = APR_NOFILE;
fspr_filetype_e type = APR_NOFILE;
if (S_ISREG(mode))
type = APR_REG;
@ -53,12 +53,12 @@ static apr_filetype_e filetype_from_mode(mode_t mode)
return type;
}
static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
apr_int32_t wanted)
static void fill_out_finfo(fspr_finfo_t *finfo, struct stat *info,
fspr_int32_t wanted)
{
finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
| APR_FINFO_OWNER | APR_FINFO_PROT;
finfo->protection = apr_unix_mode2perms(info->st_mode);
finfo->protection = fspr_unix_mode2perms(info->st_mode);
finfo->filetype = filetype_from_mode(info->st_mode);
finfo->user = info->st_uid;
finfo->group = info->st_gid;
@ -66,9 +66,9 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
finfo->inode = info->st_ino;
finfo->device = info->st_dev;
finfo->nlink = info->st_nlink;
apr_time_ansi_put(&finfo->atime, info->st_atime.tv_sec);
apr_time_ansi_put(&finfo->mtime, info->st_mtime.tv_sec);
apr_time_ansi_put(&finfo->ctime, info->st_ctime.tv_sec);
fspr_time_ansi_put(&finfo->atime, info->st_atime.tv_sec);
fspr_time_ansi_put(&finfo->mtime, info->st_mtime.tv_sec);
fspr_time_ansi_put(&finfo->ctime, info->st_ctime.tv_sec);
/* ### needs to be revisited
* if (wanted & APR_FINFO_CSIZE) {
* finfo->csize = info->st_blocks * 512;
@ -77,14 +77,14 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
*/
}
APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
apr_int32_t wanted,
apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_info_get(fspr_finfo_t *finfo,
fspr_int32_t wanted,
fspr_file_t *thefile)
{
struct stat info;
if (thefile->buffered) {
apr_status_t rv = apr_file_flush(thefile);
fspr_status_t rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS)
return rv;
}
@ -100,30 +100,30 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
}
}
APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
APR_DECLARE(fspr_status_t) fspr_file_perms_set(const char *fname,
fspr_fileperms_t perms)
{
mode_t mode = apr_unix_perms2mode(perms);
mode_t mode = fspr_unix_perms2mode(perms);
if (chmod(fname, mode) == -1)
return errno;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
apr_fileattrs_t attributes,
apr_fileattrs_t attr_mask,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_attrs_set(const char *fname,
fspr_fileattrs_t attributes,
fspr_fileattrs_t attr_mask,
fspr_pool_t *pool)
{
apr_status_t status;
apr_finfo_t finfo;
fspr_status_t status;
fspr_finfo_t finfo;
/* Don't do anything if we can't handle the requested attributes */
if (!(attr_mask & (APR_FILE_ATTR_READONLY
| APR_FILE_ATTR_EXECUTABLE)))
return APR_SUCCESS;
status = apr_stat(&finfo, fname, APR_FINFO_PROT, pool);
status = fspr_stat(&finfo, fname, APR_FINFO_PROT, pool);
if (status)
return status;
@ -162,21 +162,21 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
}
}
return apr_file_perms_set(fname, finfo.protection);
return fspr_file_perms_set(fname, finfo.protection);
}
#ifndef APR_HAS_PSA
static apr_status_t stat_cache_cleanup(void *data)
static fspr_status_t stat_cache_cleanup(void *data)
{
apr_pool_t *p = (apr_pool_t *)getGlobalPool();
apr_hash_index_t *hi;
apr_hash_t *statCache = (apr_hash_t*)data;
fspr_pool_t *p = (fspr_pool_t *)getGlobalPool();
fspr_hash_index_t *hi;
fspr_hash_t *statCache = (fspr_hash_t*)data;
char *key;
apr_ssize_t keylen;
fspr_ssize_t keylen;
NXPathCtx_t pathctx;
for (hi = apr_hash_first(p, statCache); hi; hi = apr_hash_next(hi)) {
apr_hash_this(hi, (const void**)&key, &keylen, (void**)&pathctx);
for (hi = fspr_hash_first(p, statCache); hi; hi = fspr_hash_next(hi)) {
fspr_hash_this(hi, (const void**)&key, &keylen, (void**)&pathctx);
if (pathctx) {
NXFreePathContext(pathctx);
@ -186,11 +186,11 @@ static apr_status_t stat_cache_cleanup(void *data)
return APR_SUCCESS;
}
int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestmap, apr_pool_t *p)
int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestmap, fspr_pool_t *p)
{
apr_pool_t *gPool = (apr_pool_t *)getGlobalPool();
apr_hash_t *statCache = NULL;
apr_thread_rwlock_t *rwlock = NULL;
fspr_pool_t *gPool = (fspr_pool_t *)getGlobalPool();
fspr_hash_t *statCache = NULL;
fspr_thread_rwlock_t *rwlock = NULL;
NXPathCtx_t pathctx = 0;
char *ptr = NULL, *tr;
@ -205,22 +205,22 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
if (!gPool) {
char poolname[50];
if (apr_pool_create(&gPool, NULL) != APR_SUCCESS) {
if (fspr_pool_create(&gPool, NULL) != APR_SUCCESS) {
return getstat(ctx, path, buf, requestmap);
}
setGlobalPool(gPool);
apr_pool_tag(gPool, apr_pstrdup(gPool, "cstat_mem_pool"));
fspr_pool_tag(gPool, fspr_pstrdup(gPool, "cstat_mem_pool"));
statCache = apr_hash_make(gPool);
apr_pool_userdata_set ((void*)statCache, "STAT_CACHE", stat_cache_cleanup, gPool);
statCache = fspr_hash_make(gPool);
fspr_pool_userdata_set ((void*)statCache, "STAT_CACHE", stat_cache_cleanup, gPool);
apr_thread_rwlock_create(&rwlock, gPool);
apr_pool_userdata_set ((void*)rwlock, "STAT_CACHE_LOCK", apr_pool_cleanup_null, gPool);
fspr_thread_rwlock_create(&rwlock, gPool);
fspr_pool_userdata_set ((void*)rwlock, "STAT_CACHE_LOCK", fspr_pool_cleanup_null, gPool);
}
else {
apr_pool_userdata_get((void**)&statCache, "STAT_CACHE", gPool);
apr_pool_userdata_get((void**)&rwlock, "STAT_CACHE_LOCK", gPool);
fspr_pool_userdata_get((void**)&statCache, "STAT_CACHE", gPool);
fspr_pool_userdata_get((void**)&rwlock, "STAT_CACHE_LOCK", gPool);
}
if (!gPool || !statCache || !rwlock) {
@ -239,7 +239,7 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
}
if (ptr) {
ppath = apr_pstrndup (p, path, len);
ppath = fspr_pstrndup (p, path, len);
strlwr(ppath);
if (ptr[1] != '\0') {
ptr++;
@ -249,19 +249,19 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
slash, we need to make sure we stat the current directory
with a dot */
if (((*ptr == '/') || (*ptr == '\\')) && (*(ptr+1) == '\0')) {
pinfo = apr_pstrdup (p, ".");
pinfo = fspr_pstrdup (p, ".");
}
else {
pinfo = apr_pstrdup (p, ptr);
pinfo = fspr_pstrdup (p, ptr);
}
}
/* If we have a statCache then try to pull the information
from the cache. Otherwise just stat the file and return.*/
if (statCache) {
apr_thread_rwlock_rdlock(rwlock);
pathctx = (NXPathCtx_t) apr_hash_get(statCache, ppath, APR_HASH_KEY_STRING);
apr_thread_rwlock_unlock(rwlock);
fspr_thread_rwlock_rdlock(rwlock);
pathctx = (NXPathCtx_t) fspr_hash_get(statCache, ppath, APR_HASH_KEY_STRING);
fspr_thread_rwlock_unlock(rwlock);
if (pathctx) {
return getstat(pathctx, pinfo, buf, requestmap);
}
@ -270,9 +270,9 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
err = NXCreatePathContext(0, ppath, 0, NULL, &pathctx);
if (!err) {
apr_thread_rwlock_wrlock(rwlock);
apr_hash_set(statCache, apr_pstrdup(gPool,ppath) , APR_HASH_KEY_STRING, (void*)pathctx);
apr_thread_rwlock_unlock(rwlock);
fspr_thread_rwlock_wrlock(rwlock);
fspr_hash_set(statCache, fspr_pstrdup(gPool,ppath) , APR_HASH_KEY_STRING, (void*)pathctx);
fspr_thread_rwlock_unlock(rwlock);
return getstat(pathctx, pinfo, buf, requestmap);
}
}
@ -282,9 +282,9 @@ int cstat (NXPathCtx_t ctx, char *path, struct stat *buf, unsigned long requestm
}
#endif
APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
APR_DECLARE(fspr_status_t) fspr_stat(fspr_finfo_t *finfo,
const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
fspr_int32_t wanted, fspr_pool_t *pool)
{
struct stat info;
int srv;
@ -305,7 +305,7 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
if (wanted & APR_FINFO_LINK)
wanted &= ~APR_FINFO_LINK;
if (wanted & APR_FINFO_NAME) {
finfo->name = apr_pstrdup(pool, info.st_name);
finfo->name = fspr_pstrdup(pool, info.st_name);
finfo->valid |= APR_FINFO_NAME;
}
return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
@ -345,14 +345,14 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
}
}
APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
apr_time_t mtime,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_mtime_set(const char *fname,
fspr_time_t mtime,
fspr_pool_t *pool)
{
apr_status_t status;
apr_finfo_t finfo;
fspr_status_t status;
fspr_finfo_t finfo;
status = apr_stat(&finfo, fname, APR_FINFO_ATIME, pool);
status = fspr_stat(&finfo, fname, APR_FINFO_ATIME, pool);
if (status) {
return status;
}
@ -361,10 +361,10 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
{
struct timeval tvp[2];
tvp[0].tv_sec = apr_time_sec(finfo.atime);
tvp[0].tv_usec = apr_time_usec(finfo.atime);
tvp[1].tv_sec = apr_time_sec(mtime);
tvp[1].tv_usec = apr_time_usec(mtime);
tvp[0].tv_sec = fspr_time_sec(finfo.atime);
tvp[0].tv_usec = fspr_time_usec(finfo.atime);
tvp[1].tv_sec = fspr_time_sec(mtime);
tvp[1].tv_usec = fspr_time_usec(mtime);
if (utimes(fname, tvp) == -1) {
return errno;

View File

@ -14,21 +14,21 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "fspr.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
fspr_status_t filepath_root_case(char **rootpath, char *root, fspr_pool_t *p)
{
/* See the Windows code to figure out what to do here.
It probably checks to make sure that the root exists
and case it correctly according to the file system.
*/
*rootpath = apr_pstrdup(p, root);
*rootpath = fspr_pstrdup(p, root);
return APR_SUCCESS;
}
apr_status_t filepath_has_drive(const char *rootpath, int only, apr_pool_t *p)
fspr_status_t filepath_has_drive(const char *rootpath, int only, fspr_pool_t *p)
{
char *s;
@ -46,7 +46,7 @@ apr_status_t filepath_has_drive(const char *rootpath, int only, apr_pool_t *p)
return 0;
}
apr_status_t filepath_compare_drive(const char *path1, const char *path2, apr_pool_t *p)
fspr_status_t filepath_compare_drive(const char *path1, const char *path2, fspr_pool_t *p)
{
char *s1, *s2;
@ -64,8 +64,8 @@ apr_status_t filepath_compare_drive(const char *path1, const char *path2, apr_po
return -1;
}
APR_DECLARE(apr_status_t) apr_filepath_get(char **rootpath, apr_int32_t flags,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_get(char **rootpath, fspr_int32_t flags,
fspr_pool_t *p)
{
char path[APR_PATH_MAX];
char *ptr;
@ -85,7 +85,7 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **rootpath, apr_int32_t flags,
if (*ptr == ':') {
ptr = path;
}
*rootpath = apr_pstrdup(p, ptr);
*rootpath = fspr_pstrdup(p, ptr);
if (!(flags & APR_FILEPATH_NATIVE)) {
for (ptr = *rootpath; *ptr; ++ptr) {
if (*ptr == '\\')
@ -95,8 +95,8 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **rootpath, apr_int32_t flags,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_filepath_set(const char *rootpath,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_set(const char *rootpath,
fspr_pool_t *p)
{
if (chdir2(rootpath) != 0)
return errno;

View File

@ -15,10 +15,10 @@
*/
#include <nks/fsio.h>
#include "apr_arch_file_io.h"
#include "fspr_arch_file_io.h"
apr_status_t apr_file_lock(apr_file_t *thefile, int type)
fspr_status_t fspr_file_lock(fspr_file_t *thefile, int type)
{
int fc;
@ -30,7 +30,7 @@ apr_status_t apr_file_lock(apr_file_t *thefile, int type)
return APR_SUCCESS;
}
apr_status_t apr_file_unlock(apr_file_t *thefile)
fspr_status_t fspr_file_unlock(fspr_file_t *thefile)
{
if(NXFileRangeUnlock(thefile->filedes,NX_RANGE_LOCK_CANCEL,0 , 0) == -1)
return errno;

View File

@ -14,18 +14,18 @@
* limitations under the License.
*/
#include "apr_private.h"
#include "apr_file_io.h" /* prototype of apr_mkstemp() */
#include "apr_strings.h" /* prototype of apr_mkstemp() */
#include "apr_arch_file_io.h" /* prototype of apr_mkstemp() */
#include "apr_portable.h" /* for apr_os_file_put() */
#include "fspr_private.h"
#include "fspr_file_io.h" /* prototype of fspr_mkstemp() */
#include "fspr_strings.h" /* prototype of fspr_mkstemp() */
#include "fspr_arch_file_io.h" /* prototype of fspr_mkstemp() */
#include "fspr_portable.h" /* for fspr_os_file_put() */
#include <stdlib.h> /* for mkstemp() - Single Unix */
APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_int32_t flags, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_mktemp(fspr_file_t **fp, char *template, fspr_int32_t flags, fspr_pool_t *p)
{
int fd;
apr_status_t rv;
fspr_status_t rv;
flags = (!flags) ? APR_CREATE | APR_READ | APR_WRITE |
APR_DELONCLOSE : flags & ~APR_EXCL;
@ -38,11 +38,11 @@ APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_i
* Otherwise file locking will not allow the file to be shared.
*/
close(fd);
if ((rv = apr_file_open(fp, template, flags|APR_FILE_NOCLEANUP,
if ((rv = fspr_file_open(fp, template, flags|APR_FILE_NOCLEANUP,
APR_UREAD | APR_UWRITE, p)) == APR_SUCCESS) {
apr_pool_cleanup_register((*fp)->pool, (void *)(*fp),
apr_unix_file_cleanup, apr_unix_file_cleanup);
fspr_pool_cleanup_register((*fp)->pool, (void *)(*fp),
fspr_unix_file_cleanup, fspr_unix_file_cleanup);
}
return rv;

View File

@ -18,12 +18,12 @@
#include <nks/fsio.h>
#include <nks/errno.h>
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "apr_arch_inherit.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include "fspr_arch_inherit.h"
static apr_status_t pipeblock(apr_file_t *thepipe)
static fspr_status_t pipeblock(fspr_file_t *thepipe)
{
#ifdef USE_FLAGS
int err;
@ -46,7 +46,7 @@ static apr_status_t pipeblock(apr_file_t *thepipe)
return APR_SUCCESS;
}
static apr_status_t pipenonblock(apr_file_t *thepipe)
static fspr_status_t pipenonblock(fspr_file_t *thepipe)
{
#ifdef USE_FLAGS
int err;
@ -70,7 +70,7 @@ static apr_status_t pipenonblock(apr_file_t *thepipe)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_set(fspr_file_t *thepipe, fspr_interval_time_t timeout)
{
if (thepipe->is_pipe == 1) {
thepipe->timeout = timeout;
@ -89,7 +89,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_int
return APR_EINVAL;
}
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_get(fspr_file_t *thepipe, fspr_interval_time_t *timeout)
{
if (thepipe->is_pipe == 1) {
*timeout = thepipe->timeout;
@ -98,14 +98,14 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_int
return APR_EINVAL;
}
APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
apr_os_file_t *thefile,
APR_DECLARE(fspr_status_t) fspr_os_pipe_put_ex(fspr_file_t **file,
fspr_os_file_t *thefile,
int register_cleanup,
apr_pool_t *pool)
fspr_pool_t *pool)
{
int *dafile = thefile;
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file) = fspr_pcalloc(pool, sizeof(fspr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
(*file)->is_pipe = 1;
@ -121,21 +121,21 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
(*file)->thlock = NULL;
#endif
if (register_cleanup) {
apr_pool_cleanup_register((*file)->pool, (void *)(*file),
apr_unix_file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*file)->pool, (void *)(*file),
fspr_unix_file_cleanup,
fspr_pool_cleanup_null);
}
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_pipe_put(fspr_file_t **file,
fspr_os_file_t *thefile,
fspr_pool_t *pool)
{
return apr_os_pipe_put_ex(file, thefile, 0, pool);
return fspr_os_pipe_put_ex(file, thefile, 0, pool);
}
APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_pipe_create(fspr_file_t **in, fspr_file_t **out, fspr_pool_t *pool)
{
int filedes[2];
int err;
@ -144,8 +144,8 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
return errno;
}
(*in) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*out) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*in) = (fspr_file_t *)fspr_pcalloc(pool, sizeof(fspr_file_t));
(*out) = (fspr_file_t *)fspr_pcalloc(pool, sizeof(fspr_file_t));
(*in)->pool =
(*out)->pool = pool;
@ -166,19 +166,19 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
(*in)->ungetchar = -1;
(*in)->thlock =
(*out)->thlock = NULL;
(void) apr_pollset_create(&(*in)->pollset, 1, pool, 0);
(void) apr_pollset_create(&(*out)->pollset, 1, pool, 0);
(void) fspr_pollset_create(&(*in)->pollset, 1, pool, 0);
(void) fspr_pollset_create(&(*out)->pollset, 1, pool, 0);
apr_pool_cleanup_register((*in)->pool, (void *)(*in), apr_unix_file_cleanup,
apr_pool_cleanup_null);
apr_pool_cleanup_register((*out)->pool, (void *)(*out), apr_unix_file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*in)->pool, (void *)(*in), fspr_unix_file_cleanup,
fspr_pool_cleanup_null);
fspr_pool_cleanup_register((*out)->pool, (void *)(*out), fspr_unix_file_cleanup,
fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_namedpipe_create(const char *filename,
fspr_fileperms_t perm, fspr_pool_t *pool)
{
return APR_ENOTIMPL;
}

View File

@ -14,30 +14,30 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_lib.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include <string.h>
static apr_status_t dir_cleanup(void *thedir)
static fspr_status_t dir_cleanup(void *thedir)
{
apr_dir_t *dir = thedir;
return apr_dir_close(dir);
fspr_dir_t *dir = thedir;
return fspr_dir_close(dir);
}
APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dir_open(fspr_dir_t **new, const char *dirname, fspr_pool_t *pool)
{
apr_dir_t *thedir = (apr_dir_t *)apr_palloc(pool, sizeof(apr_dir_t));
fspr_dir_t *thedir = (fspr_dir_t *)fspr_palloc(pool, sizeof(fspr_dir_t));
if (thedir == NULL)
return APR_ENOMEM;
thedir->pool = pool;
thedir->dirname = apr_pstrdup(pool, dirname);
thedir->dirname = fspr_pstrdup(pool, dirname);
if (thedir->dirname == NULL)
return APR_ENOMEM;
@ -45,13 +45,13 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname, apr
thedir->handle = 0;
thedir->validentry = FALSE;
*new = thedir;
apr_pool_cleanup_register(pool, thedir, dir_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, thedir, dir_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir)
APR_DECLARE(fspr_status_t) fspr_dir_close(fspr_dir_t *thedir)
{
int rv = 0;
@ -68,15 +68,15 @@ APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *thedir)
APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
apr_dir_t *thedir)
APR_DECLARE(fspr_status_t) fspr_dir_read(fspr_finfo_t *finfo, fspr_int32_t wanted,
fspr_dir_t *thedir)
{
int rv;
ULONG entries = 1;
if (thedir->handle == 0) {
thedir->handle = HDIR_CREATE;
rv = DosFindFirst(apr_pstrcat(thedir->pool, thedir->dirname, "/*", NULL), &thedir->handle,
rv = DosFindFirst(fspr_pstrcat(thedir->pool, thedir->dirname, "/*", NULL), &thedir->handle,
FILE_ARCHIVED|FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY,
&thedir->entry, sizeof(thedir->entry), &entries, FIL_STANDARD);
} else {
@ -98,11 +98,11 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
/* Only directories & regular files show up in directory listings */
finfo->filetype = (thedir->entry.attrFile & FILE_DIRECTORY) ? APR_DIR : APR_REG;
apr_os2_time_to_apr_time(&finfo->mtime, thedir->entry.fdateLastWrite,
fspr_os2_time_to_fspr_time(&finfo->mtime, thedir->entry.fdateLastWrite,
thedir->entry.ftimeLastWrite);
apr_os2_time_to_apr_time(&finfo->atime, thedir->entry.fdateLastAccess,
fspr_os2_time_to_fspr_time(&finfo->atime, thedir->entry.fdateLastAccess,
thedir->entry.ftimeLastAccess);
apr_os2_time_to_apr_time(&finfo->ctime, thedir->entry.fdateCreation,
fspr_os2_time_to_fspr_time(&finfo->ctime, thedir->entry.fdateCreation,
thedir->entry.ftimeCreation);
finfo->name = thedir->entry.achName;
@ -123,28 +123,28 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
APR_DECLARE(apr_status_t) apr_dir_rewind(apr_dir_t *thedir)
APR_DECLARE(fspr_status_t) fspr_dir_rewind(fspr_dir_t *thedir)
{
return apr_dir_close(thedir);
return fspr_dir_close(thedir);
}
APR_DECLARE(apr_status_t) apr_dir_make(const char *path, apr_fileperms_t perm, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dir_make(const char *path, fspr_fileperms_t perm, fspr_pool_t *pool)
{
return APR_FROM_OS_ERROR(DosCreateDir(path, NULL));
}
APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dir_remove(const char *path, fspr_pool_t *pool)
{
return APR_FROM_OS_ERROR(DosDeleteDir(path));
}
APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir, apr_dir_t *dir)
APR_DECLARE(fspr_status_t) fspr_os_dir_get(fspr_os_dir_t **thedir, fspr_dir_t *dir)
{
if (dir == NULL) {
return APR_ENODIR;
@ -155,11 +155,11 @@ APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir, apr_dir_t *dir)
APR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir, apr_os_dir_t *thedir,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dir_put(fspr_dir_t **dir, fspr_os_dir_t *thedir,
fspr_pool_t *pool)
{
if ((*dir) == NULL) {
(*dir) = (apr_dir_t *)apr_pcalloc(pool, sizeof(apr_dir_t));
(*dir) = (fspr_dir_t *)fspr_pcalloc(pool, sizeof(fspr_dir_t));
(*dir)->pool = pool;
}
(*dir)->handle = *thedir;

View File

@ -14,27 +14,27 @@
* limitations under the License.
*/
#include "apr_file_io.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "fspr_file_io.h"
#include "fspr_lib.h"
#include "fspr_strings.h"
#include <string.h>
#define IS_SEP(c) (c == '/' || c == '\\')
/* Remove trailing separators that don't affect the meaning of PATH. */
static const char *path_canonicalize(const char *path, apr_pool_t *pool)
static const char *path_canonicalize(const char *path, fspr_pool_t *pool)
{
/* At some point this could eliminate redundant components. For
* now, it just makes sure there is no trailing slash. */
apr_size_t len = strlen(path);
apr_size_t orig_len = len;
fspr_size_t len = strlen(path);
fspr_size_t orig_len = len;
while ((len > 0) && IS_SEP(path[len - 1])) {
len--;
}
if (len != orig_len) {
return apr_pstrndup(pool, path, len);
return fspr_pstrndup(pool, path, len);
}
else {
return path;
@ -44,7 +44,7 @@ static const char *path_canonicalize(const char *path, apr_pool_t *pool)
/* Remove one component off the end of PATH. */
static char *path_remove_last_component(const char *path, apr_pool_t *pool)
static char *path_remove_last_component(const char *path, fspr_pool_t *pool)
{
const char *newpath = path_canonicalize(path, pool);
int i;
@ -55,32 +55,32 @@ static char *path_remove_last_component(const char *path, apr_pool_t *pool)
}
}
return apr_pstrndup(pool, path, (i < 0) ? 0 : i);
return fspr_pstrndup(pool, path, (i < 0) ? 0 : i);
}
apr_status_t apr_dir_make_recursive(const char *path, apr_fileperms_t perm,
apr_pool_t *pool)
fspr_status_t fspr_dir_make_recursive(const char *path, fspr_fileperms_t perm,
fspr_pool_t *pool)
{
apr_status_t apr_err = APR_SUCCESS;
fspr_status_t fspr_err = APR_SUCCESS;
apr_err = apr_dir_make(path, perm, pool); /* Try to make PATH right out */
fspr_err = fspr_dir_make(path, perm, pool); /* Try to make PATH right out */
if (APR_STATUS_IS_EEXIST(apr_err)) { /* It's OK if PATH exists */
if (APR_STATUS_IS_EEXIST(fspr_err)) { /* It's OK if PATH exists */
return APR_SUCCESS;
}
if (APR_STATUS_IS_ENOENT(apr_err)) { /* Missing an intermediate dir */
if (APR_STATUS_IS_ENOENT(fspr_err)) { /* Missing an intermediate dir */
char *dir;
dir = path_remove_last_component(path, pool);
apr_err = apr_dir_make_recursive(dir, perm, pool);
fspr_err = fspr_dir_make_recursive(dir, perm, pool);
if (!apr_err) {
apr_err = apr_dir_make(path, perm, pool);
if (!fspr_err) {
fspr_err = fspr_dir_make(path, perm, pool);
}
}
return apr_err;
return fspr_err;
}

View File

@ -14,20 +14,20 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_lib.h"
#include "fspr_strings.h"
#include <string.h>
#include "apr_arch_inherit.h"
#include "fspr_arch_inherit.h"
static apr_status_t file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
static fspr_status_t file_dup(fspr_file_t **new_file, fspr_file_t *old_file, fspr_pool_t *p)
{
int rv;
apr_file_t *dup_file;
fspr_file_t *dup_file;
if (*new_file == NULL) {
dup_file = (apr_file_t *)apr_palloc(p, sizeof(apr_file_t));
dup_file = (fspr_file_t *)fspr_palloc(p, sizeof(fspr_file_t));
if (dup_file == NULL) {
return APR_ENOMEM;
@ -45,7 +45,7 @@ static apr_status_t file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_po
return APR_FROM_OS_ERROR(rv);
}
dup_file->fname = apr_pstrdup(dup_file->pool, old_file->fname);
dup_file->fname = fspr_pstrdup(dup_file->pool, old_file->fname);
dup_file->buffered = old_file->buffered;
dup_file->isopen = old_file->isopen;
dup_file->flags = old_file->flags & ~APR_INHERIT;
@ -53,8 +53,8 @@ static apr_status_t file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_po
dup_file->pipe = old_file->pipe;
if (*new_file == NULL) {
apr_pool_cleanup_register(dup_file->pool, dup_file, apr_file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register(dup_file->pool, dup_file, fspr_file_cleanup,
fspr_pool_cleanup_null);
*new_file = dup_file;
}
@ -63,10 +63,10 @@ static apr_status_t file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_po
APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file, apr_file_t *old_file, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_dup(fspr_file_t **new_file, fspr_file_t *old_file, fspr_pool_t *p)
{
if (*new_file) {
apr_file_close(*new_file);
fspr_file_close(*new_file);
(*new_file)->filedes = -1;
}
@ -75,23 +75,23 @@ APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file, apr_file_t *old_fi
APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file, apr_file_t *old_file, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_dup2(fspr_file_t *new_file, fspr_file_t *old_file, fspr_pool_t *p)
{
return file_dup(&new_file, old_file, p);
}
APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
apr_file_t *old_file,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_setaside(fspr_file_t **new_file,
fspr_file_t *old_file,
fspr_pool_t *p)
{
*new_file = (apr_file_t *)apr_palloc(p, sizeof(apr_file_t));
memcpy(*new_file, old_file, sizeof(apr_file_t));
*new_file = (fspr_file_t *)fspr_palloc(p, sizeof(fspr_file_t));
memcpy(*new_file, old_file, sizeof(fspr_file_t));
(*new_file)->pool = p;
if (old_file->buffered) {
(*new_file)->buffer = apr_palloc(p, APR_FILE_BUFSIZE);
(*new_file)->buffer = fspr_palloc(p, APR_FILE_BUFSIZE);
if (old_file->direction == 1) {
memcpy((*new_file)->buffer, old_file->buffer, old_file->bufpos);
@ -101,25 +101,25 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
}
if (old_file->mutex) {
apr_thread_mutex_create(&((*new_file)->mutex),
fspr_thread_mutex_create(&((*new_file)->mutex),
APR_THREAD_MUTEX_DEFAULT, p);
apr_thread_mutex_destroy(old_file->mutex);
fspr_thread_mutex_destroy(old_file->mutex);
}
}
if (old_file->fname) {
(*new_file)->fname = apr_pstrdup(p, old_file->fname);
(*new_file)->fname = fspr_pstrdup(p, old_file->fname);
}
if (!(old_file->flags & APR_FILE_NOCLEANUP)) {
apr_pool_cleanup_register(p, (void *)(*new_file),
apr_file_cleanup,
apr_file_cleanup);
fspr_pool_cleanup_register(p, (void *)(*new_file),
fspr_file_cleanup,
fspr_file_cleanup);
}
old_file->filedes = -1;
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
apr_file_cleanup);
fspr_pool_cleanup_kill(old_file->pool, (void *)old_file,
fspr_file_cleanup);
return APR_SUCCESS;
}

View File

@ -16,14 +16,14 @@
#define INCL_DOS
#define INCL_DOSERRORS
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_lib.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_lib.h"
#include <sys/time.h>
#include "apr_strings.h"
#include "fspr_strings.h"
static void FS3_to_finfo(apr_finfo_t *finfo, FILESTATUS3 *fstatus)
static void FS3_to_finfo(fspr_finfo_t *finfo, FILESTATUS3 *fstatus)
{
finfo->protection = (fstatus->attrFile & FILE_READONLY) ? 0x555 : 0x777;
@ -39,11 +39,11 @@ static void FS3_to_finfo(apr_finfo_t *finfo, FILESTATUS3 *fstatus)
finfo->device = 0;
finfo->size = fstatus->cbFile;
finfo->csize = fstatus->cbFileAlloc;
apr_os2_time_to_apr_time(&finfo->atime, fstatus->fdateLastAccess,
fspr_os2_time_to_fspr_time(&finfo->atime, fstatus->fdateLastAccess,
fstatus->ftimeLastAccess );
apr_os2_time_to_apr_time(&finfo->mtime, fstatus->fdateLastWrite,
fspr_os2_time_to_fspr_time(&finfo->mtime, fstatus->fdateLastWrite,
fstatus->ftimeLastWrite );
apr_os2_time_to_apr_time(&finfo->ctime, fstatus->fdateCreation,
fspr_os2_time_to_fspr_time(&finfo->ctime, fstatus->fdateCreation,
fstatus->ftimeCreation );
finfo->valid = APR_FINFO_TYPE | APR_FINFO_PROT | APR_FINFO_SIZE
| APR_FINFO_CSIZE | APR_FINFO_MTIME
@ -52,7 +52,7 @@ static void FS3_to_finfo(apr_finfo_t *finfo, FILESTATUS3 *fstatus)
static apr_status_t handle_type(apr_filetype_e *ftype, HFILE file)
static fspr_status_t handle_type(fspr_filetype_e *ftype, HFILE file)
{
ULONG filetype, fileattr, rc;
@ -86,15 +86,15 @@ static apr_status_t handle_type(apr_filetype_e *ftype, HFILE file)
APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_info_get(fspr_finfo_t *finfo, fspr_int32_t wanted,
fspr_file_t *thefile)
{
ULONG rc;
FILESTATUS3 fstatus;
if (thefile->isopen) {
if (thefile->buffered) {
apr_status_t rv = apr_file_flush(thefile);
fspr_status_t rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS) {
return rv;
@ -124,14 +124,14 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t want
return APR_FROM_OS_ERROR(rc);
}
APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname, apr_fileperms_t perms)
APR_DECLARE(fspr_status_t) fspr_file_perms_set(const char *fname, fspr_fileperms_t perms)
{
return APR_ENOTIMPL;
}
APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
apr_int32_t wanted, apr_pool_t *cont)
APR_DECLARE(fspr_status_t) fspr_stat(fspr_finfo_t *finfo, const char *fname,
fspr_int32_t wanted, fspr_pool_t *cont)
{
ULONG rc;
FILESTATUS3 fstatus;
@ -153,18 +153,18 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
FILE_DIRECTORY|FILE_HIDDEN|FILE_SYSTEM|FILE_ARCHIVED,
&ffb, sizeof(ffb), &count, FIL_STANDARD);
if (rc == 0 && count == 1) {
finfo->name = apr_pstrdup(cont, ffb.achName);
finfo->name = fspr_pstrdup(cont, ffb.achName);
finfo->valid |= APR_FINFO_NAME;
}
}
} else if (rc == ERROR_INVALID_ACCESS) {
memset(finfo, 0, sizeof(apr_finfo_t));
memset(finfo, 0, sizeof(fspr_finfo_t));
finfo->valid = APR_FINFO_TYPE | APR_FINFO_PROT;
finfo->protection = 0666;
finfo->filetype = APR_CHR;
if (wanted & APR_FINFO_NAME) {
finfo->name = apr_pstrdup(cont, fname);
finfo->name = fspr_pstrdup(cont, fname);
finfo->valid |= APR_FINFO_NAME;
}
} else {
@ -176,10 +176,10 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
apr_fileattrs_t attributes,
apr_fileattrs_t attr_mask,
apr_pool_t *cont)
APR_DECLARE(fspr_status_t) fspr_file_attrs_set(const char *fname,
fspr_fileattrs_t attributes,
fspr_fileattrs_t attr_mask,
fspr_pool_t *cont)
{
FILESTATUS3 fs3;
ULONG rc;
@ -221,9 +221,9 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
/* ### Somebody please write this! */
APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
apr_time_t mtime,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_mtime_set(const char *fname,
fspr_time_t mtime,
fspr_pool_t *pool)
{
FILESTATUS3 fs3;
ULONG rc;
@ -233,7 +233,7 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
return APR_FROM_OS_ERROR(rc);
}
apr_apr_time_to_os2_time(&fs3.fdateLastWrite, &fs3.ftimeLastWrite, mtime);
fspr_fspr_time_to_os2_time(&fs3.fdateLastWrite, &fs3.ftimeLastWrite, mtime);
rc = DosSetPathInfo(fname, FIL_STANDARD, &fs3, sizeof(fs3), 0);
return APR_FROM_OS_ERROR(rc);

View File

@ -14,10 +14,10 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_lib.h"
#include "fspr.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_lib.h"
#include <ctype.h>
/* OS/2 Exceptions:
@ -52,9 +52,9 @@ const char c_is_fnchar[256] =
#define IS_SLASH(c) (c == '/' || c == '\\')
apr_status_t filepath_root_test(char *path, apr_pool_t *p)
fspr_status_t filepath_root_test(char *path, fspr_pool_t *p)
{
char drive = apr_toupper(path[0]);
char drive = fspr_toupper(path[0]);
if (drive >= 'A' && drive <= 'Z' && path[1] == ':' && IS_SLASH(path[2]))
return APR_SUCCESS;
@ -63,8 +63,8 @@ apr_status_t filepath_root_test(char *path, apr_pool_t *p)
}
apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_int32_t flags, apr_pool_t *p)
fspr_status_t filepath_drive_get(char **rootpath, char drive,
fspr_int32_t flags, fspr_pool_t *p)
{
char path[APR_PATH_MAX];
char *pos;
@ -75,7 +75,7 @@ apr_status_t filepath_drive_get(char **rootpath, char drive,
path[1] = ':';
path[2] = '/';
rc = DosQueryCurrentDir(apr_toupper(drive) - 'A', path+3, &bufsize);
rc = DosQueryCurrentDir(fspr_toupper(drive) - 'A', path+3, &bufsize);
if (rc) {
return APR_FROM_OS_ERROR(rc);
@ -88,16 +88,16 @@ apr_status_t filepath_drive_get(char **rootpath, char drive,
}
}
*rootpath = apr_pstrdup(p, path);
*rootpath = fspr_pstrdup(p, path);
return APR_SUCCESS;
}
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
fspr_status_t filepath_root_case(char **rootpath, char *root, fspr_pool_t *p)
{
if (root[0] && apr_islower(root[0]) && root[1] == ':') {
*rootpath = apr_pstrdup(p, root);
(*rootpath)[0] = apr_toupper((*rootpath)[0]);
if (root[0] && fspr_islower(root[0]) && root[1] == ':') {
*rootpath = fspr_pstrdup(p, root);
(*rootpath)[0] = fspr_toupper((*rootpath)[0]);
}
else {
*rootpath = root;
@ -106,8 +106,8 @@ apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
}
APR_DECLARE(apr_status_t) apr_filepath_get(char **defpath, apr_int32_t flags,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_get(char **defpath, fspr_int32_t flags,
fspr_pool_t *p)
{
char path[APR_PATH_MAX];
ULONG drive;
@ -120,7 +120,7 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **defpath, apr_int32_t flags,
strcpy(path+1, ":\\");
rv = DosQueryCurrentDir(drive, path+3, &pathlen);
*defpath = apr_pstrdup(p, path);
*defpath = fspr_pstrdup(p, path);
if (!(flags & APR_FILEPATH_NATIVE)) {
for (pos=*defpath; *pos; pos++) {
@ -134,12 +134,12 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **defpath, apr_int32_t flags,
APR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_set(const char *path, fspr_pool_t *p)
{
ULONG rv = 0;
if (path[1] == ':')
rv = DosSetDefaultDisk(apr_toupper(path[0]) - '@');
rv = DosSetDefaultDisk(fspr_toupper(path[0]) - '@');
if (rv == 0)
rv = DosSetCurrentDir(path);

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "fspr_arch_file_io.h"
APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
APR_DECLARE(fspr_status_t) fspr_file_lock(fspr_file_t *thefile, int type)
{
FILELOCK lockrange = { 0, 0x7fffffff };
ULONG rc;
@ -27,7 +27,7 @@ APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
return APR_FROM_OS_ERROR(rc);
}
APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_unlock(fspr_file_t *thefile)
{
FILELOCK unlockrange = { 0, 0x7fffffff };
ULONG rc;

View File

@ -15,11 +15,11 @@
*/
#define INCL_DOSERRORS
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include <errno.h>
#include <string.h>
#include "apr_errno.h"
#include "fspr_errno.h"
static int errormap[][2] = {
{ NO_ERROR, APR_SUCCESS },
@ -75,7 +75,7 @@ static int errormap[][2] = {
#define MAPSIZE (sizeof(errormap)/sizeof(errormap[0]))
int apr_canonical_error(apr_status_t err)
int fspr_canonical_error(fspr_status_t err)
{
int rv = -1, index;
@ -89,7 +89,7 @@ int apr_canonical_error(apr_status_t err)
if (index<MAPSIZE)
rv = errormap[index][1];
else
fprintf(stderr, "apr_canonical_error: Unknown OS/2 error code %d\n", err );
fprintf(stderr, "fspr_canonical_error: Unknown OS/2 error code %d\n", err );
return rv;
}

View File

@ -14,29 +14,29 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_lib.h"
#include "apr_portable.h"
#include "apr_strings.h"
#include "apr_arch_inherit.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_lib.h"
#include "fspr_portable.h"
#include "fspr_strings.h"
#include "fspr_arch_inherit.h"
#include <string.h>
apr_status_t apr_file_cleanup(void *thefile)
fspr_status_t fspr_file_cleanup(void *thefile)
{
apr_file_t *file = thefile;
return apr_file_close(file);
fspr_file_t *file = thefile;
return fspr_file_close(file);
}
APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open(fspr_file_t **new, const char *fname, fspr_int32_t flag, fspr_fileperms_t perm, fspr_pool_t *pool)
{
int oflags = 0;
int mflags = OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYNONE;
int rv;
ULONG action;
apr_file_t *dafile = (apr_file_t *)apr_palloc(pool, sizeof(apr_file_t));
fspr_file_t *dafile = (fspr_file_t *)fspr_palloc(pool, sizeof(fspr_file_t));
dafile->pool = pool;
dafile->isopen = FALSE;
@ -59,8 +59,8 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr
dafile->buffered = (flag & APR_BUFFERED) > 0;
if (dafile->buffered) {
dafile->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
rv = apr_thread_mutex_create(&dafile->mutex, 0, pool);
dafile->buffer = fspr_palloc(pool, APR_FILE_BUFSIZE);
rv = fspr_thread_mutex_create(&dafile->mutex, 0, pool);
if (rv)
return rv;
@ -97,7 +97,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr
return APR_FROM_OS_ERROR(rv);
dafile->isopen = TRUE;
dafile->fname = apr_pstrdup(pool, fname);
dafile->fname = fspr_pstrdup(pool, fname);
dafile->filePtr = 0;
dafile->bufpos = 0;
dafile->dataRead = 0;
@ -105,7 +105,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr
dafile->pipe = FALSE;
if (!(flag & APR_FILE_NOCLEANUP)) {
apr_pool_cleanup_register(dafile->pool, dafile, apr_file_cleanup, apr_file_cleanup);
fspr_pool_cleanup_register(dafile->pool, dafile, fspr_file_cleanup, fspr_file_cleanup);
}
*new = dafile;
@ -114,13 +114,13 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname, apr
APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
APR_DECLARE(fspr_status_t) fspr_file_close(fspr_file_t *file)
{
ULONG rc;
apr_status_t status;
fspr_status_t status;
if (file && file->isopen) {
apr_file_flush(file);
fspr_file_flush(file);
rc = DosClose(file->filedes);
if (rc == 0) {
@ -136,14 +136,14 @@ APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
}
if (file->buffered)
apr_thread_mutex_destroy(file->mutex);
fspr_thread_mutex_destroy(file->mutex);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_remove(const char *path, fspr_pool_t *pool)
{
ULONG rc = DosDelete(path);
return APR_FROM_OS_ERROR(rc);
@ -151,8 +151,8 @@ APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path, const char *to_path,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_rename(const char *from_path, const char *to_path,
fspr_pool_t *p)
{
ULONG rc = DosMove(from_path, to_path);
@ -169,7 +169,7 @@ APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path, const char *to_
APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile, apr_file_t *file)
APR_DECLARE(fspr_status_t) fspr_os_file_get(fspr_os_file_t *thefile, fspr_file_t *file)
{
*thefile = file->filedes;
return APR_SUCCESS;
@ -177,11 +177,11 @@ APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile, apr_file_t *fi
APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file, apr_os_file_t *thefile, apr_int32_t flags, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_file_put(fspr_file_t **file, fspr_os_file_t *thefile, fspr_int32_t flags, fspr_pool_t *pool)
{
apr_os_file_t *dafile = thefile;
fspr_os_file_t *dafile = thefile;
(*file) = apr_palloc(pool, sizeof(apr_file_t));
(*file) = fspr_palloc(pool, sizeof(fspr_file_t));
(*file)->pool = pool;
(*file)->filedes = *dafile;
(*file)->isopen = TRUE;
@ -191,10 +191,10 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file, apr_os_file_t *thef
(*file)->buffered = (flags & APR_BUFFERED) > 0;
if ((*file)->buffered) {
apr_status_t rv;
fspr_status_t rv;
(*file)->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
rv = apr_thread_mutex_create(&(*file)->mutex, 0, pool);
(*file)->buffer = fspr_palloc(pool, APR_FILE_BUFSIZE);
rv = fspr_thread_mutex_create(&(*file)->mutex, 0, pool);
if (rv)
return rv;
@ -204,7 +204,7 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file, apr_os_file_t *thef
}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
APR_DECLARE(fspr_status_t) fspr_file_eof(fspr_file_t *fptr)
{
if (!fptr->isopen || fptr->eof_hit == 1) {
return APR_EOF;
@ -213,33 +213,33 @@ APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
}
APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stderr(fspr_file_t **thefile, fspr_pool_t *pool)
{
apr_os_file_t fd = 2;
fspr_os_file_t fd = 2;
return apr_os_file_put(thefile, &fd, 0, pool);
return fspr_os_file_put(thefile, &fd, 0, pool);
}
APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stdout(fspr_file_t **thefile, fspr_pool_t *pool)
{
apr_os_file_t fd = 1;
fspr_os_file_t fd = 1;
return apr_os_file_put(thefile, &fd, 0, pool);
return fspr_os_file_put(thefile, &fd, 0, pool);
}
APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stdin(fspr_file_t **thefile, fspr_pool_t *pool)
{
apr_os_file_t fd = 0;
fspr_os_file_t fd = 0;
return apr_os_file_put(thefile, &fd, 0, pool);
return fspr_os_file_put(thefile, &fd, 0, pool);
}
APR_POOL_IMPLEMENT_ACCESSOR(file);
APR_IMPLEMENT_INHERIT_SET(file, flags, pool, apr_file_cleanup)
APR_IMPLEMENT_INHERIT_SET(file, flags, pool, fspr_file_cleanup)
APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, apr_file_cleanup)
APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, fspr_file_cleanup)

View File

@ -15,16 +15,16 @@
*/
#define INCL_DOSERRORS
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_lib.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include <string.h>
#include <process.h>
APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_pipe_create(fspr_file_t **in, fspr_file_t **out, fspr_pool_t *pool)
{
ULONG filedes[2];
ULONG rc, action;
@ -54,7 +54,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
return APR_FROM_OS_ERROR(rc);
}
(*in) = (apr_file_t *)apr_palloc(pool, sizeof(apr_file_t));
(*in) = (fspr_file_t *)fspr_palloc(pool, sizeof(fspr_file_t));
rc = DosCreateEventSem(NULL, &(*in)->pipeSem, DC_SEM_SHARED, FALSE);
if (rc) {
@ -78,33 +78,33 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
(*in)->pool = pool;
(*in)->filedes = filedes[0];
(*in)->fname = apr_pstrdup(pool, pipename);
(*in)->fname = fspr_pstrdup(pool, pipename);
(*in)->isopen = TRUE;
(*in)->buffered = FALSE;
(*in)->flags = 0;
(*in)->pipe = 1;
(*in)->timeout = -1;
(*in)->blocking = BLK_ON;
apr_pool_cleanup_register(pool, *in, apr_file_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, *in, fspr_file_cleanup, fspr_pool_cleanup_null);
(*out) = (apr_file_t *)apr_palloc(pool, sizeof(apr_file_t));
(*out) = (fspr_file_t *)fspr_palloc(pool, sizeof(fspr_file_t));
(*out)->pool = pool;
(*out)->filedes = filedes[1];
(*out)->fname = apr_pstrdup(pool, pipename);
(*out)->fname = fspr_pstrdup(pool, pipename);
(*out)->isopen = TRUE;
(*out)->buffered = FALSE;
(*out)->flags = 0;
(*out)->pipe = 1;
(*out)->timeout = -1;
(*out)->blocking = BLK_ON;
apr_pool_cleanup_register(pool, *out, apr_file_cleanup, apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, *out, fspr_file_cleanup, fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, apr_fileperms_t perm, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_namedpipe_create(const char *filename, fspr_fileperms_t perm, fspr_pool_t *pool)
{
/* Not yet implemented, interface not suitable */
return APR_ENOTIMPL;
@ -112,7 +112,7 @@ APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename, apr_fi
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_set(fspr_file_t *thepipe, fspr_interval_time_t timeout)
{
if (thepipe->pipe == 1) {
thepipe->timeout = timeout;
@ -135,7 +135,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_int
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_get(fspr_file_t *thepipe, fspr_interval_time_t *timeout)
{
if (thepipe->pipe == 1) {
*timeout = thepipe->timeout;
@ -146,12 +146,12 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_int
APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
apr_os_file_t *thefile,
APR_DECLARE(fspr_status_t) fspr_os_pipe_put_ex(fspr_file_t **file,
fspr_os_file_t *thefile,
int register_cleanup,
apr_pool_t *pool)
fspr_pool_t *pool)
{
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file) = fspr_pcalloc(pool, sizeof(fspr_file_t));
(*file)->pool = pool;
(*file)->isopen = TRUE;
(*file)->pipe = 1;
@ -160,8 +160,8 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
(*file)->filedes = *thefile;
if (register_cleanup) {
apr_pool_cleanup_register(pool, *file, apr_file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, *file, fspr_file_cleanup,
fspr_pool_cleanup_null);
}
return APR_SUCCESS;
@ -169,9 +169,9 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_pipe_put(fspr_file_t **file,
fspr_os_file_t *thefile,
fspr_pool_t *pool)
{
return apr_os_pipe_put_ex(file, thefile, 0, pool);
return fspr_os_pipe_put_ex(file, thefile, 0, pool);
}

View File

@ -17,14 +17,14 @@
#define INCL_DOS
#define INCL_DOSERRORS
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_lib.h"
#include "apr_strings.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_lib.h"
#include "fspr_strings.h"
#include <malloc.h>
APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
APR_DECLARE(fspr_status_t) fspr_file_read(fspr_file_t *thefile, void *buf, fspr_size_t *nbytes)
{
ULONG rc = 0;
ULONG bytesread;
@ -39,13 +39,13 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
ULONG blocksize;
ULONG size = *nbytes;
apr_thread_mutex_lock(thefile->mutex);
fspr_thread_mutex_lock(thefile->mutex);
if (thefile->direction == 1) {
int rv = apr_file_flush(thefile);
int rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS) {
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
return rv;
}
@ -79,7 +79,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
}
*nbytes = rc == 0 ? pos - (char *)buf : 0;
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
if (*nbytes == 0 && rc == 0 && thefile->eof_hit) {
return APR_EOF;
@ -122,7 +122,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
APR_DECLARE(fspr_status_t) fspr_file_write(fspr_file_t *thefile, const void *buf, fspr_size_t *nbytes)
{
ULONG rc = 0;
ULONG byteswritten;
@ -137,7 +137,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
int blocksize;
int size = *nbytes;
apr_thread_mutex_lock(thefile->mutex);
fspr_thread_mutex_lock(thefile->mutex);
if ( thefile->direction == 0 ) {
// Position file pointer for writing at the offset we are logically reading from
@ -150,7 +150,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
while (rc == 0 && size > 0) {
if (thefile->bufpos == APR_FILE_BUFSIZE) // write buffer is full
rc = apr_file_flush(thefile);
rc = fspr_file_flush(thefile);
blocksize = size > APR_FILE_BUFSIZE - thefile->bufpos ? APR_FILE_BUFSIZE - thefile->bufpos : size;
memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
@ -159,7 +159,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
size -= blocksize;
}
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
return APR_FROM_OS_ERROR(rc);
} else {
if (thefile->flags & APR_APPEND) {
@ -194,7 +194,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
#ifdef HAVE_WRITEV
APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes)
APR_DECLARE(fspr_status_t) fspr_file_writev(fspr_file_t *thefile, const struct iovec *vec, fspr_size_t nvec, fspr_size_t *nbytes)
{
int bytes;
if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) {
@ -210,7 +210,7 @@ APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iove
APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_putc(char ch, fspr_file_t *thefile)
{
ULONG rc;
ULONG byteswritten;
@ -230,24 +230,24 @@ APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile)
APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_ungetc(char ch, fspr_file_t *thefile)
{
apr_off_t offset = -1;
return apr_file_seek(thefile, APR_CUR, &offset);
fspr_off_t offset = -1;
return fspr_file_seek(thefile, APR_CUR, &offset);
}
APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_getc(char *ch, fspr_file_t *thefile)
{
ULONG rc;
apr_size_t bytesread;
fspr_size_t bytesread;
if (!thefile->isopen) {
return APR_EBADF;
}
bytesread = 1;
rc = apr_file_read(thefile, ch, &bytesread);
rc = fspr_file_read(thefile, ch, &bytesread);
if (rc) {
return rc;
@ -263,16 +263,16 @@ APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_puts(const char *str, fspr_file_t *thefile)
{
apr_size_t len;
fspr_size_t len;
len = strlen(str);
return apr_file_write(thefile, str, &len);
return fspr_file_write(thefile, str, &len);
}
APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_flush(fspr_file_t *thefile)
{
if (thefile->buffered) {
ULONG written = 0;
@ -296,15 +296,15 @@ APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
}
APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_gets(char *str, int len, fspr_file_t *thefile)
{
apr_size_t readlen;
apr_status_t rv = APR_SUCCESS;
fspr_size_t readlen;
fspr_status_t rv = APR_SUCCESS;
int i;
for (i = 0; i < len-1; i++) {
readlen = 1;
rv = apr_file_read(thefile, str+i, &readlen);
rv = fspr_file_read(thefile, str+i, &readlen);
if (rv != APR_SUCCESS) {
break;
@ -332,7 +332,7 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
APR_DECLARE_NONSTD(int) fspr_file_printf(fspr_file_t *fptr,
const char *format, ...)
{
int cc;
@ -345,8 +345,8 @@ APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
return 0;
}
va_start(ap, format);
len = apr_vsnprintf(buf, HUGE_STRING_LEN, format, ap);
cc = apr_file_puts(buf, fptr);
len = fspr_vsnprintf(buf, HUGE_STRING_LEN, format, ap);
cc = fspr_file_puts(buf, fptr);
va_end(ap);
free(buf);
return (cc == APR_SUCCESS) ? len : -1;
@ -354,7 +354,7 @@ APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
apr_status_t apr_file_check_read(apr_file_t *fd)
fspr_status_t fspr_file_check_read(fspr_file_t *fd)
{
int rc;

View File

@ -14,20 +14,20 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_lib.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_lib.h"
#include <string.h>
#include <io.h>
static apr_status_t setptr(apr_file_t *thefile, unsigned long pos )
static fspr_status_t setptr(fspr_file_t *thefile, unsigned long pos )
{
long newbufpos;
ULONG rc;
if (thefile->direction == 1) {
apr_status_t rv = apr_file_flush(thefile);
fspr_status_t rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS) {
return rv;
@ -52,7 +52,7 @@ static apr_status_t setptr(apr_file_t *thefile, unsigned long pos )
APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
APR_DECLARE(fspr_status_t) fspr_file_seek(fspr_file_t *thefile, fspr_seek_where_t where, fspr_off_t *offset)
{
if (!thefile->isopen) {
return APR_EBADF;
@ -62,7 +62,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
if (thefile->buffered) {
int rc = EINVAL;
apr_finfo_t finfo;
fspr_finfo_t finfo;
switch (where) {
case APR_SET:
@ -74,7 +74,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
break;
case APR_END:
rc = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
rc = fspr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
if (rc == APR_SUCCESS)
rc = setptr(thefile, finfo.size + *offset);
break;
@ -103,7 +103,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
APR_DECLARE(apr_status_t) apr_file_trunc(apr_file_t *fp, apr_off_t offset)
APR_DECLARE(fspr_status_t) fspr_file_trunc(fspr_file_t *fp, fspr_off_t offset)
{
int rc = DosSetFileSize(fp->filedes, offset);

View File

@ -14,30 +14,30 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
static apr_status_t apr_file_transfer_contents(const char *from_path,
static fspr_status_t fspr_file_transfer_contents(const char *from_path,
const char *to_path,
apr_int32_t flags,
apr_fileperms_t to_perms,
apr_pool_t *pool)
fspr_int32_t flags,
fspr_fileperms_t to_perms,
fspr_pool_t *pool)
{
apr_file_t *s, *d;
apr_status_t status;
apr_finfo_t finfo;
apr_fileperms_t perms;
fspr_file_t *s, *d;
fspr_status_t status;
fspr_finfo_t finfo;
fspr_fileperms_t perms;
/* Open source file. */
status = apr_file_open(&s, from_path, APR_READ, APR_OS_DEFAULT, pool);
status = fspr_file_open(&s, from_path, APR_READ, APR_OS_DEFAULT, pool);
if (status)
return status;
/* Maybe get its permissions. */
if (to_perms == APR_FILE_SOURCE_PERMS) {
status = apr_file_info_get(&finfo, APR_FINFO_PROT, s);
status = fspr_file_info_get(&finfo, APR_FINFO_PROT, s);
if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
apr_file_close(s); /* toss any error */
fspr_file_close(s); /* toss any error */
return status;
}
perms = finfo.protection;
@ -46,66 +46,66 @@ static apr_status_t apr_file_transfer_contents(const char *from_path,
perms = to_perms;
/* Open dest file. */
status = apr_file_open(&d, to_path, flags, perms, pool);
status = fspr_file_open(&d, to_path, flags, perms, pool);
if (status) {
apr_file_close(s); /* toss any error */
fspr_file_close(s); /* toss any error */
return status;
}
/* Copy bytes till the cows come home. */
while (1) {
char buf[BUFSIZ];
apr_size_t bytes_this_time = sizeof(buf);
apr_status_t read_err;
apr_status_t write_err;
fspr_size_t bytes_this_time = sizeof(buf);
fspr_status_t read_err;
fspr_status_t write_err;
/* Read 'em. */
read_err = apr_file_read(s, buf, &bytes_this_time);
read_err = fspr_file_read(s, buf, &bytes_this_time);
if (read_err && !APR_STATUS_IS_EOF(read_err)) {
apr_file_close(s); /* toss any error */
apr_file_close(d); /* toss any error */
fspr_file_close(s); /* toss any error */
fspr_file_close(d); /* toss any error */
return read_err;
}
/* Write 'em. */
write_err = apr_file_write_full(d, buf, bytes_this_time, NULL);
write_err = fspr_file_write_full(d, buf, bytes_this_time, NULL);
if (write_err) {
apr_file_close(s); /* toss any error */
apr_file_close(d); /* toss any error */
fspr_file_close(s); /* toss any error */
fspr_file_close(d); /* toss any error */
return write_err;
}
if (read_err && APR_STATUS_IS_EOF(read_err)) {
status = apr_file_close(s);
status = fspr_file_close(s);
if (status) {
apr_file_close(d); /* toss any error */
fspr_file_close(d); /* toss any error */
return status;
}
/* return the results of this close: an error, or success */
return apr_file_close(d);
return fspr_file_close(d);
}
}
/* NOTREACHED */
}
APR_DECLARE(apr_status_t) apr_file_copy(const char *from_path,
APR_DECLARE(fspr_status_t) fspr_file_copy(const char *from_path,
const char *to_path,
apr_fileperms_t perms,
apr_pool_t *pool)
fspr_fileperms_t perms,
fspr_pool_t *pool)
{
return apr_file_transfer_contents(from_path, to_path,
return fspr_file_transfer_contents(from_path, to_path,
(APR_WRITE | APR_CREATE | APR_TRUNCATE),
perms,
pool);
}
APR_DECLARE(apr_status_t) apr_file_append(const char *from_path,
APR_DECLARE(fspr_status_t) fspr_file_append(const char *from_path,
const char *to_path,
apr_fileperms_t perms,
apr_pool_t *pool)
fspr_fileperms_t perms,
fspr_pool_t *pool)
{
return apr_file_transfer_contents(from_path, to_path,
return fspr_file_transfer_contents(from_path, to_path,
(APR_WRITE | APR_CREATE | APR_APPEND),
perms,
pool);

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#if APR_HAVE_SYS_SYSLIMITS_H
#include <sys/syslimits.h>
#endif
@ -24,9 +24,9 @@
#include <limits.h>
#endif
static apr_status_t dir_cleanup(void *thedir)
static fspr_status_t dir_cleanup(void *thedir)
{
apr_dir_t *dir = thedir;
fspr_dir_t *dir = thedir;
if (closedir(dir->dirstruct) == 0) {
return APR_SUCCESS;
}
@ -38,24 +38,24 @@ static apr_status_t dir_cleanup(void *thedir)
#define PATH_SEPARATOR '/'
/* Remove trailing separators that don't affect the meaning of PATH. */
static const char *path_canonicalize (const char *path, apr_pool_t *pool)
static const char *path_canonicalize (const char *path, fspr_pool_t *pool)
{
/* At some point this could eliminate redundant components. For
* now, it just makes sure there is no trailing slash. */
apr_size_t len = strlen (path);
apr_size_t orig_len = len;
fspr_size_t len = strlen (path);
fspr_size_t orig_len = len;
while ((len > 0) && (path[len - 1] == PATH_SEPARATOR))
len--;
if (len != orig_len)
return apr_pstrndup (pool, path, len);
return fspr_pstrndup (pool, path, len);
else
return path;
}
/* Remove one component off the end of PATH. */
static char *path_remove_last_component (const char *path, apr_pool_t *pool)
static char *path_remove_last_component (const char *path, fspr_pool_t *pool)
{
const char *newpath = path_canonicalize (path, pool);
int i;
@ -65,18 +65,18 @@ static char *path_remove_last_component (const char *path, apr_pool_t *pool)
break;
}
return apr_pstrndup (pool, path, (i < 0) ? 0 : i);
return fspr_pstrndup (pool, path, (i < 0) ? 0 : i);
}
apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
apr_pool_t *pool)
fspr_status_t fspr_dir_open(fspr_dir_t **new, const char *dirname,
fspr_pool_t *pool)
{
/* On some platforms (e.g., Linux+GNU libc), d_name[] in struct
* dirent is declared with enough storage for the name. On other
* platforms (e.g., Solaris 8 for Intel), d_name is declared as a
* one-byte array. Note: gcc evaluates this at compile time.
*/
apr_size_t dirent_size =
fspr_size_t dirent_size =
(sizeof((*new)->entry->d_name) > 1 ?
sizeof(struct dirent) : sizeof (struct dirent) + 255);
DIR *dir = opendir(dirname);
@ -85,25 +85,25 @@ apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname,
return errno;
}
(*new) = (apr_dir_t *)apr_palloc(pool, sizeof(apr_dir_t));
(*new) = (fspr_dir_t *)fspr_palloc(pool, sizeof(fspr_dir_t));
(*new)->pool = pool;
(*new)->dirname = apr_pstrdup(pool, dirname);
(*new)->dirname = fspr_pstrdup(pool, dirname);
(*new)->dirstruct = dir;
(*new)->entry = apr_pcalloc(pool, dirent_size);
(*new)->entry = fspr_pcalloc(pool, dirent_size);
apr_pool_cleanup_register((*new)->pool, *new, dir_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*new)->pool, *new, dir_cleanup,
fspr_pool_cleanup_null);
return APR_SUCCESS;
}
apr_status_t apr_dir_close(apr_dir_t *thedir)
fspr_status_t fspr_dir_close(fspr_dir_t *thedir)
{
return apr_pool_cleanup_run(thedir->pool, thedir, dir_cleanup);
return fspr_pool_cleanup_run(thedir->pool, thedir, dir_cleanup);
}
#ifdef DIRENT_TYPE
static apr_filetype_e filetype_from_dirent_type(int type)
static fspr_filetype_e filetype_from_dirent_type(int type)
{
switch (type) {
case DT_REG:
@ -130,12 +130,12 @@ static apr_filetype_e filetype_from_dirent_type(int type)
}
#endif
apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
apr_dir_t *thedir)
fspr_status_t fspr_dir_read(fspr_finfo_t *finfo, fspr_int32_t wanted,
fspr_dir_t *thedir)
{
apr_status_t ret = 0;
fspr_status_t ret = 0;
#ifdef DIRENT_TYPE
apr_filetype_e type;
fspr_filetype_e type;
#endif
#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) \
&& !defined(READDIR_IS_THREAD_SAFE)
@ -201,12 +201,12 @@ apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
{
char fspec[APR_PATH_MAX];
int off;
apr_cpystrn(fspec, thedir->dirname, sizeof(fspec));
fspr_cpystrn(fspec, thedir->dirname, sizeof(fspec));
off = strlen(fspec);
if ((fspec[off - 1] != '/') && (off + 1 < sizeof(fspec)))
fspec[off++] = '/';
apr_cpystrn(fspec + off, thedir->entry->d_name, sizeof(fspec) - off);
ret = apr_stat(finfo, fspec, APR_FINFO_LINK | wanted, thedir->pool);
fspr_cpystrn(fspec + off, thedir->entry->d_name, sizeof(fspec) - off);
ret = fspr_stat(finfo, fspec, APR_FINFO_LINK | wanted, thedir->pool);
/* We passed a stack name that will disappear */
finfo->fname = NULL;
}
@ -234,7 +234,7 @@ apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
#endif
}
finfo->name = apr_pstrdup(thedir->pool, thedir->entry->d_name);
finfo->name = fspr_pstrdup(thedir->pool, thedir->entry->d_name);
finfo->valid |= APR_FINFO_NAME;
if (wanted)
@ -243,16 +243,16 @@ apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
return APR_SUCCESS;
}
apr_status_t apr_dir_rewind(apr_dir_t *thedir)
fspr_status_t fspr_dir_rewind(fspr_dir_t *thedir)
{
rewinddir(thedir->dirstruct);
return APR_SUCCESS;
}
apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
apr_pool_t *pool)
fspr_status_t fspr_dir_make(const char *path, fspr_fileperms_t perm,
fspr_pool_t *pool)
{
mode_t mode = apr_unix_perms2mode(perm);
mode_t mode = fspr_unix_perms2mode(perm);
if (mkdir(path, mode) == 0) {
return APR_SUCCESS;
@ -262,35 +262,35 @@ apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm,
}
}
apr_status_t apr_dir_make_recursive(const char *path, apr_fileperms_t perm,
apr_pool_t *pool)
fspr_status_t fspr_dir_make_recursive(const char *path, fspr_fileperms_t perm,
fspr_pool_t *pool)
{
apr_status_t apr_err = 0;
fspr_status_t fspr_err = 0;
apr_err = apr_dir_make (path, perm, pool); /* Try to make PATH right out */
fspr_err = fspr_dir_make (path, perm, pool); /* Try to make PATH right out */
if (apr_err == EEXIST) /* It's OK if PATH exists */
if (fspr_err == EEXIST) /* It's OK if PATH exists */
return APR_SUCCESS;
if (apr_err == ENOENT) { /* Missing an intermediate dir */
if (fspr_err == ENOENT) { /* Missing an intermediate dir */
char *dir;
dir = path_remove_last_component(path, pool);
/* If there is no path left, give up. */
if (dir[0] == '\0') {
return apr_err;
return fspr_err;
}
apr_err = apr_dir_make_recursive(dir, perm, pool);
fspr_err = fspr_dir_make_recursive(dir, perm, pool);
if (!apr_err)
apr_err = apr_dir_make (path, perm, pool);
if (!fspr_err)
fspr_err = fspr_dir_make (path, perm, pool);
}
return apr_err;
return fspr_err;
}
apr_status_t apr_dir_remove(const char *path, apr_pool_t *pool)
fspr_status_t fspr_dir_remove(const char *path, fspr_pool_t *pool)
{
if (rmdir(path) == 0) {
return APR_SUCCESS;
@ -300,7 +300,7 @@ apr_status_t apr_dir_remove(const char *path, apr_pool_t *pool)
}
}
apr_status_t apr_os_dir_get(apr_os_dir_t **thedir, apr_dir_t *dir)
fspr_status_t fspr_os_dir_get(fspr_os_dir_t **thedir, fspr_dir_t *dir)
{
if (dir == NULL) {
return APR_ENODIR;
@ -309,11 +309,11 @@ apr_status_t apr_os_dir_get(apr_os_dir_t **thedir, apr_dir_t *dir)
return APR_SUCCESS;
}
apr_status_t apr_os_dir_put(apr_dir_t **dir, apr_os_dir_t *thedir,
apr_pool_t *pool)
fspr_status_t fspr_os_dir_put(fspr_dir_t **dir, fspr_os_dir_t *thedir,
fspr_pool_t *pool)
{
if ((*dir) == NULL) {
(*dir) = (apr_dir_t *)apr_pcalloc(pool, sizeof(apr_dir_t));
(*dir) = (fspr_dir_t *)fspr_pcalloc(pool, sizeof(fspr_dir_t));
(*dir)->pool = pool;
}
(*dir)->dirstruct = thedir;

View File

@ -14,25 +14,25 @@
* limitations under the License.
*/
#include "apr_strings.h"
#include "apr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_arch_file_io.h"
/* A file to put ALL of the accessor functions for apr_file_t types. */
/* A file to put ALL of the accessor functions for fspr_file_t types. */
APR_DECLARE(apr_status_t) apr_file_name_get(const char **fname,
apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_name_get(const char **fname,
fspr_file_t *thefile)
{
*fname = thefile->fname;
return APR_SUCCESS;
}
APR_DECLARE(apr_int32_t) apr_file_flags_get(apr_file_t *f)
APR_DECLARE(fspr_int32_t) fspr_file_flags_get(fspr_file_t *f)
{
return f->flags;
}
#if !defined(OS2) && !defined(WIN32)
mode_t apr_unix_perms2mode(apr_fileperms_t perms)
mode_t fspr_unix_perms2mode(fspr_fileperms_t perms)
{
mode_t mode = 0;
@ -68,9 +68,9 @@ mode_t apr_unix_perms2mode(apr_fileperms_t perms)
return mode;
}
apr_fileperms_t apr_unix_mode2perms(mode_t mode)
fspr_fileperms_t fspr_unix_mode2perms(mode_t mode)
{
apr_fileperms_t perms = 0;
fspr_fileperms_t perms = 0;
if (mode & S_ISUID)
perms |= APR_USETID;
@ -105,15 +105,15 @@ apr_fileperms_t apr_unix_mode2perms(mode_t mode)
}
#endif
APR_DECLARE(apr_status_t) apr_file_data_get(void **data, const char *key,
apr_file_t *file)
APR_DECLARE(fspr_status_t) fspr_file_data_get(void **data, const char *key,
fspr_file_t *file)
{
return apr_pool_userdata_get(data, key, file->pool);
return fspr_pool_userdata_get(data, key, file->pool);
}
APR_DECLARE(apr_status_t) apr_file_data_set(apr_file_t *file, void *data,
APR_DECLARE(fspr_status_t) fspr_file_data_set(fspr_file_t *file, void *data,
const char *key,
apr_status_t (*cleanup)(void *))
fspr_status_t (*cleanup)(void *))
{
return apr_pool_userdata_set(data, key, cleanup, file->pool);
return fspr_pool_userdata_set(data, key, cleanup, file->pool);
}

View File

@ -14,14 +14,14 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "apr_thread_mutex.h"
#include "apr_arch_inherit.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include "fspr_thread_mutex.h"
#include "fspr_arch_inherit.h"
static apr_status_t file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p,
static fspr_status_t file_dup(fspr_file_t **new_file,
fspr_file_t *old_file, fspr_pool_t *p,
int which_dup)
{
int rv;
@ -40,12 +40,12 @@ static apr_status_t file_dup(apr_file_t **new_file,
return errno;
if (which_dup == 1) {
(*new_file) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
(*new_file) = (fspr_file_t *)fspr_pcalloc(p, sizeof(fspr_file_t));
(*new_file)->pool = p;
(*new_file)->filedes = rv;
}
(*new_file)->fname = apr_pstrdup(p, old_file->fname);
(*new_file)->fname = fspr_pstrdup(p, old_file->fname);
(*new_file)->buffered = old_file->buffered;
/* If the existing socket in a dup2 is already buffered, we
@ -54,7 +54,7 @@ static apr_status_t file_dup(apr_file_t **new_file,
*/
#if APR_HAS_THREADS
if ((*new_file)->buffered && !(*new_file)->thlock && old_file->thlock) {
apr_thread_mutex_create(&((*new_file)->thlock),
fspr_thread_mutex_create(&((*new_file)->thlock),
APR_THREAD_MUTEX_DEFAULT, p);
}
#endif
@ -62,7 +62,7 @@ static apr_status_t file_dup(apr_file_t **new_file,
* got one.
*/
if ((*new_file)->buffered && !(*new_file)->buffer) {
(*new_file)->buffer = apr_palloc(p, APR_FILE_BUFSIZE);
(*new_file)->buffer = fspr_palloc(p, APR_FILE_BUFSIZE);
}
/* this is the way dup() works */
@ -71,29 +71,29 @@ static apr_status_t file_dup(apr_file_t **new_file,
/* make sure unget behavior is consistent */
(*new_file)->ungetchar = old_file->ungetchar;
/* apr_file_dup2() retains the original cleanup, reflecting
/* fspr_file_dup2() retains the original cleanup, reflecting
* the existing inherit and nocleanup flags. This means,
* that apr_file_dup2() cannot be called against an apr_file_t
* already closed with apr_file_close, because the expected
* that fspr_file_dup2() cannot be called against an fspr_file_t
* already closed with fspr_file_close, because the expected
* cleanup was already killed.
*/
if (which_dup == 2) {
return APR_SUCCESS;
}
/* apr_file_dup() retains all old_file flags with the exceptions
/* fspr_file_dup() retains all old_file flags with the exceptions
* of APR_INHERIT and APR_FILE_NOCLEANUP.
* The user must call apr_file_inherit_set() on the dupped
* apr_file_t when desired.
* The user must call fspr_file_inherit_set() on the dupped
* fspr_file_t when desired.
*/
(*new_file)->flags = old_file->flags
& ~(APR_INHERIT | APR_FILE_NOCLEANUP);
apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file),
apr_unix_file_cleanup,
apr_unix_file_cleanup);
fspr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file),
fspr_unix_file_cleanup,
fspr_unix_file_cleanup);
#ifndef WAITIO_USES_POLL
/* Start out with no pollset. apr_wait_for_io_or_timeout() will
/* Start out with no pollset. fspr_wait_for_io_or_timeout() will
* initialize the pollset if needed.
*/
(*new_file)->pollset = NULL;
@ -101,27 +101,27 @@ static apr_status_t file_dup(apr_file_t **new_file,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_dup(fspr_file_t **new_file,
fspr_file_t *old_file, fspr_pool_t *p)
{
return file_dup(new_file, old_file, p, 1);
}
APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
apr_file_t *old_file, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_dup2(fspr_file_t *new_file,
fspr_file_t *old_file, fspr_pool_t *p)
{
return file_dup(&new_file, old_file, p, 2);
}
APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
apr_file_t *old_file,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_setaside(fspr_file_t **new_file,
fspr_file_t *old_file,
fspr_pool_t *p)
{
*new_file = (apr_file_t *)apr_palloc(p, sizeof(apr_file_t));
memcpy(*new_file, old_file, sizeof(apr_file_t));
*new_file = (fspr_file_t *)fspr_palloc(p, sizeof(fspr_file_t));
memcpy(*new_file, old_file, sizeof(fspr_file_t));
(*new_file)->pool = p;
if (old_file->buffered) {
(*new_file)->buffer = apr_palloc(p, APR_FILE_BUFSIZE);
(*new_file)->buffer = fspr_palloc(p, APR_FILE_BUFSIZE);
if (old_file->direction == 1) {
memcpy((*new_file)->buffer, old_file->buffer, old_file->bufpos);
}
@ -130,26 +130,26 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
}
#if APR_HAS_THREADS
if (old_file->thlock) {
apr_thread_mutex_create(&((*new_file)->thlock),
fspr_thread_mutex_create(&((*new_file)->thlock),
APR_THREAD_MUTEX_DEFAULT, p);
apr_thread_mutex_destroy(old_file->thlock);
fspr_thread_mutex_destroy(old_file->thlock);
}
#endif /* APR_HAS_THREADS */
}
if (old_file->fname) {
(*new_file)->fname = apr_pstrdup(p, old_file->fname);
(*new_file)->fname = fspr_pstrdup(p, old_file->fname);
}
if (!(old_file->flags & APR_FILE_NOCLEANUP)) {
apr_pool_cleanup_register(p, (void *)(*new_file),
apr_unix_file_cleanup,
fspr_pool_cleanup_register(p, (void *)(*new_file),
fspr_unix_file_cleanup,
((*new_file)->flags & APR_INHERIT)
? apr_pool_cleanup_null
: apr_unix_file_cleanup);
? fspr_pool_cleanup_null
: fspr_unix_file_cleanup);
}
old_file->filedes = -1;
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
apr_unix_file_cleanup);
fspr_pool_cleanup_kill(old_file->pool, (void *)old_file,
fspr_unix_file_cleanup);
#ifndef WAITIO_USES_POLL
(*new_file)->pollset = NULL;
#endif

View File

@ -14,13 +14,13 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_private.h"
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_strings.h"
#include "fspr.h"
#include "fspr_private.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_strings.h"
#define APR_WANT_STRFUNC
#include "apr_want.h"
#include "fspr_want.h"
#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
@ -34,8 +34,8 @@
/* Any OS that requires/refuses trailing slashes should be dealt with here.
*/
APR_DECLARE(apr_status_t) apr_filepath_get(char **defpath, apr_int32_t flags,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_get(char **defpath, fspr_int32_t flags,
fspr_pool_t *p)
{
char path[APR_PATH_MAX];
@ -45,7 +45,7 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **defpath, apr_int32_t flags,
else
return errno;
}
*defpath = apr_pstrdup(p, path);
*defpath = fspr_pstrdup(p, path);
return APR_SUCCESS;
}
@ -53,7 +53,7 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **defpath, apr_int32_t flags,
/* Any OS that requires/refuses trailing slashes should be dealt with here
*/
APR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_set(const char *path, fspr_pool_t *p)
{
if (chdir(path) != 0)
return errno;
@ -61,13 +61,13 @@ APR_DECLARE(apr_status_t) apr_filepath_set(const char *path, apr_pool_t *p)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
APR_DECLARE(fspr_status_t) fspr_filepath_root(const char **rootpath,
const char **inpath,
apr_int32_t flags,
apr_pool_t *p)
fspr_int32_t flags,
fspr_pool_t *p)
{
if (**inpath == '/') {
*rootpath = apr_pstrdup(p, "/");
*rootpath = fspr_pstrdup(p, "/");
do {
++(*inpath);
} while (**inpath == '/');
@ -78,19 +78,19 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
return APR_ERELATIVE;
}
APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
APR_DECLARE(fspr_status_t) fspr_filepath_merge(char **newpath,
const char *rootpath,
const char *addpath,
apr_int32_t flags,
apr_pool_t *p)
fspr_int32_t flags,
fspr_pool_t *p)
{
char *path;
apr_size_t rootlen; /* is the length of the src rootpath */
apr_size_t maxlen; /* maximum total path length */
apr_size_t keptlen; /* is the length of the retained rootpath */
apr_size_t pathlen; /* is the length of the result path */
apr_size_t seglen; /* is the end of the current segment */
apr_status_t rv;
fspr_size_t rootlen; /* is the length of the src rootpath */
fspr_size_t maxlen; /* maximum total path length */
fspr_size_t keptlen; /* is the length of the retained rootpath */
fspr_size_t pathlen; /* is the length of the result path */
fspr_size_t seglen; /* is the end of the current segment */
fspr_status_t rv;
/* Treat null as an empty path.
*/
@ -134,7 +134,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
* passing the address of a char const* for a char** arg.
*/
char *getpath = NULL;
rv = apr_filepath_get(&getpath, flags, p);
rv = fspr_filepath_get(&getpath, flags, p);
rootpath = getpath;
if (rv != APR_SUCCESS)
return errno;
@ -144,7 +144,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
/* XXX: Any kernel subject to goofy, uncanonical results
* must run the rootpath against the user's given flags.
* Simplest would be a recursive call to apr_filepath_merge
* Simplest would be a recursive call to fspr_filepath_merge
* with an empty (not null) rootpath and addpath of the cwd.
*/
}
@ -156,7 +156,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
if (maxlen > APR_PATH_MAX) {
return APR_ENAMETOOLONG;
}
path = (char *)apr_palloc(p, maxlen);
path = (char *)fspr_palloc(p, maxlen);
if (addpath[0] == '/') {
/* Ignore the given root path, strip off leading
@ -292,21 +292,21 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_filepath_list_split(apr_array_header_t **pathelts,
APR_DECLARE(fspr_status_t) fspr_filepath_list_split(fspr_array_header_t **pathelts,
const char *liststr,
apr_pool_t *p)
fspr_pool_t *p)
{
return apr_filepath_list_split_impl(pathelts, liststr, ':', p);
return fspr_filepath_list_split_impl(pathelts, liststr, ':', p);
}
APR_DECLARE(apr_status_t) apr_filepath_list_merge(char **liststr,
apr_array_header_t *pathelts,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_list_merge(char **liststr,
fspr_array_header_t *pathelts,
fspr_pool_t *p)
{
return apr_filepath_list_merge_impl(liststr, pathelts, ':', p);
return fspr_filepath_list_merge_impl(liststr, pathelts, ':', p);
}
APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_encoding(int *style, fspr_pool_t *p)
{
*style = APR_FILEPATH_ENCODING_LOCALE;
return APR_SUCCESS;

View File

@ -17,29 +17,29 @@
#define APR_WANT_STRFUNC
#define APR_WANT_MEMFUNC
#include "apr_want.h"
#include "fspr_want.h"
#include "apr_errno.h"
#include "apr_pools.h"
#include "apr_strings.h"
#include "apr_tables.h"
#include "fspr_errno.h"
#include "fspr_pools.h"
#include "fspr_strings.h"
#include "fspr_tables.h"
#include "apr_private.h"
#include "fspr_private.h"
apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,
fspr_status_t fspr_filepath_list_split_impl(fspr_array_header_t **pathelts,
const char *liststr,
char separator,
apr_pool_t *p)
fspr_pool_t *p)
{
char *path, *part, *ptr;
char separator_string[2] = { '\0', '\0' };
apr_array_header_t *elts;
fspr_array_header_t *elts;
int nelts;
separator_string[0] = separator;
/* Count the number of path elements. We know there'll be at least
one even if path is an empty string. */
path = apr_pstrdup(p, liststr);
path = fspr_pstrdup(p, liststr);
for (nelts = 0, ptr = path; ptr != NULL; ++nelts)
{
ptr = strchr(ptr, separator);
@ -48,14 +48,14 @@ apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,
}
/* Split the path into the array. */
elts = apr_array_make(p, nelts, sizeof(char*));
while ((part = apr_strtok(path, separator_string, &ptr)) != NULL)
elts = fspr_array_make(p, nelts, sizeof(char*));
while ((part = fspr_strtok(path, separator_string, &ptr)) != NULL)
{
if (*part == '\0') /* Ignore empty path components. */
continue;
*(char**)apr_array_push(elts) = part;
path = NULL; /* For the next call to apr_strtok */
*(char**)fspr_array_push(elts) = part;
path = NULL; /* For the next call to fspr_strtok */
}
*pathelts = elts;
@ -63,12 +63,12 @@ apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,
}
apr_status_t apr_filepath_list_merge_impl(char **liststr,
apr_array_header_t *pathelts,
fspr_status_t fspr_filepath_list_merge_impl(char **liststr,
fspr_array_header_t *pathelts,
char separator,
apr_pool_t *p)
fspr_pool_t *p)
{
apr_size_t path_size = 0;
fspr_size_t path_size = 0;
char *path;
int i;
@ -91,13 +91,13 @@ apr_status_t apr_filepath_list_merge_impl(char **liststr,
path_size += (i - 1);
/* Merge the path components */
path = *liststr = apr_palloc(p, path_size + 1);
path = *liststr = fspr_palloc(p, path_size + 1);
for (i = 0; i < pathelts->nelts; ++i)
{
/* ### Hmmmm. Calling strlen twice on the same string. Yuck.
But is is better than reallocation in apr_pstrcat? */
But is is better than reallocation in fspr_pstrcat? */
const char *part = ((char**)pathelts->elts)[i];
apr_size_t part_size = strlen(part);
fspr_size_t part_size = strlen(part);
if (part_size == 0) /* Ignore empty path components. */
continue;

View File

@ -14,19 +14,19 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_errno.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_strings.h"
#include "fspr_errno.h"
#ifdef HAVE_UTIME
#include <utime.h>
#endif
static apr_filetype_e filetype_from_mode(mode_t mode)
static fspr_filetype_e filetype_from_mode(mode_t mode)
{
apr_filetype_e type;
fspr_filetype_e type;
switch (mode & S_IFMT) {
case S_IFREG:
@ -67,12 +67,12 @@ static apr_filetype_e filetype_from_mode(mode_t mode)
return type;
}
static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info,
apr_int32_t wanted)
static void fill_out_finfo(fspr_finfo_t *finfo, struct_stat *info,
fspr_int32_t wanted)
{
finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
| APR_FINFO_OWNER | APR_FINFO_PROT;
finfo->protection = apr_unix_mode2perms(info->st_mode);
finfo->protection = fspr_unix_mode2perms(info->st_mode);
finfo->filetype = filetype_from_mode(info->st_mode);
finfo->user = info->st_uid;
finfo->group = info->st_gid;
@ -80,9 +80,9 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info,
finfo->inode = info->st_ino;
finfo->device = info->st_dev;
finfo->nlink = info->st_nlink;
apr_time_ansi_put(&finfo->atime, info->st_atime);
apr_time_ansi_put(&finfo->mtime, info->st_mtime);
apr_time_ansi_put(&finfo->ctime, info->st_ctime);
fspr_time_ansi_put(&finfo->atime, info->st_atime);
fspr_time_ansi_put(&finfo->mtime, info->st_mtime);
fspr_time_ansi_put(&finfo->ctime, info->st_ctime);
/* ### needs to be revisited
* if (wanted & APR_FINFO_CSIZE) {
* finfo->csize = info->st_blocks * 512;
@ -91,14 +91,14 @@ static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info,
*/
}
APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
apr_int32_t wanted,
apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_info_get(fspr_finfo_t *finfo,
fspr_int32_t wanted,
fspr_file_t *thefile)
{
struct_stat info;
if (thefile->buffered) {
apr_status_t rv = apr_file_flush(thefile);
fspr_status_t rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS)
return rv;
}
@ -114,30 +114,30 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo,
}
}
APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
APR_DECLARE(fspr_status_t) fspr_file_perms_set(const char *fname,
fspr_fileperms_t perms)
{
mode_t mode = apr_unix_perms2mode(perms);
mode_t mode = fspr_unix_perms2mode(perms);
if (chmod(fname, mode) == -1)
return errno;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
apr_fileattrs_t attributes,
apr_fileattrs_t attr_mask,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_attrs_set(const char *fname,
fspr_fileattrs_t attributes,
fspr_fileattrs_t attr_mask,
fspr_pool_t *pool)
{
apr_status_t status;
apr_finfo_t finfo = {0};
fspr_status_t status;
fspr_finfo_t finfo = {0};
/* Don't do anything if we can't handle the requested attributes */
if (!(attr_mask & (APR_FILE_ATTR_READONLY
| APR_FILE_ATTR_EXECUTABLE)))
return APR_SUCCESS;
status = apr_stat(&finfo, fname, APR_FINFO_PROT, pool);
status = fspr_stat(&finfo, fname, APR_FINFO_PROT, pool);
if (status)
return status;
@ -176,18 +176,18 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
}
}
return apr_file_perms_set(fname, finfo.protection);
return fspr_file_perms_set(fname, finfo.protection);
}
APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
apr_time_t mtime,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_mtime_set(const char *fname,
fspr_time_t mtime,
fspr_pool_t *pool)
{
apr_status_t status;
apr_finfo_t finfo = {0};
fspr_status_t status;
fspr_finfo_t finfo = {0};
status = apr_stat(&finfo, fname, APR_FINFO_ATIME, pool);
status = fspr_stat(&finfo, fname, APR_FINFO_ATIME, pool);
if (status) {
return status;
}
@ -196,10 +196,10 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
{
struct timeval tvp[2];
tvp[0].tv_sec = apr_time_sec(finfo.atime);
tvp[0].tv_usec = apr_time_usec(finfo.atime);
tvp[1].tv_sec = apr_time_sec(mtime);
tvp[1].tv_usec = apr_time_usec(mtime);
tvp[0].tv_sec = fspr_time_sec(finfo.atime);
tvp[0].tv_usec = fspr_time_usec(finfo.atime);
tvp[1].tv_sec = fspr_time_sec(mtime);
tvp[1].tv_usec = fspr_time_usec(mtime);
if (utimes(fname, tvp) == -1) {
return errno;
@ -224,9 +224,9 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
}
APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo,
APR_DECLARE(fspr_status_t) fspr_stat(fspr_finfo_t *finfo,
const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
fspr_int32_t wanted, fspr_pool_t *pool)
{
struct_stat info;
int srv;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "fspr_arch_file_io.h"
#if APR_HAVE_FCNTL_H
#include <fcntl.h>
@ -23,7 +23,7 @@
#include <sys/file.h>
#endif
APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
APR_DECLARE(fspr_status_t) fspr_file_lock(fspr_file_t *thefile, int type)
{
int rc;
@ -82,7 +82,7 @@ APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_unlock(fspr_file_t *thefile)
{
int rc;

View File

@ -14,20 +14,20 @@
* limitations under the License.
*/
#include "apr_file_io.h"
#include "fspr_file_io.h"
APR_DECLARE(apr_status_t) apr_file_read_full(apr_file_t *thefile, void *buf,
apr_size_t nbytes,
apr_size_t *bytes_read)
APR_DECLARE(fspr_status_t) fspr_file_read_full(fspr_file_t *thefile, void *buf,
fspr_size_t nbytes,
fspr_size_t *bytes_read)
{
apr_status_t status;
apr_size_t total_read = 0;
fspr_status_t status;
fspr_size_t total_read = 0;
do {
apr_size_t amt = nbytes;
fspr_size_t amt = nbytes;
status = apr_file_read(thefile, buf, &amt);
status = fspr_file_read(thefile, buf, &amt);
buf = (char *)buf + amt;
nbytes -= amt;
total_read += amt;
@ -39,18 +39,18 @@ APR_DECLARE(apr_status_t) apr_file_read_full(apr_file_t *thefile, void *buf,
return status;
}
APR_DECLARE(apr_status_t) apr_file_write_full(apr_file_t *thefile,
APR_DECLARE(fspr_status_t) fspr_file_write_full(fspr_file_t *thefile,
const void *buf,
apr_size_t nbytes,
apr_size_t *bytes_written)
fspr_size_t nbytes,
fspr_size_t *bytes_written)
{
apr_status_t status;
apr_size_t total_written = 0;
fspr_status_t status;
fspr_size_t total_written = 0;
do {
apr_size_t amt = nbytes;
fspr_size_t amt = nbytes;
status = apr_file_write(thefile, buf, &amt);
status = fspr_file_write(thefile, buf, &amt);
buf = (char *)buf + amt;
nbytes -= amt;
total_written += amt;
@ -62,18 +62,18 @@ APR_DECLARE(apr_status_t) apr_file_write_full(apr_file_t *thefile,
return status;
}
APR_DECLARE(apr_status_t) apr_file_writev_full(apr_file_t *thefile,
APR_DECLARE(fspr_status_t) fspr_file_writev_full(fspr_file_t *thefile,
const struct iovec *vec,
apr_size_t nvec,
apr_size_t *bytes_written)
fspr_size_t nvec,
fspr_size_t *bytes_written)
{
apr_status_t rv = APR_SUCCESS;
apr_size_t i;
apr_size_t amt = 0;
apr_size_t total = 0;
fspr_status_t rv = APR_SUCCESS;
fspr_size_t i;
fspr_size_t amt = 0;
fspr_size_t total = 0;
for (i = 0; i < nvec && rv == APR_SUCCESS; i++) {
rv = apr_file_write_full(thefile, vec[i].iov_base,
rv = fspr_file_write_full(thefile, vec[i].iov_base,
vec[i].iov_len, &amt);
total += amt;
}

View File

@ -46,11 +46,11 @@
* SUCH DAMAGE.
*/
#include "apr_private.h"
#include "apr_file_io.h" /* prototype of apr_mkstemp() */
#include "apr_strings.h" /* prototype of apr_mkstemp() */
#include "apr_arch_file_io.h" /* prototype of apr_mkstemp() */
#include "apr_portable.h" /* for apr_os_file_put() */
#include "fspr_private.h"
#include "fspr_file_io.h" /* prototype of fspr_mkstemp() */
#include "fspr_strings.h" /* prototype of fspr_mkstemp() */
#include "fspr_arch_file_io.h" /* prototype of fspr_mkstemp() */
#include "fspr_portable.h" /* for fspr_os_file_put() */
#ifndef HAVE_MKSTEMP
@ -89,18 +89,18 @@
static const unsigned char padchar[] =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
static apr_uint32_t randseed=0;
static fspr_uint32_t randseed=0;
static int gettemp(char *path, apr_file_t **doopen, apr_int32_t flags, apr_pool_t *p)
static int gettemp(char *path, fspr_file_t **doopen, fspr_int32_t flags, fspr_pool_t *p)
{
register char *start, *trv, *suffp;
char *pad;
apr_finfo_t sbuf;
apr_status_t rv;
apr_uint32_t randnum;
fspr_finfo_t sbuf;
fspr_status_t rv;
fspr_uint32_t randnum;
if (randseed==0) {
randseed = (int)apr_time_now();
randseed = (int)fspr_time_now();
seedrandom(randseed);
}
@ -127,7 +127,7 @@ static int gettemp(char *path, apr_file_t **doopen, apr_int32_t flags, apr_pool_
break;
if (*trv == '/') {
*trv = '\0';
rv = apr_stat(&sbuf, path, APR_FINFO_TYPE, p);
rv = fspr_stat(&sbuf, path, APR_FINFO_TYPE, p);
*trv = '/';
if (rv != APR_SUCCESS)
return rv;
@ -139,7 +139,7 @@ static int gettemp(char *path, apr_file_t **doopen, apr_int32_t flags, apr_pool_
}
for (;;) {
if ((rv = apr_file_open(doopen, path, flags,
if ((rv = fspr_file_open(doopen, path, flags,
APR_UREAD | APR_UWRITE, p)) == APR_SUCCESS)
return APR_SUCCESS;
if (!APR_STATUS_IS_EEXIST(rv))
@ -172,7 +172,7 @@ static int gettemp(char *path, apr_file_t **doopen, apr_int32_t flags, apr_pool_
#endif
#endif /* !defined(HAVE_MKSTEMP) */
APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_int32_t flags, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_mktemp(fspr_file_t **fp, char *template, fspr_int32_t flags, fspr_pool_t *p)
{
#ifdef HAVE_MKSTEMP
int fd;
@ -197,13 +197,13 @@ APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_i
*
* We either have to unset the flags, or fix up the fd and other
* xthread and inherit bits appropriately. Since gettemp() above
* calls apr_file_open, our flags are respected in that code path.
* calls fspr_file_open, our flags are respected in that code path.
*/
apr_os_file_put(fp, &fd, flags, p);
(*fp)->fname = apr_pstrdup(p, template);
fspr_os_file_put(fp, &fd, flags, p);
(*fp)->fname = fspr_pstrdup(p, template);
apr_pool_cleanup_register((*fp)->pool, (void *)(*fp),
apr_unix_file_cleanup, apr_unix_file_cleanup);
fspr_pool_cleanup_register((*fp)->pool, (void *)(*fp),
fspr_unix_file_cleanup, fspr_unix_file_cleanup);
#endif
return APR_SUCCESS;
}

View File

@ -14,25 +14,25 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "apr_thread_mutex.h"
#include "apr_arch_inherit.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include "fspr_thread_mutex.h"
#include "fspr_arch_inherit.h"
#ifdef NETWARE
#include "nks/dirio.h"
#include "apr_hash.h"
#include "fspr_hash.h"
#include "fsio.h"
#endif
apr_status_t apr_unix_file_cleanup(void *thefile)
fspr_status_t fspr_unix_file_cleanup(void *thefile)
{
apr_file_t *file = thefile;
apr_status_t flush_rv = APR_SUCCESS, rv = APR_SUCCESS;
fspr_file_t *file = thefile;
fspr_status_t flush_rv = APR_SUCCESS, rv = APR_SUCCESS;
if (file->buffered) {
flush_rv = apr_file_flush(file);
flush_rv = fspr_file_flush(file);
}
if (close(file->filedes) == 0) {
file->filedes = -1;
@ -41,7 +41,7 @@ apr_status_t apr_unix_file_cleanup(void *thefile)
}
#if APR_HAS_THREADS
if (file->thlock) {
rv = apr_thread_mutex_destroy(file->thlock);
rv = fspr_thread_mutex_destroy(file->thlock);
}
#endif
}
@ -51,9 +51,9 @@ apr_status_t apr_unix_file_cleanup(void *thefile)
}
#ifndef WAITIO_USES_POLL
if (file->pollset != NULL) {
int pollset_rv = apr_pollset_destroy(file->pollset);
int pollset_rv = fspr_pollset_destroy(file->pollset);
/* If the file close failed, return its error value,
* not apr_pollset_destroy()'s.
* not fspr_pollset_destroy()'s.
*/
if (rv == APR_SUCCESS) {
rv = pollset_rv;
@ -63,17 +63,17 @@ apr_status_t apr_unix_file_cleanup(void *thefile)
return rv != APR_SUCCESS ? rv : flush_rv;
}
APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
APR_DECLARE(fspr_status_t) fspr_file_open(fspr_file_t **new,
const char *fname,
apr_int32_t flag,
apr_fileperms_t perm,
apr_pool_t *pool)
fspr_int32_t flag,
fspr_fileperms_t perm,
fspr_pool_t *pool)
{
apr_os_file_t fd;
fspr_os_file_t fd;
int oflags = 0;
#if APR_HAS_THREADS
apr_thread_mutex_t *thlock;
apr_status_t rv;
fspr_thread_mutex_t *thlock;
fspr_status_t rv;
#endif
if ((flag & APR_READ) && (flag & APR_WRITE)) {
@ -121,7 +121,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
#if APR_HAS_THREADS
if ((flag & APR_BUFFERED) && (flag & APR_XTHREAD)) {
rv = apr_thread_mutex_create(&thlock,
rv = fspr_thread_mutex_create(&thlock,
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
return rv;
@ -133,24 +133,24 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
fd = open(fname, oflags, 0666);
}
else {
fd = open(fname, oflags, apr_unix_perms2mode(perm));
fd = open(fname, oflags, fspr_unix_perms2mode(perm));
}
if (fd < 0) {
return errno;
}
(*new) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*new) = (fspr_file_t *)fspr_pcalloc(pool, sizeof(fspr_file_t));
(*new)->pool = pool;
(*new)->flags = flag;
(*new)->filedes = fd;
(*new)->fname = apr_pstrdup(pool, fname);
(*new)->fname = fspr_pstrdup(pool, fname);
(*new)->blocking = BLK_ON;
(*new)->buffered = (flag & APR_BUFFERED) > 0;
if ((*new)->buffered) {
(*new)->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
(*new)->buffer = fspr_palloc(pool, APR_FILE_BUFSIZE);
#if APR_HAS_THREADS
if ((*new)->flags & APR_XTHREAD) {
(*new)->thlock = thlock;
@ -170,25 +170,25 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new,
(*new)->dataRead = 0;
(*new)->direction = 0;
#ifndef WAITIO_USES_POLL
/* Start out with no pollset. apr_wait_for_io_or_timeout() will
/* Start out with no pollset. fspr_wait_for_io_or_timeout() will
* initialize the pollset if needed.
*/
(*new)->pollset = NULL;
#endif
if (!(flag & APR_FILE_NOCLEANUP)) {
apr_pool_cleanup_register((*new)->pool, (void *)(*new),
apr_unix_file_cleanup,
apr_unix_file_cleanup);
fspr_pool_cleanup_register((*new)->pool, (void *)(*new),
fspr_unix_file_cleanup,
fspr_unix_file_cleanup);
}
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
APR_DECLARE(fspr_status_t) fspr_file_close(fspr_file_t *file)
{
return apr_pool_cleanup_run(file->pool, file, apr_unix_file_cleanup);
return fspr_pool_cleanup_run(file->pool, file, fspr_unix_file_cleanup);
}
APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_remove(const char *path, fspr_pool_t *pool)
{
if (unlink(path) == 0) {
return APR_SUCCESS;
@ -198,9 +198,9 @@ APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
}
}
APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
APR_DECLARE(fspr_status_t) fspr_file_rename(const char *from_path,
const char *to_path,
apr_pool_t *p)
fspr_pool_t *p)
{
if (rename(from_path, to_path) != 0) {
return errno;
@ -208,20 +208,20 @@ APR_DECLARE(apr_status_t) apr_file_rename(const char *from_path,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
apr_file_t *file)
APR_DECLARE(fspr_status_t) fspr_os_file_get(fspr_os_file_t *thefile,
fspr_file_t *file)
{
*thefile = file->filedes;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_int32_t flags, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_file_put(fspr_file_t **file,
fspr_os_file_t *thefile,
fspr_int32_t flags, fspr_pool_t *pool)
{
int *dafile = thefile;
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file) = fspr_pcalloc(pool, sizeof(fspr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
(*file)->blocking = BLK_UNKNOWN; /* in case it is a pipe */
@ -232,18 +232,18 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
(*file)->buffered = (flags & APR_BUFFERED) > 0;
#ifndef WAITIO_USES_POLL
/* Start out with no pollset. apr_wait_for_io_or_timeout() will
/* Start out with no pollset. fspr_wait_for_io_or_timeout() will
* initialize the pollset if needed.
*/
(*file)->pollset = NULL;
#endif
if ((*file)->buffered) {
(*file)->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
(*file)->buffer = fspr_palloc(pool, APR_FILE_BUFSIZE);
#if APR_HAS_THREADS
if ((*file)->flags & APR_XTHREAD) {
apr_status_t rv;
rv = apr_thread_mutex_create(&((*file)->thlock),
fspr_status_t rv;
rv = fspr_thread_mutex_create(&((*file)->thlock),
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
return rv;
@ -254,7 +254,7 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
APR_DECLARE(fspr_status_t) fspr_file_eof(fspr_file_t *fptr)
{
if (fptr->eof_hit == 1) {
return APR_EOF;
@ -262,32 +262,32 @@ APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stderr(fspr_file_t **thefile,
fspr_pool_t *pool)
{
int fd = STDERR_FILENO;
return apr_os_file_put(thefile, &fd, 0, pool);
return fspr_os_file_put(thefile, &fd, 0, pool);
}
APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stdout(fspr_file_t **thefile,
fspr_pool_t *pool)
{
int fd = STDOUT_FILENO;
return apr_os_file_put(thefile, &fd, 0, pool);
return fspr_os_file_put(thefile, &fd, 0, pool);
}
APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stdin(fspr_file_t **thefile,
fspr_pool_t *pool)
{
int fd = STDIN_FILENO;
return apr_os_file_put(thefile, &fd, 0, pool);
return fspr_os_file_put(thefile, &fd, 0, pool);
}
APR_IMPLEMENT_INHERIT_SET(file, flags, pool, apr_unix_file_cleanup)
APR_IMPLEMENT_INHERIT_SET(file, flags, pool, fspr_unix_file_cleanup)
APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, apr_unix_file_cleanup)
APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, fspr_unix_file_cleanup)
APR_POOL_IMPLEMENT_ACCESSOR(file)

View File

@ -14,11 +14,11 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include "apr_arch_inherit.h"
#include "fspr_arch_inherit.h"
/* Figure out how to get pipe block/nonblock on BeOS...
* Basically, BONE7 changed things again so that ioctl didn't work,
@ -33,7 +33,7 @@
#endif
#endif
static apr_status_t pipeblock(apr_file_t *thepipe)
static fspr_status_t pipeblock(fspr_file_t *thepipe)
{
#if !BEOS_BLOCKING
int fd_flags;
@ -69,7 +69,7 @@ static apr_status_t pipeblock(apr_file_t *thepipe)
return APR_SUCCESS;
}
static apr_status_t pipenonblock(apr_file_t *thepipe)
static fspr_status_t pipenonblock(fspr_file_t *thepipe)
{
#if !BEOS_BLOCKING
int fd_flags = fcntl(thepipe->filedes, F_GETFL, 0);
@ -105,7 +105,7 @@ static apr_status_t pipenonblock(apr_file_t *thepipe)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_set(fspr_file_t *thepipe, fspr_interval_time_t timeout)
{
if (thepipe->is_pipe == 1) {
thepipe->timeout = timeout;
@ -124,7 +124,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_int
return APR_EINVAL;
}
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_get(fspr_file_t *thepipe, fspr_interval_time_t *timeout)
{
if (thepipe->is_pipe == 1) {
*timeout = thepipe->timeout;
@ -133,14 +133,14 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_int
return APR_EINVAL;
}
APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
apr_os_file_t *thefile,
APR_DECLARE(fspr_status_t) fspr_os_pipe_put_ex(fspr_file_t **file,
fspr_os_file_t *thefile,
int register_cleanup,
apr_pool_t *pool)
fspr_pool_t *pool)
{
int *dafile = thefile;
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file) = fspr_pcalloc(pool, sizeof(fspr_file_t));
(*file)->pool = pool;
(*file)->eof_hit = 0;
(*file)->is_pipe = 1;
@ -156,12 +156,12 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
(*file)->thlock = NULL;
#endif
if (register_cleanup) {
apr_pool_cleanup_register((*file)->pool, (void *)(*file),
apr_unix_file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*file)->pool, (void *)(*file),
fspr_unix_file_cleanup,
fspr_pool_cleanup_null);
}
#ifndef WAITIO_USES_POLL
/* Start out with no pollset. apr_wait_for_io_or_timeout() will
/* Start out with no pollset. fspr_wait_for_io_or_timeout() will
* initialize the pollset if needed.
*/
(*file)->pollset = NULL;
@ -169,14 +169,14 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_pipe_put(fspr_file_t **file,
fspr_os_file_t *thefile,
fspr_pool_t *pool)
{
return apr_os_pipe_put_ex(file, thefile, 0, pool);
return fspr_os_pipe_put_ex(file, thefile, 0, pool);
}
APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_pipe_create(fspr_file_t **in, fspr_file_t **out, fspr_pool_t *pool)
{
int filedes[2];
@ -184,7 +184,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
return errno;
}
(*in) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*in) = (fspr_file_t *)fspr_pcalloc(pool, sizeof(fspr_file_t));
(*in)->pool = pool;
(*in)->filedes = filedes[0];
(*in)->is_pipe = 1;
@ -200,7 +200,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
#ifndef WAITIO_USES_POLL
(*in)->pollset = NULL;
#endif
(*out) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*out) = (fspr_file_t *)fspr_pcalloc(pool, sizeof(fspr_file_t));
(*out)->pool = pool;
(*out)->filedes = filedes[1];
(*out)->is_pipe = 1;
@ -215,17 +215,17 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
#ifndef WAITIO_USES_POLL
(*out)->pollset = NULL;
#endif
apr_pool_cleanup_register((*in)->pool, (void *)(*in), apr_unix_file_cleanup,
apr_pool_cleanup_null);
apr_pool_cleanup_register((*out)->pool, (void *)(*out), apr_unix_file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*in)->pool, (void *)(*in), fspr_unix_file_cleanup,
fspr_pool_cleanup_null);
fspr_pool_cleanup_register((*out)->pool, (void *)(*out), fspr_unix_file_cleanup,
fspr_pool_cleanup_null);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_namedpipe_create(const char *filename,
fspr_fileperms_t perm, fspr_pool_t *pool)
{
mode_t mode = apr_unix_perms2mode(perm);
mode_t mode = fspr_unix_perms2mode(perm);
if (mkfifo(filename, mode) == -1) {
return errno;

View File

@ -14,10 +14,10 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_thread_mutex.h"
#include "apr_support.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_thread_mutex.h"
#include "fspr_support.h"
/* The only case where we don't use wait_for_io_or_timeout is on
* pre-BONE BeOS, so this check should be sufficient and simpler */
@ -25,10 +25,10 @@
#define USE_WAIT_FOR_IO
#endif
APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
APR_DECLARE(fspr_status_t) fspr_file_read(fspr_file_t *thefile, void *buf, fspr_size_t *nbytes)
{
apr_ssize_t rv;
apr_size_t bytes_read;
fspr_ssize_t rv;
fspr_size_t bytes_read;
if (*nbytes <= 0) {
*nbytes = 0;
@ -37,21 +37,21 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
if (thefile->buffered) {
char *pos = (char *)buf;
apr_uint64_t blocksize;
apr_uint64_t size = *nbytes;
fspr_uint64_t blocksize;
fspr_uint64_t size = *nbytes;
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_lock(thefile->thlock);
fspr_thread_mutex_lock(thefile->thlock);
}
#endif
if (thefile->direction == 1) {
rv = apr_file_flush(thefile);
rv = fspr_file_flush(thefile);
if (rv) {
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_unlock(thefile->thlock);
fspr_thread_mutex_unlock(thefile->thlock);
}
#endif
return rv;
@ -98,7 +98,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
}
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_unlock(thefile->thlock);
fspr_thread_mutex_unlock(thefile->thlock);
}
#endif
return rv;
@ -124,7 +124,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
if (rv == -1 &&
(errno == EAGAIN || errno == EWOULDBLOCK) &&
thefile->timeout != 0) {
apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 1);
fspr_status_t arv = fspr_wait_for_io_or_timeout(thefile, NULL, 1);
if (arv != APR_SUCCESS) {
*nbytes = bytes_read;
return arv;
@ -149,9 +149,9 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
}
}
APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
APR_DECLARE(fspr_status_t) fspr_file_write(fspr_file_t *thefile, const void *buf, fspr_size_t *nbytes)
{
apr_size_t rv;
fspr_size_t rv;
if (thefile->buffered) {
char *pos = (char *)buf;
@ -160,7 +160,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_lock(thefile->thlock);
fspr_thread_mutex_lock(thefile->thlock);
}
#endif
@ -168,7 +168,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
/* Position file pointer for writing at the offset we are
* logically reading from
*/
apr_int64_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
fspr_int64_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
if (offset != thefile->filePtr)
lseek(thefile->filedes, offset, SEEK_SET);
thefile->bufpos = thefile->dataRead = 0;
@ -178,7 +178,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
rv = 0;
while (rv == 0 && size > 0) {
if (thefile->bufpos == APR_FILE_BUFSIZE) /* write buffer is full*/
rv = apr_file_flush(thefile);
rv = fspr_file_flush(thefile);
blocksize = size > APR_FILE_BUFSIZE - thefile->bufpos ?
APR_FILE_BUFSIZE - thefile->bufpos : size;
@ -190,7 +190,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_unlock(thefile->thlock);
fspr_thread_mutex_unlock(thefile->thlock);
}
#endif
return rv;
@ -198,12 +198,12 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
else {
do {
rv = write(thefile->filedes, buf, *nbytes);
} while (rv == (apr_size_t)-1 && errno == EINTR);
} while (rv == (fspr_size_t)-1 && errno == EINTR);
#ifdef USE_WAIT_FOR_IO
if (rv == (apr_size_t)-1 &&
if (rv == (fspr_size_t)-1 &&
(errno == EAGAIN || errno == EWOULDBLOCK) &&
thefile->timeout != 0) {
apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 0);
fspr_status_t arv = fspr_wait_for_io_or_timeout(thefile, NULL, 0);
if (arv != APR_SUCCESS) {
*nbytes = 0;
return arv;
@ -212,8 +212,8 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
do {
do {
rv = write(thefile->filedes, buf, *nbytes);
} while (rv == (apr_size_t)-1 && errno == EINTR);
if (rv == (apr_size_t)-1 &&
} while (rv == (fspr_size_t)-1 && errno == EINTR);
if (rv == (fspr_size_t)-1 &&
(errno == EAGAIN || errno == EWOULDBLOCK)) {
*nbytes /= 2; /* yes, we'll loop if kernel lied
* and we can't even write 1 byte
@ -226,7 +226,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
}
}
#endif
if (rv == (apr_size_t)-1) {
if (rv == (fspr_size_t)-1) {
(*nbytes) = 0;
return errno;
}
@ -235,8 +235,8 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
}
}
APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iovec *vec,
apr_size_t nvec, apr_size_t *nbytes)
APR_DECLARE(fspr_status_t) fspr_file_writev(fspr_file_t *thefile, const struct iovec *vec,
fspr_size_t nvec, fspr_size_t *nbytes)
{
#ifdef HAVE_WRITEV
int bytes;
@ -261,49 +261,49 @@ APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile, const struct iove
* The only reasonable option, that maintains the semantics of a real
* writev(), is to only write the first iovec. Callers of file_writev()
* must deal with partial writes as they normally would. If you want to
* ensure an entire iovec is written, use apr_file_writev_full().
* ensure an entire iovec is written, use fspr_file_writev_full().
*/
*nbytes = vec[0].iov_len;
return apr_file_write(thefile, vec[0].iov_base, nbytes);
return fspr_file_write(thefile, vec[0].iov_base, nbytes);
#endif
}
APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_putc(char ch, fspr_file_t *thefile)
{
apr_size_t nbytes = 1;
fspr_size_t nbytes = 1;
return apr_file_write(thefile, &ch, &nbytes);
return fspr_file_write(thefile, &ch, &nbytes);
}
APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_ungetc(char ch, fspr_file_t *thefile)
{
thefile->ungetchar = (unsigned char)ch;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_getc(char *ch, fspr_file_t *thefile)
{
apr_size_t nbytes = 1;
fspr_size_t nbytes = 1;
return apr_file_read(thefile, ch, &nbytes);
return fspr_file_read(thefile, ch, &nbytes);
}
APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_puts(const char *str, fspr_file_t *thefile)
{
return apr_file_write_full(thefile, str, strlen(str), NULL);
return fspr_file_write_full(thefile, str, strlen(str), NULL);
}
APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_flush(fspr_file_t *thefile)
{
if (thefile->buffered) {
apr_int64_t written = 0;
fspr_int64_t written = 0;
if (thefile->direction == 1 && thefile->bufpos) {
do {
written = write(thefile->filedes, thefile->buffer, thefile->bufpos);
} while (written == (apr_int64_t)-1 && errno == EINTR);
if (written == (apr_int64_t)-1) {
} while (written == (fspr_int64_t)-1 && errno == EINTR);
if (written == (fspr_int64_t)-1) {
return errno;
}
thefile->filePtr += written;
@ -316,10 +316,10 @@ APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_gets(char *str, int len, fspr_file_t *thefile)
{
apr_status_t rv = APR_SUCCESS; /* get rid of gcc warning */
apr_size_t nbytes;
fspr_status_t rv = APR_SUCCESS; /* get rid of gcc warning */
fspr_size_t nbytes;
const char *str_start = str;
char *final = str + len - 1;
@ -330,22 +330,22 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
}
/* If we have an underlying buffer, we can be *much* more efficient
* and skip over the apr_file_read calls.
* and skip over the fspr_file_read calls.
*/
if (thefile->buffered) {
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_lock(thefile->thlock);
fspr_thread_mutex_lock(thefile->thlock);
}
#endif
if (thefile->direction == 1) {
rv = apr_file_flush(thefile);
rv = fspr_file_flush(thefile);
if (rv) {
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_unlock(thefile->thlock);
fspr_thread_mutex_unlock(thefile->thlock);
}
#endif
return rv;
@ -357,14 +357,14 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
}
while (str < final) { /* leave room for trailing '\0' */
/* Force ungetc leftover to call apr_file_read. */
/* Force ungetc leftover to call fspr_file_read. */
if (thefile->bufpos < thefile->dataRead &&
thefile->ungetchar == -1) {
*str = thefile->buffer[thefile->bufpos++];
}
else {
nbytes = 1;
rv = apr_file_read(thefile, str, &nbytes);
rv = fspr_file_read(thefile, str, &nbytes);
if (rv != APR_SUCCESS) {
break;
}
@ -378,14 +378,14 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
#if APR_HAS_THREADS
if (thefile->thlock) {
apr_thread_mutex_unlock(thefile->thlock);
fspr_thread_mutex_unlock(thefile->thlock);
}
#endif
}
else {
while (str < final) { /* leave room for trailing '\0' */
nbytes = 1;
rv = apr_file_read(thefile, str, &nbytes);
rv = fspr_file_read(thefile, str, &nbytes);
if (rv != APR_SUCCESS) {
break;
}
@ -410,17 +410,17 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
return rv;
}
struct apr_file_printf_data {
apr_vformatter_buff_t vbuff;
apr_file_t *fptr;
struct fspr_file_printf_data {
fspr_vformatter_buff_t vbuff;
fspr_file_t *fptr;
char *buf;
};
static int file_printf_flush(apr_vformatter_buff_t *buff)
static int file_printf_flush(fspr_vformatter_buff_t *buff)
{
struct apr_file_printf_data *data = (struct apr_file_printf_data *)buff;
struct fspr_file_printf_data *data = (struct fspr_file_printf_data *)buff;
if (apr_file_write_full(data->fptr, data->buf,
if (fspr_file_write_full(data->fptr, data->buf,
data->vbuff.curpos - data->buf, NULL)) {
return -1;
}
@ -429,10 +429,10 @@ static int file_printf_flush(apr_vformatter_buff_t *buff)
return 0;
}
APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
APR_DECLARE_NONSTD(int) fspr_file_printf(fspr_file_t *fptr,
const char *format, ...)
{
struct apr_file_printf_data data;
struct fspr_file_printf_data data;
va_list ap;
int count;
@ -445,10 +445,10 @@ APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
data.vbuff.endpos = data.buf + HUGE_STRING_LEN;
data.fptr = fptr;
va_start(ap, format);
count = apr_vformatter(file_printf_flush,
(apr_vformatter_buff_t *)&data, format, ap);
/* apr_vformatter does not call flush for the last bits */
if (count >= 0) file_printf_flush((apr_vformatter_buff_t *)&data);
count = fspr_vformatter(file_printf_flush,
(fspr_vformatter_buff_t *)&data, format, ap);
/* fspr_vformatter does not call flush for the last bits */
if (count >= 0) file_printf_flush((fspr_vformatter_buff_t *)&data);
va_end(ap);

View File

@ -14,15 +14,15 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "fspr_arch_file_io.h"
static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
static fspr_status_t setptr(fspr_file_t *thefile, fspr_off_t pos )
{
apr_off_t newbufpos;
apr_status_t rv;
fspr_off_t newbufpos;
fspr_status_t rv;
if (thefile->direction == 1) {
rv = apr_file_flush(thefile);
rv = fspr_file_flush(thefile);
if (rv) {
return rv;
}
@ -49,15 +49,15 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
}
APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
APR_DECLARE(fspr_status_t) fspr_file_seek(fspr_file_t *thefile, fspr_seek_where_t where, fspr_off_t *offset)
{
apr_off_t rv;
fspr_off_t rv;
thefile->eof_hit = 0;
if (thefile->buffered) {
int rc = EINVAL;
apr_finfo_t finfo;
fspr_finfo_t finfo;
switch (where) {
case APR_SET:
@ -69,7 +69,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
break;
case APR_END:
rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
rc = fspr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
if (rc == APR_SUCCESS)
rc = setptr(thefile, finfo.size + *offset);
break;
@ -91,7 +91,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
}
}
apr_status_t apr_file_trunc(apr_file_t *fp, apr_off_t offset)
fspr_status_t fspr_file_trunc(fspr_file_t *fp, fspr_off_t offset)
{
if (ftruncate(fp->filedes, offset) == -1) {
return errno;

View File

@ -13,22 +13,22 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "apr_private.h"
#include "apr_file_io.h"
#include "apr_strings.h"
#include "apr_env.h"
#include "fspr_private.h"
#include "fspr_file_io.h"
#include "fspr_strings.h"
#include "fspr_env.h"
/* Try to open a temporary file in the temporary dir, write to it,
and then close it. */
static int test_tempdir(const char *temp_dir, apr_pool_t *p)
static int test_tempdir(const char *temp_dir, fspr_pool_t *p)
{
apr_file_t *dummy_file;
char *path = apr_pstrcat(p, temp_dir, "/apr-tmp.XXXXXX", NULL);
fspr_file_t *dummy_file;
char *path = fspr_pstrcat(p, temp_dir, "/apr-tmp.XXXXXX", NULL);
if (apr_file_mktemp(&dummy_file, path, 0, p) == APR_SUCCESS) {
if (apr_file_putc('!', dummy_file) == APR_SUCCESS) {
if (apr_file_close(dummy_file) == APR_SUCCESS) {
if (fspr_file_mktemp(&dummy_file, path, 0, p) == APR_SUCCESS) {
if (fspr_file_putc('!', dummy_file) == APR_SUCCESS) {
if (fspr_file_close(dummy_file) == APR_SUCCESS) {
return 1;
}
}
@ -37,10 +37,10 @@ static int test_tempdir(const char *temp_dir, apr_pool_t *p)
}
APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_temp_dir_get(const char **temp_dir,
fspr_pool_t *p)
{
apr_status_t apr_err;
fspr_status_t fspr_err;
const char *try_dirs[] = { "/tmp", "/usr/tmp", "/var/tmp" };
const char *try_envs[] = { "TMP", "TEMP", "TMPDIR" };
const char *dir;
@ -69,9 +69,9 @@ APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
/* Try the environment first. */
for (i = 0; i < (sizeof(try_envs) / sizeof(const char *)); i++) {
char *value;
apr_err = apr_env_get(&value, try_envs[i], p);
if ((apr_err == APR_SUCCESS) && value) {
apr_size_t len = strlen(value);
fspr_err = fspr_env_get(&value, try_envs[i], p);
if ((fspr_err == APR_SUCCESS) && value) {
fspr_size_t len = strlen(value);
if (len && (len < APR_PATH_MAX) && test_tempdir(value, p)) {
dir = value;
goto end;
@ -114,7 +114,7 @@ APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
#endif
/* Finally, try the current working directory. */
if (APR_SUCCESS == apr_filepath_get(&cwd, APR_FILEPATH_NATIVE, p)) {
if (APR_SUCCESS == fspr_filepath_get(&cwd, APR_FILEPATH_NATIVE, p)) {
if (test_tempdir(cwd, p)) {
dir = cwd;
goto end;
@ -125,6 +125,6 @@ APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir,
return APR_EGENERAL;
end:
*temp_dir = apr_pstrdup(p, dir);
*temp_dir = fspr_pstrdup(p, dir);
return APR_SUCCESS;
}

View File

@ -14,12 +14,12 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "apr_arch_atime.h"
#include "fspr.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include "fspr_arch_atime.h"
#if APR_HAVE_ERRNO_H
#include <errno.h>
@ -35,27 +35,27 @@
#endif
static apr_status_t dir_cleanup(void *thedir)
static fspr_status_t dir_cleanup(void *thedir)
{
apr_dir_t *dir = thedir;
fspr_dir_t *dir = thedir;
if (dir->dirhand != INVALID_HANDLE_VALUE && !FindClose(dir->dirhand)) {
return apr_get_os_error();
return fspr_get_os_error();
}
dir->dirhand = INVALID_HANDLE_VALUE;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dir_open(fspr_dir_t **new, const char *dirname,
fspr_pool_t *pool)
{
apr_status_t rv;
fspr_status_t rv;
apr_size_t len = strlen(dirname);
(*new) = apr_pcalloc(pool, sizeof(apr_dir_t));
fspr_size_t len = strlen(dirname);
(*new) = fspr_pcalloc(pool, sizeof(fspr_dir_t));
/* Leave room here to add and pop the '*' wildcard for FindFirstFile
* and double-null terminate so we have one character to change.
*/
(*new)->dirname = apr_palloc(pool, len + 3);
(*new)->dirname = fspr_palloc(pool, len + 3);
memcpy((*new)->dirname, dirname, len);
if (len && (*new)->dirname[len - 1] != '/') {
(*new)->dirname[len++] = '/';
@ -68,8 +68,8 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
{
/* Create a buffer for the longest file name we will ever see
*/
(*new)->w.entry = apr_pcalloc(pool, sizeof(WIN32_FIND_DATAW));
(*new)->name = apr_pcalloc(pool, APR_FILE_MAX * 3 + 1);
(*new)->w.entry = fspr_pcalloc(pool, sizeof(WIN32_FIND_DATAW));
(*new)->name = fspr_pcalloc(pool, APR_FILE_MAX * 3 + 1);
}
#endif
#if APR_HAS_ANSI_FS
@ -85,16 +85,16 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
(*new) = NULL;
return APR_ENAMETOOLONG;
}
(*new)->n.entry = apr_pcalloc(pool, sizeof(WIN32_FIND_DATAW));
(*new)->n.entry = fspr_pcalloc(pool, sizeof(WIN32_FIND_DATAW));
}
#endif
(*new)->rootlen = len - 1;
(*new)->pool = pool;
(*new)->dirhand = INVALID_HANDLE_VALUE;
apr_pool_cleanup_register((*new)->pool, (void *)(*new), dir_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*new)->pool, (void *)(*new), dir_cleanup,
fspr_pool_cleanup_null);
rv = apr_dir_read(NULL, 0, *new);
rv = fspr_dir_read(NULL, 0, *new);
if (rv != APR_SUCCESS) {
dir_cleanup(*new);
*new = NULL;
@ -103,33 +103,33 @@ APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new, const char *dirname,
return rv;
}
APR_DECLARE(apr_status_t) apr_dir_close(apr_dir_t *dir)
APR_DECLARE(fspr_status_t) fspr_dir_close(fspr_dir_t *dir)
{
apr_pool_cleanup_kill(dir->pool, dir, dir_cleanup);
fspr_pool_cleanup_kill(dir->pool, dir, dir_cleanup);
return dir_cleanup(dir);
}
APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
apr_dir_t *thedir)
APR_DECLARE(fspr_status_t) fspr_dir_read(fspr_finfo_t *finfo, fspr_int32_t wanted,
fspr_dir_t *thedir)
{
apr_status_t rv;
fspr_status_t rv;
char *fname;
/* The while loops below allow us to skip all invalid file names, so that
* we aren't reporting any files where their absolute paths are too long.
*/
#if APR_HAS_UNICODE_FS
apr_wchar_t wdirname[APR_PATH_MAX];
apr_wchar_t *eos = NULL;
fspr_wchar_t wdirname[APR_PATH_MAX];
fspr_wchar_t *eos = NULL;
IF_WIN_OS_IS_UNICODE
{
/* This code path is always be invoked by apr_dir_open or
* apr_dir_rewind, so return without filling out the finfo.
/* This code path is always be invoked by fspr_dir_open or
* fspr_dir_rewind, so return without filling out the finfo.
*/
if (thedir->dirhand == INVALID_HANDLE_VALUE)
{
apr_status_t rv;
fspr_status_t rv;
if (rv = utf8_to_unicode_path(wdirname, sizeof(wdirname)
/ sizeof(apr_wchar_t),
/ sizeof(fspr_wchar_t),
thedir->dirname)) {
return rv;
}
@ -139,27 +139,27 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
thedir->dirhand = FindFirstFileW(wdirname, thedir->w.entry);
eos[0] = '\0';
if (thedir->dirhand == INVALID_HANDLE_VALUE) {
return apr_get_os_error();
return fspr_get_os_error();
}
thedir->bof = 1;
return APR_SUCCESS;
}
else if (thedir->bof) {
/* Noop - we already called FindFirstFileW from
* either apr_dir_open or apr_dir_rewind ... use
* either fspr_dir_open or fspr_dir_rewind ... use
* that first record.
*/
thedir->bof = 0;
}
else if (!FindNextFileW(thedir->dirhand, thedir->w.entry)) {
return apr_get_os_error();
return fspr_get_os_error();
}
while (thedir->rootlen &&
thedir->rootlen + wcslen(thedir->w.entry->cFileName) >= APR_PATH_MAX)
{
if (!FindNextFileW(thedir->dirhand, thedir->w.entry)) {
return apr_get_os_error();
return fspr_get_os_error();
}
}
if (rv = unicode_to_utf8_path(thedir->name, APR_FILE_MAX * 3 + 1,
@ -171,8 +171,8 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
#if APR_HAS_ANSI_FS
ELSE_WIN_OS_IS_ANSI
{
/* This code path is always be invoked by apr_dir_open or
* apr_dir_rewind, so return without filling out the finfo.
/* This code path is always be invoked by fspr_dir_open or
* fspr_dir_rewind, so return without filling out the finfo.
*/
if (thedir->dirhand == INVALID_HANDLE_VALUE) {
/* '/' terminated, so add the '*' and pop it when we finish */
@ -183,26 +183,26 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
thedir->n.entry);
eop[0] = '\0';
if (thedir->dirhand == INVALID_HANDLE_VALUE) {
return apr_get_os_error();
return fspr_get_os_error();
}
thedir->bof = 1;
return APR_SUCCESS;
}
else if (thedir->bof) {
/* Noop - we already called FindFirstFileW from
* either apr_dir_open or apr_dir_rewind ... use
* either fspr_dir_open or fspr_dir_rewind ... use
* that first record.
*/
thedir->bof = 0;
}
else if (!FindNextFile(thedir->dirhand, thedir->n.entry)) {
return apr_get_os_error();
return fspr_get_os_error();
}
while (thedir->rootlen &&
thedir->rootlen + strlen(thedir->n.entry->cFileName) >= MAX_PATH)
{
if (!FindNextFileW(thedir->dirhand, thedir->w.entry)) {
return apr_get_os_error();
return fspr_get_os_error();
}
}
fname = thedir->n.entry->cFileName;
@ -244,11 +244,11 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
#else
char fspec[APR_PATH_MAX];
#endif
apr_size_t dirlen = strlen(thedir->dirname);
fspr_size_t dirlen = strlen(thedir->dirname);
if (dirlen >= sizeof(fspec))
dirlen = sizeof(fspec) - 1;
apr_cpystrn(fspec, thedir->dirname, sizeof(fspec));
apr_cpystrn(fspec + dirlen, fname, sizeof(fspec) - dirlen);
fspr_cpystrn(fspec, thedir->dirname, sizeof(fspec));
fspr_cpystrn(fspec + dirlen, fname, sizeof(fspec) - dirlen);
return more_finfo(finfo, fspec, wanted, MORE_OF_FSPEC);
}
#endif
@ -257,66 +257,66 @@ APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_dir_rewind(apr_dir_t *dir)
APR_DECLARE(fspr_status_t) fspr_dir_rewind(fspr_dir_t *dir)
{
apr_status_t rv;
fspr_status_t rv;
/* this will mark the handle as invalid and we'll open it
* again if apr_dir_read() is subsequently called
* again if fspr_dir_read() is subsequently called
*/
rv = dir_cleanup(dir);
if (rv == APR_SUCCESS)
rv = apr_dir_read(NULL, 0, dir);
rv = fspr_dir_read(NULL, 0, dir);
return rv;
}
APR_DECLARE(apr_status_t) apr_dir_make(const char *path, apr_fileperms_t perm,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dir_make(const char *path, fspr_fileperms_t perm,
fspr_pool_t *pool)
{
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
fspr_wchar_t wpath[APR_PATH_MAX];
fspr_status_t rv;
if (rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path)) {
/ sizeof(fspr_wchar_t), path)) {
return rv;
}
if (!CreateDirectoryW(wpath, NULL)) {
return apr_get_os_error();
return fspr_get_os_error();
}
}
#endif
#if APR_HAS_ANSI_FS
ELSE_WIN_OS_IS_ANSI
if (!CreateDirectory(path, NULL)) {
return apr_get_os_error();
return fspr_get_os_error();
}
#endif
return APR_SUCCESS;
}
static apr_status_t dir_make_parent(char *path,
apr_fileperms_t perm,
apr_pool_t *pool)
static fspr_status_t dir_make_parent(char *path,
fspr_fileperms_t perm,
fspr_pool_t *pool)
{
apr_status_t rv;
fspr_status_t rv;
char *ch = strrchr(path, '\\');
if (!ch) {
return APR_ENOENT;
}
*ch = '\0';
rv = apr_dir_make (path, perm, pool); /* Try to make straight off */
rv = fspr_dir_make (path, perm, pool); /* Try to make straight off */
if (APR_STATUS_IS_ENOENT(rv)) { /* Missing an intermediate dir */
rv = dir_make_parent(path, perm, pool);
if (rv == APR_SUCCESS) {
rv = apr_dir_make (path, perm, pool); /* And complete the path */
rv = fspr_dir_make (path, perm, pool); /* And complete the path */
}
}
@ -324,13 +324,13 @@ static apr_status_t dir_make_parent(char *path,
return rv;
}
APR_DECLARE(apr_status_t) apr_dir_make_recursive(const char *path,
apr_fileperms_t perm,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dir_make_recursive(const char *path,
fspr_fileperms_t perm,
fspr_pool_t *pool)
{
apr_status_t rv = 0;
fspr_status_t rv = 0;
rv = apr_dir_make (path, perm, pool); /* Try to make PATH right out */
rv = fspr_dir_make (path, perm, pool); /* Try to make PATH right out */
if (APR_STATUS_IS_EEXIST(rv)) /* It's OK if PATH exists */
return APR_SUCCESS;
@ -338,45 +338,45 @@ APR_DECLARE(apr_status_t) apr_dir_make_recursive(const char *path,
if (APR_STATUS_IS_ENOENT(rv)) { /* Missing an intermediate dir */
char *dir;
rv = apr_filepath_merge(&dir, "", path, APR_FILEPATH_NATIVE, pool);
rv = fspr_filepath_merge(&dir, "", path, APR_FILEPATH_NATIVE, pool);
if (rv == APR_SUCCESS)
rv = dir_make_parent(dir, perm, pool); /* Make intermediate dirs */
if (rv == APR_SUCCESS)
rv = apr_dir_make (dir, perm, pool); /* And complete the path */
rv = fspr_dir_make (dir, perm, pool); /* And complete the path */
}
return rv;
}
APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_dir_remove(const char *path, fspr_pool_t *pool)
{
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
fspr_wchar_t wpath[APR_PATH_MAX];
fspr_status_t rv;
if (rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path)) {
/ sizeof(fspr_wchar_t), path)) {
return rv;
}
if (!RemoveDirectoryW(wpath)) {
return apr_get_os_error();
return fspr_get_os_error();
}
}
#endif
#if APR_HAS_ANSI_FS
ELSE_WIN_OS_IS_ANSI
if (!RemoveDirectory(path)) {
return apr_get_os_error();
return fspr_get_os_error();
}
#endif
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir,
apr_dir_t *dir)
APR_DECLARE(fspr_status_t) fspr_os_dir_get(fspr_os_dir_t **thedir,
fspr_dir_t *dir)
{
if (dir == NULL) {
return APR_ENODIR;
@ -385,9 +385,9 @@ APR_DECLARE(apr_status_t) apr_os_dir_get(apr_os_dir_t **thedir,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_dir_put(apr_dir_t **dir,
apr_os_dir_t *thedir,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_dir_put(fspr_dir_t **dir,
fspr_os_dir_t *thedir,
fspr_pool_t *pool)
{
return APR_ENOTIMPL;
}

View File

@ -14,15 +14,15 @@
* limitations under the License.
*/
#include "win32/apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "win32/fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_strings.h"
#include <string.h>
#include "apr_arch_inherit.h"
#include "fspr_arch_inherit.h"
APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_dup(fspr_file_t **new_file,
fspr_file_t *old_file, fspr_pool_t *p)
{
#ifdef _WIN32_WCE
return APR_ENOTIMPL;
@ -33,31 +33,31 @@ APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
if (!DuplicateHandle(hproc, old_file->filehand,
hproc, &newhand, 0, FALSE,
DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
return fspr_get_os_error();
}
(*new_file) = (apr_file_t *) apr_pcalloc(p, sizeof(apr_file_t));
(*new_file) = (fspr_file_t *) fspr_pcalloc(p, sizeof(fspr_file_t));
(*new_file)->filehand = newhand;
(*new_file)->flags = old_file->flags & ~APR_INHERIT;
(*new_file)->pool = p;
(*new_file)->fname = apr_pstrdup(p, old_file->fname);
(*new_file)->fname = fspr_pstrdup(p, old_file->fname);
(*new_file)->append = old_file->append;
(*new_file)->buffered = FALSE;
(*new_file)->ungetchar = old_file->ungetchar;
#if APR_HAS_THREADS
if (old_file->mutex) {
apr_thread_mutex_create(&((*new_file)->mutex),
fspr_thread_mutex_create(&((*new_file)->mutex),
APR_THREAD_MUTEX_DEFAULT, p);
}
#endif
apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file), file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file), file_cleanup,
fspr_pool_cleanup_null);
/* Create a pollset with room for one descriptor. */
/* ### check return codes */
(void) apr_pollset_create(&(*new_file)->pollset, 1, p, 0);
(void) fspr_pollset_create(&(*new_file)->pollset, 1, p, 0);
return APR_SUCCESS;
#endif /* !defined(_WIN32_WCE) */
@ -67,8 +67,8 @@ APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
#define stdout_handle 0x02
#define stderr_handle 0x04
APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
apr_file_t *old_file, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_dup2(fspr_file_t *new_file,
fspr_file_t *old_file, fspr_pool_t *p)
{
#ifdef _WIN32_WCE
return APR_ENOTIMPL;
@ -76,7 +76,7 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
DWORD stdhandle = 0;
HANDLE hproc = GetCurrentProcess();
HANDLE newhand = NULL;
apr_int32_t newflags;
fspr_int32_t newflags;
/* dup2 is not supported literaly with native Windows handles.
* We can, however, emulate dup2 for the standard i/o handles,
@ -97,12 +97,12 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
if (!DuplicateHandle(hproc, old_file->filehand,
hproc, &newhand, 0,
TRUE, DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
return fspr_get_os_error();
}
if (((stdhandle & stderr_handle) && !SetStdHandle(STD_ERROR_HANDLE, newhand)) ||
((stdhandle & stdout_handle) && !SetStdHandle(STD_OUTPUT_HANDLE, newhand)) ||
((stdhandle & stdin_handle) && !SetStdHandle(STD_INPUT_HANDLE, newhand))) {
return apr_get_os_error();
return fspr_get_os_error();
}
newflags = old_file->flags | APR_INHERIT;
}
@ -110,7 +110,7 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
if (!DuplicateHandle(hproc, old_file->filehand,
hproc, &newhand, 0,
FALSE, DUPLICATE_SAME_ACCESS)) {
return apr_get_os_error();
return fspr_get_os_error();
}
newflags = old_file->flags & ~APR_INHERIT;
}
@ -121,14 +121,14 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
new_file->flags = newflags;
new_file->filehand = newhand;
new_file->fname = apr_pstrdup(new_file->pool, old_file->fname);
new_file->fname = fspr_pstrdup(new_file->pool, old_file->fname);
new_file->append = old_file->append;
new_file->buffered = FALSE;
new_file->ungetchar = old_file->ungetchar;
#if APR_HAS_THREADS
if (old_file->mutex) {
apr_thread_mutex_create(&(new_file->mutex),
fspr_thread_mutex_create(&(new_file->mutex),
APR_THREAD_MUTEX_DEFAULT, p);
}
#endif
@ -137,15 +137,15 @@ APR_DECLARE(apr_status_t) apr_file_dup2(apr_file_t *new_file,
#endif /* !defined(_WIN32_WCE) */
}
APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
apr_file_t *old_file,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_setaside(fspr_file_t **new_file,
fspr_file_t *old_file,
fspr_pool_t *p)
{
*new_file = (apr_file_t *)apr_palloc(p, sizeof(apr_file_t));
memcpy(*new_file, old_file, sizeof(apr_file_t));
*new_file = (fspr_file_t *)fspr_palloc(p, sizeof(fspr_file_t));
memcpy(*new_file, old_file, sizeof(fspr_file_t));
(*new_file)->pool = p;
if (old_file->buffered) {
(*new_file)->buffer = apr_palloc(p, APR_FILE_BUFSIZE);
(*new_file)->buffer = fspr_palloc(p, APR_FILE_BUFSIZE);
if (old_file->direction == 1) {
memcpy((*new_file)->buffer, old_file->buffer, old_file->bufpos);
}
@ -154,26 +154,26 @@ APR_DECLARE(apr_status_t) apr_file_setaside(apr_file_t **new_file,
}
}
if (old_file->mutex) {
apr_thread_mutex_create(&((*new_file)->mutex),
fspr_thread_mutex_create(&((*new_file)->mutex),
APR_THREAD_MUTEX_DEFAULT, p);
apr_thread_mutex_destroy(old_file->mutex);
fspr_thread_mutex_destroy(old_file->mutex);
}
if (old_file->fname) {
(*new_file)->fname = apr_pstrdup(p, old_file->fname);
(*new_file)->fname = fspr_pstrdup(p, old_file->fname);
}
if (!(old_file->flags & APR_FILE_NOCLEANUP)) {
apr_pool_cleanup_register(p, (void *)(*new_file),
fspr_pool_cleanup_register(p, (void *)(*new_file),
file_cleanup,
file_cleanup);
}
old_file->filehand = INVALID_HANDLE_VALUE;
apr_pool_cleanup_kill(old_file->pool, (void *)old_file,
fspr_pool_cleanup_kill(old_file->pool, (void *)old_file,
file_cleanup);
/* Create a pollset with room for one descriptor. */
/* ### check return codes */
(void) apr_pollset_create(&(*new_file)->pollset, 1, p, 0);
(void) fspr_pollset_create(&(*new_file)->pollset, 1, p, 0);
return APR_SUCCESS;
}

View File

@ -14,11 +14,11 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_private.h"
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "apr_lib.h"
#include "fspr.h"
#include "fspr_private.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
#include "fspr_lib.h"
#include <string.h>
#include <ctype.h>
@ -37,10 +37,10 @@
* OS2 appears immune from the nonsense :)
*/
APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
APR_DECLARE(fspr_status_t) fspr_filepath_root(const char **rootpath,
const char **inpath,
apr_int32_t flags,
apr_pool_t *p)
fspr_int32_t flags,
fspr_pool_t *p)
{
const char *testpath = *inpath;
char *newpath;
@ -78,7 +78,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
Otherwise we either have an incomplete or relative path
*/
if (volume && strlen(volume) > 0) {
newpath = apr_pcalloc(p, strlen(server)+strlen(volume)+5);
newpath = fspr_pcalloc(p, strlen(server)+strlen(volume)+5);
construct(newpath, server, volume, NULL, NULL, NULL, PATH_NETWARE);
/* NetWare doesn't add the root slash so we need to add it manually.
@ -106,7 +106,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
in same manner as unix although this path will be
incomplete.
*/
*rootpath = apr_pstrdup(p, seperator);
*rootpath = fspr_pstrdup(p, seperator);
do {
++(*inpath);
} while ((**inpath == '/') || (**inpath == '\\'));
@ -133,12 +133,12 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
&& (testpath[3] == '/' || testpath[3] == '\\')) {
if (IS_FNCHAR(testpath[4]) && testpath[5] == ':')
{
apr_status_t rv;
fspr_status_t rv;
testpath += 4;
/* given '//?/C: or //./C: let us try this
* all over again from the drive designator
*/
rv = apr_filepath_root(rootpath, &testpath, flags, p);
rv = fspr_filepath_root(rootpath, &testpath, flags, p);
if (!rv || rv == APR_EINCOMPLETE)
*inpath = testpath;
return rv;
@ -170,7 +170,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
} while (*delim1 && *delim1 != '/' && *delim1 != '\\');
if (*delim1) {
apr_status_t rv;
fspr_status_t rv;
delim2 = delim1 + 1;
while (*delim2 && *delim2 != '/' && *delim2 != '\\') {
/* Protect against //machine/X/ where X is illegal */
@ -181,7 +181,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
/* Copy the '//machine/[share[/]]' path, always providing
* an extra byte for the trailing slash.
*/
newpath = apr_pstrmemdup(p, testpath, delim2 - testpath + 1);
newpath = fspr_pstrmemdup(p, testpath, delim2 - testpath + 1);
if (delim2 == delim1 + 1) {
/* We found simply \\machine\, so give up already
@ -196,7 +196,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
* Win32 will argue about slashed in UNC paths,
* so use backslashes till we finish testing,
* and add the trailing backslash [required].
* apr_pstrmemdup above guarentees us the new
* fspr_pstrmemdup above guarentees us the new
* trailing null character.
*/
newpath[0] = '\\';
@ -246,7 +246,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
*/
delim1 = strchr(testpath, '\0');
if (delim1 > testpath + 2) {
newpath = apr_pstrndup(p, testpath, delim1 - testpath + 1);
newpath = fspr_pstrndup(p, testpath, delim1 - testpath + 1);
if (flags & APR_FILEPATH_TRUENAME)
newpath[delim1 - testpath] = seperator[0];
else
@ -254,7 +254,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
newpath[delim1 - testpath + 1] = '\0';
}
else {
newpath = apr_pstrndup(p, testpath, delim1 - testpath);
newpath = fspr_pstrndup(p, testpath, delim1 - testpath);
}
if (flags & APR_FILEPATH_TRUENAME) {
newpath[0] = seperator[0];
@ -268,7 +268,7 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
/* Left with a path of '/', what drive are we asking about?
*/
*inpath = testpath + 1;
newpath = apr_palloc(p, 2);
newpath = fspr_palloc(p, 2);
if (flags & APR_FILEPATH_TRUENAME)
newpath[0] = seperator[0];
else
@ -281,20 +281,20 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
/* Evaluate path of 'd:[/]' */
if (IS_FNCHAR(*testpath) && testpath[1] == ':')
{
apr_status_t rv;
fspr_status_t rv;
/* Validate that D:\ drive exists, test must be rooted
* Note that posix/win32 insists a drive letter is upper case,
* so who are we to argue with a 'feature'.
* It is a safe fold, since only A-Z is legal, and has no
* side effects of legal mis-mapped non-us-ascii codes.
*/
newpath = apr_palloc(p, 4);
newpath = fspr_palloc(p, 4);
newpath[0] = testpath[0];
newpath[1] = testpath[1];
newpath[2] = seperator[0];
newpath[3] = '\0';
if (flags & APR_FILEPATH_TRUENAME) {
newpath[0] = apr_toupper(newpath[0]);
newpath[0] = fspr_toupper(newpath[0]);
rv = filepath_root_test(newpath, p);
if (rv)
return rv;
@ -328,24 +328,24 @@ APR_DECLARE(apr_status_t) apr_filepath_root(const char **rootpath,
}
APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
APR_DECLARE(fspr_status_t) fspr_filepath_merge(char **newpath,
const char *basepath,
const char *addpath,
apr_int32_t flags,
apr_pool_t *p)
fspr_int32_t flags,
fspr_pool_t *p)
{
char path[APR_PATH_MAX]; /* isn't null term */
const char *baseroot = NULL;
const char *addroot;
apr_size_t rootlen; /* the length of the root portion of path, d:/ is 3 */
apr_size_t baselen; /* the length of basepath (excluding baseroot) */
apr_size_t keptlen; /* the length of the retained basepath (incl root) */
apr_size_t pathlen; /* the length of the result path */
apr_size_t segend; /* the end of the current segment */
apr_size_t seglen; /* the length of the segment (excl trailing chars) */
apr_status_t basetype = 0; /* from parsing the basepath's baseroot */
apr_status_t addtype; /* from parsing the addpath's addroot */
apr_status_t rv;
fspr_size_t rootlen; /* the length of the root portion of path, d:/ is 3 */
fspr_size_t baselen; /* the length of basepath (excluding baseroot) */
fspr_size_t keptlen; /* the length of the retained basepath (incl root) */
fspr_size_t pathlen; /* the length of the result path */
fspr_size_t segend; /* the end of the current segment */
fspr_size_t seglen; /* the length of the segment (excl trailing chars) */
fspr_status_t basetype = 0; /* from parsing the basepath's baseroot */
fspr_status_t addtype; /* from parsing the addpath's addroot */
fspr_status_t rv;
#ifndef NETWARE
int fixunc = 0; /* flag to complete an incomplete UNC basepath */
#endif
@ -359,7 +359,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
else {
/* This call _should_ test the path
*/
addtype = apr_filepath_root(&addroot, &addpath,
addtype = fspr_filepath_root(&addroot, &addpath,
APR_FILEPATH_TRUENAME
| (flags & APR_FILEPATH_NATIVE),
p);
@ -370,7 +370,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
addroot = "";
}
else if (addtype != APR_EINCOMPLETE) {
/* apr_filepath_root was incomprehensible so fail already
/* fspr_filepath_root was incomprehensible so fail already
*/
return addtype;
}
@ -425,7 +425,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
rv = filepath_drive_get(&getpath, addroot[0], flags, p);
else
#endif
rv = apr_filepath_get(&getpath, flags, p);
rv = fspr_filepath_get(&getpath, flags, p);
if (rv != APR_SUCCESS)
return rv;
basepath = getpath;
@ -434,7 +434,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
if (!baseroot) {
/* This call should _not_ test the path
*/
basetype = apr_filepath_root(&baseroot, &basepath,
basetype = fspr_filepath_root(&baseroot, &basepath,
(flags & APR_FILEPATH_NATIVE), p);
if (basetype == APR_SUCCESS) {
basetype = APR_EABSOLUTE;
@ -443,7 +443,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
baseroot = "";
}
else if (basetype != APR_EINCOMPLETE) {
/* apr_filepath_root was incomprehensible so fail already
/* fspr_filepath_root was incomprehensible so fail already
*/
return basetype;
}
@ -740,8 +740,8 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
if (fixunc) {
const char *testpath = path;
const char *testroot;
apr_status_t testtype;
apr_size_t i = (addpath[segend] != '\0');
fspr_status_t testtype;
fspr_size_t i = (addpath[segend] != '\0');
/* This isn't legal unless the unc path is complete!
*/
@ -764,7 +764,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
path[pathlen] = '\0';
/* This call _should_ test the path
*/
testtype = apr_filepath_root(&testroot, &testpath,
testtype = fspr_filepath_root(&testroot, &testpath,
APR_FILEPATH_TRUENAME
| (flags & APR_FILEPATH_NATIVE),
p);
@ -774,7 +774,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
fixunc = 0;
}
else if (testtype != APR_EINCOMPLETE) {
/* apr_filepath_root was very unexpected so fail already
/* fspr_filepath_root was very unexpected so fail already
*/
return testtype;
}
@ -784,7 +784,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
{
/* An actual segment, append it to the destination path
*/
apr_size_t i = (addpath[segend] != '\0');
fspr_size_t i = (addpath[segend] != '\0');
if (pathlen + seglen + i >= sizeof(path))
return APR_ENAMETOOLONG;
memcpy(path + pathlen, addpath, seglen + i);
@ -835,7 +835,7 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
/* Go through all the new segments */
while (keptlen < pathlen) {
apr_finfo_t finfo;
fspr_finfo_t finfo;
char saveslash = 0;
seglen = 0;
/* find any slash and set it aside for a minute. */
@ -848,10 +848,10 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
/* Null term for stat! */
path[keptlen + seglen] = '\0';
if ((rv = apr_stat(&finfo, path,
if ((rv = fspr_stat(&finfo, path,
APR_FINFO_LINK | APR_FINFO_TYPE | APR_FINFO_NAME, p))
== APR_SUCCESS) {
apr_size_t namelen = strlen(finfo.name);
fspr_size_t namelen = strlen(finfo.name);
#if defined(OS2) /* only has case folding, never aliases that change the length */
@ -949,28 +949,28 @@ APR_DECLARE(apr_status_t) apr_filepath_merge(char **newpath,
}
}
*newpath = apr_pmemdup(p, path, pathlen + 1);
*newpath = fspr_pmemdup(p, path, pathlen + 1);
(*newpath)[pathlen] = '\0';
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_filepath_list_split(apr_array_header_t **pathelts,
APR_DECLARE(fspr_status_t) fspr_filepath_list_split(fspr_array_header_t **pathelts,
const char *liststr,
apr_pool_t *p)
fspr_pool_t *p)
{
return apr_filepath_list_split_impl(pathelts, liststr, ';', p);
return fspr_filepath_list_split_impl(pathelts, liststr, ';', p);
}
APR_DECLARE(apr_status_t) apr_filepath_list_merge(char **liststr,
apr_array_header_t *pathelts,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_list_merge(char **liststr,
fspr_array_header_t *pathelts,
fspr_pool_t *p)
{
return apr_filepath_list_merge_impl(liststr, pathelts, ';', p);
return fspr_filepath_list_merge_impl(liststr, pathelts, ';', p);
}
APR_DECLARE(apr_status_t) apr_filepath_encoding(int *style, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_encoding(int *style, fspr_pool_t *p)
{
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE

View File

@ -14,28 +14,28 @@
* limitations under the License.
*/
#include "apr.h"
#include "fspr.h"
#include <aclapi.h>
#include "apr_private.h"
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_errno.h"
#include "apr_time.h"
#include "fspr_private.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_strings.h"
#include "fspr_errno.h"
#include "fspr_time.h"
#include <sys/stat.h>
#include "apr_arch_atime.h"
#include "apr_arch_misc.h"
#include "fspr_arch_atime.h"
#include "fspr_arch_misc.h"
/* We have to assure that the file name contains no '*'s, or other
* wildcards when using FindFirstFile to recover the true file name.
*/
static apr_status_t test_safe_name(const char *name)
static fspr_status_t test_safe_name(const char *name)
{
/* Only accept ':' in the second position of the filename,
* as the drive letter delimiter:
*/
if (apr_isalpha(*name) && (name[1] == ':')) {
if (fspr_isalpha(*name) && (name[1] == ':')) {
name += 2;
}
while (*name) {
@ -50,12 +50,12 @@ static apr_status_t test_safe_name(const char *name)
return APR_SUCCESS;
}
static apr_status_t free_localheap(void *heap) {
static fspr_status_t free_localheap(void *heap) {
LocalFree(heap);
return APR_SUCCESS;
}
static apr_gid_t worldid = NULL;
static fspr_gid_t worldid = NULL;
static void free_world(void)
{
@ -72,13 +72,13 @@ typedef enum prot_scope_e {
prot_scope_user = 8
} prot_scope_e;
static apr_fileperms_t convert_prot(ACCESS_MASK acc, prot_scope_e scope)
static fspr_fileperms_t convert_prot(ACCESS_MASK acc, prot_scope_e scope)
{
/* These choices are based on the single filesystem bit that controls
* the given behavior. They are -not- recommended for any set protection
* function, such a function should -set- use GENERIC_READ/WRITE/EXECUTE
*/
apr_fileperms_t prot = 0;
fspr_fileperms_t prot = 0;
if (acc & FILE_EXECUTE)
prot |= APR_WEXECUTE;
if (acc & FILE_WRITE_DATA)
@ -88,7 +88,7 @@ static apr_fileperms_t convert_prot(ACCESS_MASK acc, prot_scope_e scope)
return (prot << scope);
}
static void resolve_prot(apr_finfo_t *finfo, apr_int32_t wanted, PACL dacl)
static void resolve_prot(fspr_finfo_t *finfo, fspr_int32_t wanted, PACL dacl)
{
TRUSTEE_W ident = {NULL, NO_MULTIPLE_TRUSTEE, TRUSTEE_IS_SID};
ACCESS_MASK acc;
@ -139,11 +139,11 @@ static void resolve_prot(apr_finfo_t *finfo, apr_int32_t wanted, PACL dacl)
}
}
static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
static fspr_status_t resolve_ident(fspr_finfo_t *finfo, const char *fname,
fspr_int32_t wanted, fspr_pool_t *pool)
{
apr_file_t *thefile = NULL;
apr_status_t rv;
fspr_file_t *thefile = NULL;
fspr_status_t rv;
/*
* NT5 (W2K) only supports symlinks in the same manner as mount points.
* This code should eventually take that into account, for now treat
@ -153,28 +153,28 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
* user, group or permissions.
*/
if ((rv = apr_file_open(&thefile, fname, APR_OPENINFO
if ((rv = fspr_file_open(&thefile, fname, APR_OPENINFO
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0)
| ((wanted & (APR_FINFO_PROT | APR_FINFO_OWNER))
? APR_READCONTROL : 0),
APR_OS_DEFAULT, pool)) == APR_SUCCESS) {
rv = apr_file_info_get(finfo, wanted, thefile);
rv = fspr_file_info_get(finfo, wanted, thefile);
finfo->filehand = NULL;
apr_file_close(thefile);
fspr_file_close(thefile);
}
else if (APR_STATUS_IS_EACCES(rv) && (wanted & (APR_FINFO_PROT
| APR_FINFO_OWNER))) {
/* We have a backup plan. Perhaps we couldn't grab READ_CONTROL?
* proceed without asking for that permission...
*/
if ((rv = apr_file_open(&thefile, fname, APR_OPENINFO
if ((rv = fspr_file_open(&thefile, fname, APR_OPENINFO
| ((wanted & APR_FINFO_LINK) ? APR_OPENLINK : 0),
APR_OS_DEFAULT, pool)) == APR_SUCCESS) {
rv = apr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
rv = fspr_file_info_get(finfo, wanted & ~(APR_FINFO_PROT
| APR_FINFO_OWNER),
thefile);
finfo->filehand = NULL;
apr_file_close(thefile);
fspr_file_close(thefile);
}
}
@ -188,7 +188,7 @@ static apr_status_t resolve_ident(apr_finfo_t *finfo, const char *fname,
return rv;
}
static void guess_protection_bits(apr_finfo_t *finfo)
static void guess_protection_bits(fspr_finfo_t *finfo)
{
/* Read, write execute for owner. In the Win9x environment, any
* readable file is executable (well, not entirely 100% true, but
@ -207,20 +207,20 @@ static void guess_protection_bits(apr_finfo_t *finfo)
finfo->valid |= APR_FINFO_UPROT | APR_FINFO_GPROT | APR_FINFO_WPROT;
}
apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
apr_int32_t wanted, int whatfile)
fspr_status_t more_finfo(fspr_finfo_t *finfo, const void *ufile,
fspr_int32_t wanted, int whatfile)
{
PSID user = NULL, grp = NULL;
PACL dacl = NULL;
apr_status_t rv;
fspr_status_t rv;
if (apr_os_level < APR_WIN_NT)
if (fspr_os_level < APR_WIN_NT)
guess_protection_bits(finfo);
else if (wanted & (APR_FINFO_PROT | APR_FINFO_OWNER))
{
/* On NT this request is incredibly expensive, but accurate.
* Since the WinNT-only functions below are protected by the
* (apr_os_level < APR_WIN_NT) case above, we need no extra
* (fspr_os_level < APR_WIN_NT) case above, we need no extra
* tests, but remember GetNamedSecurityInfo & GetSecurityInfo
* are not supported on 9x.
*/
@ -233,7 +233,7 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
if (wanted & APR_FINFO_PROT)
sinf |= DACL_SECURITY_INFORMATION;
if (whatfile == MORE_OF_WFSPEC) {
apr_wchar_t *wfile = (apr_wchar_t*) ufile;
fspr_wchar_t *wfile = (fspr_wchar_t*) ufile;
int fix = 0;
if (wcsncmp(wfile, L"\\\\?\\", 4) == 0) {
fix = 4;
@ -266,8 +266,8 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
else
return APR_INCOMPLETE;
if (rv == ERROR_SUCCESS)
apr_pool_cleanup_register(finfo->pool, pdesc, free_localheap,
apr_pool_cleanup_null);
fspr_pool_cleanup_register(finfo->pool, pdesc, free_localheap,
fspr_pool_cleanup_null);
else
user = grp = dacl = NULL;
@ -303,9 +303,9 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
* if this is a CHR filetype. If it's reasonably certain it can't be,
* then the function returns 0.
*/
int fillin_fileinfo(apr_finfo_t *finfo,
int fillin_fileinfo(fspr_finfo_t *finfo,
WIN32_FILE_ATTRIBUTE_DATA *wininfo,
int byhandle, apr_int32_t wanted)
int byhandle, fspr_int32_t wanted)
{
DWORD *sizes = &wininfo->nFileSizeHigh + byhandle;
int warn = 0;
@ -317,10 +317,10 @@ int fillin_fileinfo(apr_finfo_t *finfo,
FileTimeToAprTime(&finfo->mtime, &wininfo->ftLastWriteTime);
#if APR_HAS_LARGE_FILES
finfo->size = (apr_off_t)sizes[1]
| ((apr_off_t)sizes[0] << 32);
finfo->size = (fspr_off_t)sizes[1]
| ((fspr_off_t)sizes[0] << 32);
#else
finfo->size = (apr_off_t)sizes[1];
finfo->size = (fspr_off_t)sizes[1];
if (finfo->size < 0 || sizes[0])
finfo->size = 0x7fffffff;
#endif
@ -369,20 +369,20 @@ int fillin_fileinfo(apr_finfo_t *finfo,
}
APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_info_get(fspr_finfo_t *finfo, fspr_int32_t wanted,
fspr_file_t *thefile)
{
BY_HANDLE_FILE_INFORMATION FileInfo;
if (thefile->buffered) {
/* XXX: flush here is not mutex protected */
apr_status_t rv = apr_file_flush(thefile);
fspr_status_t rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS)
return rv;
}
if (!GetFileInformationByHandle(thefile->filehand, &FileInfo)) {
return apr_get_os_error();
return fspr_get_os_error();
}
fillin_fileinfo(finfo, (WIN32_FILE_ATTRIBUTE_DATA *) &FileInfo, 1, wanted);
@ -416,8 +416,8 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t want
finfo->fname = thefile->fname;
/* Extra goodies known only by GetFileInformationByHandle() */
finfo->inode = (apr_ino_t)FileInfo.nFileIndexLow
| ((apr_ino_t)FileInfo.nFileIndexHigh << 32);
finfo->inode = (fspr_ino_t)FileInfo.nFileIndexLow
| ((fspr_ino_t)FileInfo.nFileIndexHigh << 32);
finfo->device = FileInfo.dwVolumeSerialNumber;
finfo->nlink = FileInfo.nNumberOfLinks;
@ -432,21 +432,21 @@ APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, apr_int32_t want
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname,
apr_fileperms_t perms)
APR_DECLARE(fspr_status_t) fspr_file_perms_set(const char *fname,
fspr_fileperms_t perms)
{
return APR_ENOTIMPL;
}
APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
apr_int32_t wanted, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_stat(fspr_finfo_t *finfo, const char *fname,
fspr_int32_t wanted, fspr_pool_t *pool)
{
/* XXX: is constant - needs testing - which requires a lighter-weight root test fn */
int isroot = 0;
apr_status_t ident_rv = 0;
apr_status_t rv;
fspr_status_t ident_rv = 0;
fspr_status_t rv;
#if APR_HAS_UNICODE_FS
apr_wchar_t wfname[APR_PATH_MAX];
fspr_wchar_t wfname[APR_PATH_MAX];
#endif
char *filename = NULL;
@ -489,12 +489,12 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
}
if (rv = utf8_to_unicode_path(wfname, sizeof(wfname)
/ sizeof(apr_wchar_t), fname))
/ sizeof(fspr_wchar_t), fname))
return rv;
if (!(wanted & APR_FINFO_NAME)) {
if (!GetFileAttributesExW(wfname, GetFileExInfoStandard,
&FileInfo.i))
return apr_get_os_error();
return fspr_get_os_error();
}
else {
/* Guard against bogus wildcards and retrieve by name
@ -508,13 +508,13 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
}
hFind = FindFirstFileW(wfname, &FileInfo.w);
if (hFind == INVALID_HANDLE_VALUE)
return apr_get_os_error();
return fspr_get_os_error();
FindClose(hFind);
if (unicode_to_utf8_path(tmpname, sizeof(tmpname),
FileInfo.w.cFileName)) {
return APR_ENAMETOOLONG;
}
filename = apr_pstrdup(pool, tmpname);
filename = fspr_pstrdup(pool, tmpname);
}
}
#endif
@ -523,17 +523,17 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
{
char *root = NULL;
const char *test = fname;
rv = apr_filepath_root(&root, &test, APR_FILEPATH_NATIVE, pool);
rv = fspr_filepath_root(&root, &test, APR_FILEPATH_NATIVE, pool);
isroot = (root && *root && !(*test));
if ((apr_os_level >= APR_WIN_98) && (!(wanted & APR_FINFO_NAME) || isroot))
if ((fspr_os_level >= APR_WIN_98) && (!(wanted & APR_FINFO_NAME) || isroot))
{
/* cannot use FindFile on a Win98 root, it returns \*
* GetFileAttributesExA is not available on Win95
*/
if (!GetFileAttributesExA(fname, GetFileExInfoStandard,
&FileInfo.i)) {
return apr_get_os_error();
return fspr_get_os_error();
}
}
else if (isroot) {
@ -543,7 +543,7 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
{
finfo->pool = pool;
finfo->filetype = 0;
finfo->mtime = apr_time_now();
finfo->mtime = fspr_time_now();
finfo->protection |= APR_WREAD | APR_WEXECUTE | APR_WWRITE;
finfo->protection |= (finfo->protection << prot_scope_group)
| (finfo->protection << prot_scope_user);
@ -567,10 +567,10 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
}
hFind = FindFirstFileA(fname, &FileInfo.n);
if (hFind == INVALID_HANDLE_VALUE) {
return apr_get_os_error();
return fspr_get_os_error();
}
FindClose(hFind);
filename = apr_pstrdup(pool, FileInfo.n.cFileName);
filename = fspr_pstrdup(pool, FileInfo.n.cFileName);
}
}
#endif
@ -583,12 +583,12 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
* to reliably translate char devices to the path '\\.\device'
* so go ask for the full path.
*/
if (apr_os_level >= APR_WIN_NT)
if (fspr_os_level >= APR_WIN_NT)
{
#if APR_HAS_UNICODE_FS
apr_wchar_t tmpname[APR_FILE_MAX];
apr_wchar_t *tmpoff = NULL;
if (GetFullPathNameW(wfname, sizeof(tmpname) / sizeof(apr_wchar_t),
fspr_wchar_t tmpname[APR_FILE_MAX];
fspr_wchar_t *tmpoff = NULL;
if (GetFullPathNameW(wfname, sizeof(tmpname) / sizeof(fspr_wchar_t),
tmpname, &tmpoff))
{
if (!wcsncmp(tmpname, L"\\\\.\\", 4)) {
@ -646,7 +646,7 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
if (wanted &= ~finfo->valid) {
/* Caller wants more than APR_FINFO_MIN | APR_FINFO_NAME */
#if APR_HAS_UNICODE_FS
if (apr_os_level >= APR_WIN_NT)
if (fspr_os_level >= APR_WIN_NT)
return more_finfo(finfo, wfname, wanted, MORE_OF_WFSPEC);
#endif
return more_finfo(finfo, fname, wanted, MORE_OF_FSPEC);
@ -655,15 +655,15 @@ APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
apr_fileattrs_t attributes,
apr_fileattrs_t attr_mask,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_attrs_set(const char *fname,
fspr_fileattrs_t attributes,
fspr_fileattrs_t attr_mask,
fspr_pool_t *pool)
{
DWORD flags;
apr_status_t rv;
fspr_status_t rv;
#if APR_HAS_UNICODE_FS
apr_wchar_t wfname[APR_PATH_MAX];
fspr_wchar_t wfname[APR_PATH_MAX];
#endif
/* Don't do anything if we can't handle the requested attributes */
@ -689,7 +689,7 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
#endif
if (flags == 0xFFFFFFFF)
return apr_get_os_error();
return fspr_get_os_error();
if (attr_mask & APR_FILE_ATTR_READONLY)
{
@ -721,20 +721,20 @@ APR_DECLARE(apr_status_t) apr_file_attrs_set(const char *fname,
#endif
if (rv == 0)
return apr_get_os_error();
return fspr_get_os_error();
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
apr_time_t mtime,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_mtime_set(const char *fname,
fspr_time_t mtime,
fspr_pool_t *pool)
{
apr_file_t *thefile;
apr_status_t rv;
fspr_file_t *thefile;
fspr_status_t rv;
rv = apr_file_open(&thefile, fname,
rv = fspr_file_open(&thefile, fname,
APR_READ | APR_WRITEATTRS,
APR_OS_DEFAULT, pool);
if (!rv)
@ -745,16 +745,16 @@ APR_DECLARE(apr_status_t) apr_file_mtime_set(const char *fname,
if (!GetFileTime(thefile->filehand,
&file_ctime, &file_atime, &file_mtime))
rv = apr_get_os_error();
rv = fspr_get_os_error();
else
{
AprTimeToFileTime(&file_mtime, mtime);
if (!SetFileTime(thefile->filehand,
&file_ctime, &file_atime, &file_mtime))
rv = apr_get_os_error();
rv = fspr_get_os_error();
}
apr_file_close(thefile);
fspr_file_close(thefile);
}
return rv;

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_arch_file_io.h"
#include "apr_strings.h"
#include "fspr.h"
#include "fspr_arch_file_io.h"
#include "fspr_strings.h"
/* Win32 Exceptions:
*
@ -38,7 +38,7 @@
* Oddly, \x7f _is_ acceptable ;)
*/
/* apr_c_is_fnchar[] maps Win32's file name and shell escape symbols
/* fspr_c_is_fnchar[] maps Win32's file name and shell escape symbols
*
* element & 1 == valid file name character [excluding delimiters]
* element & 2 == character should be shell (caret) escaped from cmd.exe
@ -46,7 +46,7 @@
* this must be in-sync with Apache httpd's gen_test_char.c for cgi escaping.
*/
const char apr_c_is_fnchar[256] =
const char fspr_c_is_fnchar[256] =
{/* Reject all ctrl codes... Escape \n and \r (ascii 10 and 13) */
0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
/* ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? */
@ -63,15 +63,15 @@ const char apr_c_is_fnchar[256] =
};
apr_status_t filepath_root_test(char *path, apr_pool_t *p)
fspr_status_t filepath_root_test(char *path, fspr_pool_t *p)
{
apr_status_t rv;
fspr_status_t rv;
#if APR_HAS_UNICODE_FS
if (apr_os_level >= APR_WIN_NT)
if (fspr_os_level >= APR_WIN_NT)
{
apr_wchar_t wpath[APR_PATH_MAX];
fspr_wchar_t wpath[APR_PATH_MAX];
if (rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path))
/ sizeof(fspr_wchar_t), path))
return rv;
rv = GetDriveTypeW(wpath);
}
@ -85,24 +85,24 @@ apr_status_t filepath_root_test(char *path, apr_pool_t *p)
}
apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_int32_t flags, apr_pool_t *p)
fspr_status_t filepath_drive_get(char **rootpath, char drive,
fspr_int32_t flags, fspr_pool_t *p)
{
char path[APR_PATH_MAX];
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t *ignored;
apr_wchar_t wdrive[8];
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
fspr_wchar_t *ignored;
fspr_wchar_t wdrive[8];
fspr_wchar_t wpath[APR_PATH_MAX];
fspr_status_t rv;
/* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
* as if that is useful for anything.
*/
wcscpy(wdrive, L"D:.");
wdrive[0] = (apr_wchar_t)(unsigned char)drive;
if (!GetFullPathNameW(wdrive, sizeof(wpath) / sizeof(apr_wchar_t), wpath, &ignored))
return apr_get_os_error();
wdrive[0] = (fspr_wchar_t)(unsigned char)drive;
if (!GetFullPathNameW(wdrive, sizeof(wpath) / sizeof(fspr_wchar_t), wpath, &ignored))
return fspr_get_os_error();
if ((rv = unicode_to_utf8_path(path, sizeof(path), wpath)))
return rv;
}
@ -117,7 +117,7 @@ apr_status_t filepath_drive_get(char **rootpath, char drive,
drivestr[2] = '.';;
drivestr[3] = '\0';
if (!GetFullPathName(drivestr, sizeof(path), path, &ignored))
return apr_get_os_error();
return fspr_get_os_error();
}
#endif
if (!(flags & APR_FILEPATH_NATIVE)) {
@ -126,34 +126,34 @@ apr_status_t filepath_drive_get(char **rootpath, char drive,
**rootpath = '/';
}
}
*rootpath = apr_pstrdup(p, path);
*rootpath = fspr_pstrdup(p, path);
return APR_SUCCESS;
}
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
fspr_status_t filepath_root_case(char **rootpath, char *root, fspr_pool_t *p)
{
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t *ignored;
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
apr_wchar_t wroot[APR_PATH_MAX];
fspr_wchar_t *ignored;
fspr_wchar_t wpath[APR_PATH_MAX];
fspr_status_t rv;
fspr_wchar_t wroot[APR_PATH_MAX];
/* ???: This needs review, apparently "\\?\d:." returns "\\?\d:"
* as if that is useful for anything.
*/
if (rv = utf8_to_unicode_path(wroot, sizeof(wroot)
/ sizeof(apr_wchar_t), root))
/ sizeof(fspr_wchar_t), root))
return rv;
if (!GetFullPathNameW(wroot, sizeof(wpath) / sizeof(apr_wchar_t), wpath, &ignored))
return apr_get_os_error();
if (!GetFullPathNameW(wroot, sizeof(wpath) / sizeof(fspr_wchar_t), wpath, &ignored))
return fspr_get_os_error();
/* Borrow wroot as a char buffer (twice as big as necessary)
*/
if ((rv = unicode_to_utf8_path((char*)wroot, sizeof(wroot), wpath)))
return rv;
*rootpath = apr_pstrdup(p, (char*)wroot);
*rootpath = fspr_pstrdup(p, (char*)wroot);
}
#endif
#if APR_HAS_ANSI_FS
@ -162,25 +162,25 @@ apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p)
char path[APR_PATH_MAX];
char *ignored;
if (!GetFullPathName(root, sizeof(path), path, &ignored))
return apr_get_os_error();
*rootpath = apr_pstrdup(p, path);
return fspr_get_os_error();
*rootpath = fspr_pstrdup(p, path);
}
#endif
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_filepath_get(char **rootpath, apr_int32_t flags,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_get(char **rootpath, fspr_int32_t flags,
fspr_pool_t *p)
{
char path[APR_PATH_MAX];
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
if (!GetCurrentDirectoryW(sizeof(wpath) / sizeof(apr_wchar_t), wpath))
return apr_get_os_error();
fspr_wchar_t wpath[APR_PATH_MAX];
fspr_status_t rv;
if (!GetCurrentDirectoryW(sizeof(wpath) / sizeof(fspr_wchar_t), wpath))
return fspr_get_os_error();
if ((rv = unicode_to_utf8_path(path, sizeof(path), wpath)))
return rv;
}
@ -189,7 +189,7 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **rootpath, apr_int32_t flags,
ELSE_WIN_OS_IS_ANSI
{
if (!GetCurrentDirectory(sizeof(path), path))
return apr_get_os_error();
return fspr_get_os_error();
}
#endif
if (!(flags & APR_FILEPATH_NATIVE)) {
@ -198,31 +198,31 @@ APR_DECLARE(apr_status_t) apr_filepath_get(char **rootpath, apr_int32_t flags,
**rootpath = '/';
}
}
*rootpath = apr_pstrdup(p, path);
*rootpath = fspr_pstrdup(p, path);
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_filepath_set(const char *rootpath,
apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_filepath_set(const char *rootpath,
fspr_pool_t *p)
{
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
fspr_wchar_t wpath[APR_PATH_MAX];
fspr_status_t rv;
if (rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), rootpath))
/ sizeof(fspr_wchar_t), rootpath))
return rv;
if (!SetCurrentDirectoryW(wpath))
return apr_get_os_error();
return fspr_get_os_error();
}
#endif
#if APR_HAS_ANSI_FS
ELSE_WIN_OS_IS_ANSI
{
if (!SetCurrentDirectory(rootpath))
return apr_get_os_error();
return fspr_get_os_error();
}
#endif
return APR_SUCCESS;

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
#include "apr_arch_file_io.h"
#include "fspr_arch_file_io.h"
APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
APR_DECLARE(fspr_status_t) fspr_file_lock(fspr_file_t *thefile, int type)
{
#ifdef _WIN32_WCE
/* The File locking is unsuported on WCE */
@ -28,12 +28,12 @@ APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
flags = ((type & APR_FLOCK_NONBLOCK) ? LOCKFILE_FAIL_IMMEDIATELY : 0)
+ (((type & APR_FLOCK_TYPEMASK) == APR_FLOCK_SHARED)
? 0 : LOCKFILE_EXCLUSIVE_LOCK);
if (apr_os_level >= APR_WIN_NT) {
if (fspr_os_level >= APR_WIN_NT) {
/* Syntax is correct, len is passed for LengthLow and LengthHigh*/
OVERLAPPED offset;
memset (&offset, 0, sizeof(offset));
if (!LockFileEx(thefile->filehand, flags, 0, len, len, &offset))
return apr_get_os_error();
return fspr_get_os_error();
}
else {
/* On Win9x, LockFile() never blocks. Hack in a crufty poll.
@ -62,23 +62,23 @@ APR_DECLARE(apr_status_t) apr_file_lock(apr_file_t *thefile, int type)
#endif /* !defined(_WIN32_WCE) */
}
APR_DECLARE(apr_status_t) apr_file_unlock(apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_unlock(fspr_file_t *thefile)
{
#ifdef _WIN32_WCE
return APR_ENOTIMPL;
#else
DWORD len = 0xffffffff;
if (apr_os_level >= APR_WIN_NT) {
if (fspr_os_level >= APR_WIN_NT) {
/* Syntax is correct, len is passed for LengthLow and LengthHigh*/
OVERLAPPED offset;
memset (&offset, 0, sizeof(offset));
if (!UnlockFileEx(thefile->filehand, 0, len, len, &offset))
return apr_get_os_error();
return fspr_get_os_error();
}
else {
if (!UnlockFile(thefile->filehand, 0, 0, len, 0))
return apr_get_os_error();
return fspr_get_os_error();
}
return APR_SUCCESS;

View File

@ -14,13 +14,13 @@
* limitations under the License.
*/
#include "apr_private.h"
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_portable.h"
#include "apr_thread_mutex.h"
#include "fspr_private.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_strings.h"
#include "fspr_portable.h"
#include "fspr_thread_mutex.h"
#if APR_HAVE_ERRNO_H
#include <errno.h>
#endif
@ -29,11 +29,11 @@
#if APR_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include "apr_arch_misc.h"
#include "apr_arch_inherit.h"
#include "fspr_arch_misc.h"
#include "fspr_arch_inherit.h"
#if APR_HAS_UNICODE_FS
apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
fspr_status_t utf8_to_unicode_path(fspr_wchar_t* retstr, fspr_size_t retlen,
const char* srcstr)
{
/* TODO: The computations could preconvert the string to determine
@ -48,9 +48,9 @@ apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
* Note that the \\?\ form only works for local drive paths, and
* \\?\UNC\ is needed UNC paths.
*/
apr_size_t srcremains = strlen(srcstr) + 1;
apr_wchar_t *t = retstr;
apr_status_t rv;
fspr_size_t srcremains = strlen(srcstr) + 1;
fspr_wchar_t *t = retstr;
fspr_status_t rv;
/* This is correct, we don't twist the filename if it is will
* definately be shorter than MAX_PATH. It merits some
@ -81,7 +81,7 @@ apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
}
}
if (rv = apr_conv_utf8_to_ucs2(srcstr, &srcremains, t, &retlen)) {
if (rv = fspr_conv_utf8_to_ucs2(srcstr, &srcremains, t, &retlen)) {
return (rv == APR_INCOMPLETE) ? APR_EINVAL : rv;
}
if (srcremains) {
@ -93,8 +93,8 @@ apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen,
return APR_SUCCESS;
}
apr_status_t unicode_to_utf8_path(char* retstr, apr_size_t retlen,
const apr_wchar_t* srcstr)
fspr_status_t unicode_to_utf8_path(char* retstr, fspr_size_t retlen,
const fspr_wchar_t* srcstr)
{
/* Skip the leading 4 characters if the path begins \\?\, or substitute
* // for the \\?\UNC\ path prefix, allocating the maximum string
@ -102,8 +102,8 @@ apr_status_t unicode_to_utf8_path(char* retstr, apr_size_t retlen,
* then transform \\'s back into /'s since the \\?\ form never
* allows '/' path seperators, and APR always uses '/'s.
*/
apr_size_t srcremains = wcslen(srcstr) + 1;
apr_status_t rv;
fspr_size_t srcremains = wcslen(srcstr) + 1;
fspr_status_t rv;
char *t = retstr;
if (srcstr[0] == L'\\' && srcstr[1] == L'\\' &&
srcstr[2] == L'?' && srcstr[3] == L'\\') {
@ -122,7 +122,7 @@ apr_status_t unicode_to_utf8_path(char* retstr, apr_size_t retlen,
}
}
if (rv = apr_conv_ucs2_to_utf8(srcstr, &srcremains, t, &retlen)) {
if (rv = fspr_conv_ucs2_to_utf8(srcstr, &srcremains, t, &retlen)) {
return rv;
}
if (srcremains) {
@ -132,17 +132,17 @@ apr_status_t unicode_to_utf8_path(char* retstr, apr_size_t retlen,
}
#endif
void *res_name_from_filename(const char *file, int global, apr_pool_t *pool)
void *res_name_from_filename(const char *file, int global, fspr_pool_t *pool)
{
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t *wpre, *wfile, *ch;
apr_size_t n = strlen(file) + 1;
apr_size_t r, d;
apr_status_t rv;
fspr_wchar_t *wpre, *wfile, *ch;
fspr_size_t n = strlen(file) + 1;
fspr_size_t r, d;
fspr_status_t rv;
if (apr_os_level >= APR_WIN_2000) {
if (fspr_os_level >= APR_WIN_2000) {
if (global)
wpre = L"Global\\";
else
@ -161,10 +161,10 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool)
--n;
}
}
wfile = apr_palloc(pool, (r + n) * sizeof(apr_wchar_t));
wfile = fspr_palloc(pool, (r + n) * sizeof(fspr_wchar_t));
wcscpy(wfile, wpre);
d = n;
if (rv = apr_conv_utf8_to_ucs2(file, &n, wfile + r, &d)) {
if (rv = fspr_conv_utf8_to_ucs2(file, &n, wfile + r, &d)) {
return NULL;
}
for (ch = wfile + r; *ch; ++ch) {
@ -178,14 +178,14 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool)
ELSE_WIN_OS_IS_ANSI
{
char *nfile, *ch;
apr_size_t n = strlen(file) + 1;
fspr_size_t n = strlen(file) + 1;
#if !APR_HAS_UNICODE_FS
apr_status_t rv;
apr_size_t r, d;
fspr_status_t rv;
fspr_size_t r, d;
char *pre;
if (apr_os_level >= APR_WIN_2000) {
if (fspr_os_level >= APR_WIN_2000) {
if (global)
pre = "Global\\";
else
@ -199,16 +199,16 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool)
file += n - 256 - r;
n = 256;
}
nfile = apr_palloc(pool, (r + n) * sizeof(apr_wchar_t));
nfile = fspr_palloc(pool, (r + n) * sizeof(fspr_wchar_t));
memcpy(nfile, pre, r);
memcpy(nfile + r, file, n);
#else
const apr_size_t r = 0;
const fspr_size_t r = 0;
if (n > 256) {
file += n - 256;
n = 256;
}
nfile = apr_pmemdup(pool, file, n);
nfile = fspr_pmemdup(pool, file, n);
#endif
for (ch = nfile + r; *ch; ++ch) {
if (*ch == ':' || *ch == '/' || *ch == '\\')
@ -220,10 +220,10 @@ void *res_name_from_filename(const char *file, int global, apr_pool_t *pool)
}
apr_status_t file_cleanup(void *thefile)
fspr_status_t file_cleanup(void *thefile)
{
apr_file_t *file = thefile;
apr_status_t flush_rv = APR_SUCCESS;
fspr_file_t *file = thefile;
fspr_status_t flush_rv = APR_SUCCESS;
if (file->filehand != INVALID_HANDLE_VALUE) {
@ -243,7 +243,7 @@ apr_status_t file_cleanup(void *thefile)
if (file->buffered) {
/* XXX: flush here is not mutex protected */
flush_rv = apr_file_flush((apr_file_t *)thefile);
flush_rv = fspr_file_flush((fspr_file_t *)thefile);
}
CloseHandle(file->filehand);
file->filehand = INVALID_HANDLE_VALUE;
@ -255,16 +255,16 @@ apr_status_t file_cleanup(void *thefile)
return flush_rv;
}
APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
apr_int32_t flag, apr_fileperms_t perm,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open(fspr_file_t **new, const char *fname,
fspr_int32_t flag, fspr_fileperms_t perm,
fspr_pool_t *pool)
{
HANDLE handle = INVALID_HANDLE_VALUE;
DWORD oflags = 0;
DWORD createflags = 0;
DWORD attributes = 0;
DWORD sharemode = FILE_SHARE_READ | FILE_SHARE_WRITE;
apr_status_t rv;
fspr_status_t rv;
if (flag & APR_READ) {
oflags |= GENERIC_READ;
@ -276,7 +276,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
oflags |= FILE_WRITE_ATTRIBUTES;
}
if (apr_os_level >= APR_WIN_NT)
if (fspr_os_level >= APR_WIN_NT)
sharemode |= FILE_SHARE_DELETE;
if (flag & APR_CREATE) {
@ -310,7 +310,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
attributes |= FILE_FLAG_OPEN_REPARSE_POINT;
}
/* Without READ or WRITE, we fail unless apr called apr_file_open
/* Without READ or WRITE, we fail unless apr called fspr_file_open
* internally with the private APR_OPENINFO flag.
*
* With the APR_OPENINFO flag on NT, use the option flag
@ -319,7 +319,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
*/
if (!(flag & (APR_READ | APR_WRITE))) {
if (flag & APR_OPENINFO) {
if (apr_os_level >= APR_WIN_NT) {
if (fspr_os_level >= APR_WIN_NT) {
attributes |= FILE_FLAG_BACKUP_SEMANTICS;
}
}
@ -340,7 +340,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wfname[APR_PATH_MAX];
fspr_wchar_t wfname[APR_PATH_MAX];
if (flag & APR_SENDFILE_ENABLED) {
/* This feature is required to enable sendfile operations
@ -351,7 +351,7 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
}
if (rv = utf8_to_unicode_path(wfname, sizeof(wfname)
/ sizeof(apr_wchar_t), fname))
/ sizeof(fspr_wchar_t), fname))
return rv;
handle = CreateFileW(wfname, oflags, sharemode,
NULL, createflags, attributes, 0);
@ -370,13 +370,13 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
}
#endif
if (handle == INVALID_HANDLE_VALUE) {
return apr_get_os_error();
return fspr_get_os_error();
}
(*new) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
(*new) = (fspr_file_t *)fspr_pcalloc(pool, sizeof(fspr_file_t));
(*new)->pool = pool;
(*new)->filehand = handle;
(*new)->fname = apr_pstrdup(pool, fname);
(*new)->fname = fspr_pstrdup(pool, fname);
(*new)->flags = flag;
(*new)->timeout = -1;
(*new)->ungetchar = -1;
@ -387,15 +387,15 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
}
if (flag & APR_BUFFERED) {
(*new)->buffered = 1;
(*new)->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
(*new)->buffer = fspr_palloc(pool, APR_FILE_BUFSIZE);
}
/* Need the mutex to handled buffered and O_APPEND style file i/o */
if ((*new)->buffered || (*new)->append) {
rv = apr_thread_mutex_create(&(*new)->mutex,
rv = fspr_thread_mutex_create(&(*new)->mutex,
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
if (file_cleanup(*new) == APR_SUCCESS) {
apr_pool_cleanup_kill(pool, *new, file_cleanup);
fspr_pool_cleanup_kill(pool, *new, file_cleanup);
}
return rv;
}
@ -403,23 +403,23 @@ APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, const char *fname,
/* Create a pollset with room for one descriptor. */
/* ### check return codes */
(void) apr_pollset_create(&(*new)->pollset, 1, pool, 0);
(void) fspr_pollset_create(&(*new)->pollset, 1, pool, 0);
if (!(flag & APR_FILE_NOCLEANUP)) {
apr_pool_cleanup_register((*new)->pool, (void *)(*new), file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*new)->pool, (void *)(*new), file_cleanup,
fspr_pool_cleanup_null);
}
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
APR_DECLARE(fspr_status_t) fspr_file_close(fspr_file_t *file)
{
apr_status_t stat;
fspr_status_t stat;
if ((stat = file_cleanup(file)) == APR_SUCCESS) {
apr_pool_cleanup_kill(file->pool, file, file_cleanup);
fspr_pool_cleanup_kill(file->pool, file, file_cleanup);
if (file->mutex) {
apr_thread_mutex_destroy(file->mutex);
fspr_thread_mutex_destroy(file->mutex);
}
return APR_SUCCESS;
@ -427,15 +427,15 @@ APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
return stat;
}
APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_remove(const char *path, fspr_pool_t *pool)
{
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
{
apr_wchar_t wpath[APR_PATH_MAX];
apr_status_t rv;
fspr_wchar_t wpath[APR_PATH_MAX];
fspr_status_t rv;
if (rv = utf8_to_unicode_path(wpath, sizeof(wpath)
/ sizeof(apr_wchar_t), path)) {
/ sizeof(fspr_wchar_t), path)) {
return rv;
}
if (DeleteFileW(wpath))
@ -447,24 +447,24 @@ APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
if (DeleteFile(path))
return APR_SUCCESS;
#endif
return apr_get_os_error();
return fspr_get_os_error();
}
APR_DECLARE(apr_status_t) apr_file_rename(const char *frompath,
APR_DECLARE(fspr_status_t) fspr_file_rename(const char *frompath,
const char *topath,
apr_pool_t *pool)
fspr_pool_t *pool)
{
IF_WIN_OS_IS_UNICODE
{
#if APR_HAS_UNICODE_FS
apr_wchar_t wfrompath[APR_PATH_MAX], wtopath[APR_PATH_MAX];
apr_status_t rv;
fspr_wchar_t wfrompath[APR_PATH_MAX], wtopath[APR_PATH_MAX];
fspr_status_t rv;
if (rv = utf8_to_unicode_path(wfrompath, sizeof(wfrompath)
/ sizeof(apr_wchar_t), frompath)) {
/ sizeof(fspr_wchar_t), frompath)) {
return rv;
}
if (rv = utf8_to_unicode_path(wtopath, sizeof(wtopath)
/ sizeof(apr_wchar_t), topath)) {
/ sizeof(fspr_wchar_t), topath)) {
return rv;
}
#ifndef _WIN32_WCE
@ -496,28 +496,28 @@ APR_DECLARE(apr_status_t) apr_file_rename(const char *frompath,
{
CloseHandle(handle);
if (!DeleteFile(topath))
return apr_get_os_error();
return fspr_get_os_error();
}
if (MoveFile(frompath, topath))
return APR_SUCCESS;
}
#endif
return apr_get_os_error();
return fspr_get_os_error();
}
APR_DECLARE(apr_status_t) apr_os_file_get(apr_os_file_t *thefile,
apr_file_t *file)
APR_DECLARE(fspr_status_t) fspr_os_file_get(fspr_os_file_t *thefile,
fspr_file_t *file)
{
*thefile = file->filehand;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_int32_t flags,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_file_put(fspr_file_t **file,
fspr_os_file_t *thefile,
fspr_int32_t flags,
fspr_pool_t *pool)
{
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file) = fspr_pcalloc(pool, sizeof(fspr_file_t));
(*file)->pool = pool;
(*file)->filehand = *thefile;
(*file)->ungetchar = -1; /* no char avail */
@ -529,16 +529,16 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
}
if (flags & APR_BUFFERED) {
(*file)->buffered = 1;
(*file)->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
(*file)->buffer = fspr_palloc(pool, APR_FILE_BUFSIZE);
}
if ((*file)->append || (*file)->buffered) {
apr_status_t rv;
rv = apr_thread_mutex_create(&(*file)->mutex,
fspr_status_t rv;
rv = fspr_thread_mutex_create(&(*file)->mutex,
APR_THREAD_MUTEX_DEFAULT, pool);
if (rv) {
if (file_cleanup(*file) == APR_SUCCESS) {
apr_pool_cleanup_kill(pool, *file, file_cleanup);
fspr_pool_cleanup_kill(pool, *file, file_cleanup);
}
return rv;
}
@ -546,7 +546,7 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
/* Create a pollset with room for one descriptor. */
/* ### check return codes */
(void) apr_pollset_create(&(*file)->pollset, 1, pool, 0);
(void) fspr_pollset_create(&(*file)->pollset, 1, pool, 0);
/* XXX... we pcalloc above so all others are zeroed.
* Should we be testing if thefile is a handle to
@ -557,7 +557,7 @@ APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file,
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
APR_DECLARE(fspr_status_t) fspr_file_eof(fspr_file_t *fptr)
{
if (fptr->eof_hit == 1) {
return APR_EOF;
@ -565,66 +565,66 @@ APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stderr(fspr_file_t **thefile, fspr_pool_t *pool)
{
#ifdef _WIN32_WCE
return APR_ENOTIMPL;
#else
apr_os_file_t file_handle;
fspr_os_file_t file_handle;
apr_set_os_error(APR_SUCCESS);
fspr_set_os_error(APR_SUCCESS);
file_handle = GetStdHandle(STD_ERROR_HANDLE);
if (!file_handle || (file_handle == INVALID_HANDLE_VALUE)) {
apr_status_t rv = apr_get_os_error();
fspr_status_t rv = fspr_get_os_error();
if (rv == APR_SUCCESS) {
return APR_EINVAL;
}
return rv;
}
return apr_os_file_put(thefile, &file_handle, 0, pool);
return fspr_os_file_put(thefile, &file_handle, 0, pool);
#endif
}
APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stdout(fspr_file_t **thefile, fspr_pool_t *pool)
{
#ifdef _WIN32_WCE
return APR_ENOTIMPL;
#else
apr_os_file_t file_handle;
fspr_os_file_t file_handle;
apr_set_os_error(APR_SUCCESS);
fspr_set_os_error(APR_SUCCESS);
file_handle = GetStdHandle(STD_OUTPUT_HANDLE);
if (!file_handle || (file_handle == INVALID_HANDLE_VALUE)) {
apr_status_t rv = apr_get_os_error();
fspr_status_t rv = fspr_get_os_error();
if (rv == APR_SUCCESS) {
return APR_EINVAL;
}
return rv;
}
return apr_os_file_put(thefile, &file_handle, 0, pool);
return fspr_os_file_put(thefile, &file_handle, 0, pool);
#endif
}
APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile, apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_open_stdin(fspr_file_t **thefile, fspr_pool_t *pool)
{
#ifdef _WIN32_WCE
return APR_ENOTIMPL;
#else
apr_os_file_t file_handle;
fspr_os_file_t file_handle;
apr_set_os_error(APR_SUCCESS);
fspr_set_os_error(APR_SUCCESS);
file_handle = GetStdHandle(STD_INPUT_HANDLE);
if (!file_handle || (file_handle == INVALID_HANDLE_VALUE)) {
apr_status_t rv = apr_get_os_error();
fspr_status_t rv = fspr_get_os_error();
if (rv == APR_SUCCESS) {
return APR_EINVAL;
}
return rv;
}
return apr_os_file_put(thefile, &file_handle, 0, pool);
return fspr_os_file_put(thefile, &file_handle, 0, pool);
#endif
}

View File

@ -14,10 +14,10 @@
* limitations under the License.
*/
#include "win32/apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "win32/fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_strings.h"
#if APR_HAVE_ERRNO_H
#include <errno.h>
#endif
@ -29,9 +29,9 @@
#if APR_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include "apr_arch_misc.h"
#include "fspr_arch_misc.h"
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_interval_time_t timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_set(fspr_file_t *thepipe, fspr_interval_time_t timeout)
{
/* Always OK to unset timeouts */
if (timeout == -1) {
@ -50,30 +50,30 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, apr_int
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_get(apr_file_t *thepipe, apr_interval_time_t *timeout)
APR_DECLARE(fspr_status_t) fspr_file_pipe_timeout_get(fspr_file_t *thepipe, fspr_interval_time_t *timeout)
{
/* Always OK to get the timeout (even if it's unset ... -1) */
*timeout = thepipe->timeout;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out, apr_pool_t *p)
APR_DECLARE(fspr_status_t) fspr_file_pipe_create(fspr_file_t **in, fspr_file_t **out, fspr_pool_t *p)
{
/* Unix creates full blocking pipes. */
return apr_create_nt_pipe(in, out, APR_FULL_BLOCK, p);
return fspr_create_nt_pipe(in, out, APR_FULL_BLOCK, p);
}
/* apr_create_nt_pipe()
* An internal (for now) APR function used by apr_proc_create()
/* fspr_create_nt_pipe()
* An internal (for now) APR function used by fspr_proc_create()
* when setting up pipes to communicate with the child process.
* apr_create_nt_pipe() allows setting the blocking mode of each end of
* fspr_create_nt_pipe() allows setting the blocking mode of each end of
* the pipe when the pipe is created (rather than after the pipe is created).
* A pipe handle must be opened in full async i/o mode in order to
* emulate Unix non-blocking pipes with timeouts.
*
* In general, we don't want to enable child side pipe handles for async i/o.
* This prevents us from enabling both ends of the pipe for async i/o in
* apr_file_pipe_create.
* fspr_file_pipe_create.
*
* Why not use NamedPipes on NT which support setting pipe state to
* non-blocking? On NT, even though you can set a pipe non-blocking,
@ -81,9 +81,9 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create(apr_file_t **in, apr_file_t **out
* WaitForSinglelObject, et. al. will not detect pipe i/o). On NT, you
* have to poll the pipe to detect i/o on a non-blocking pipe.
*/
apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
apr_int32_t blocking_mode,
apr_pool_t *p)
fspr_status_t fspr_create_nt_pipe(fspr_file_t **in, fspr_file_t **out,
fspr_int32_t blocking_mode,
fspr_pool_t *p)
{
#ifdef _WIN32_WCE
return APR_ENOTIMPL;
@ -98,7 +98,7 @@ apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = NULL;
(*in) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
(*in) = (fspr_file_t *)fspr_pcalloc(p, sizeof(fspr_file_t));
(*in)->pool = p;
(*in)->fname = NULL;
(*in)->pipe = 1;
@ -110,9 +110,9 @@ apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
(*in)->dataRead = 0;
(*in)->direction = 0;
(*in)->pOverlapped = NULL;
(void) apr_pollset_create(&(*in)->pollset, 1, p, 0);
(void) fspr_pollset_create(&(*in)->pollset, 1, p, 0);
(*out) = (apr_file_t *)apr_pcalloc(p, sizeof(apr_file_t));
(*out) = (fspr_file_t *)fspr_pcalloc(p, sizeof(fspr_file_t));
(*out)->pool = p;
(*out)->fname = NULL;
(*out)->pipe = 1;
@ -124,15 +124,15 @@ apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
(*out)->dataRead = 0;
(*out)->direction = 0;
(*out)->pOverlapped = NULL;
(void) apr_pollset_create(&(*out)->pollset, 1, p, 0);
(void) fspr_pollset_create(&(*out)->pollset, 1, p, 0);
if (apr_os_level >= APR_WIN_NT) {
if (fspr_os_level >= APR_WIN_NT) {
/* Create the read end of the pipe */
dwOpenMode = PIPE_ACCESS_INBOUND;
if (blocking_mode == APR_WRITE_BLOCK /* READ_NONBLOCK */
|| blocking_mode == APR_FULL_NONBLOCK) {
dwOpenMode |= FILE_FLAG_OVERLAPPED;
(*in)->pOverlapped = (OVERLAPPED*) apr_pcalloc(p, sizeof(OVERLAPPED));
(*in)->pOverlapped = (OVERLAPPED*) fspr_pcalloc(p, sizeof(OVERLAPPED));
(*in)->pOverlapped->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
}
@ -154,7 +154,7 @@ apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
if (blocking_mode == APR_READ_BLOCK /* WRITE_NONBLOCK */
|| blocking_mode == APR_FULL_NONBLOCK) {
dwOpenMode |= FILE_FLAG_OVERLAPPED;
(*out)->pOverlapped = (OVERLAPPED*) apr_pcalloc(p, sizeof(OVERLAPPED));
(*out)->pOverlapped = (OVERLAPPED*) fspr_pcalloc(p, sizeof(OVERLAPPED));
(*out)->pOverlapped->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
}
@ -169,22 +169,22 @@ apr_status_t apr_create_nt_pipe(apr_file_t **in, apr_file_t **out,
else {
/* Pipes on Win9* are blocking. Live with it. */
if (!CreatePipe(&(*in)->filehand, &(*out)->filehand, &sa, 65536)) {
return apr_get_os_error();
return fspr_get_os_error();
}
}
apr_pool_cleanup_register((*in)->pool, (void *)(*in), file_cleanup,
apr_pool_cleanup_null);
apr_pool_cleanup_register((*out)->pool, (void *)(*out), file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register((*in)->pool, (void *)(*in), file_cleanup,
fspr_pool_cleanup_null);
fspr_pool_cleanup_register((*out)->pool, (void *)(*out), file_cleanup,
fspr_pool_cleanup_null);
return APR_SUCCESS;
#endif /* _WIN32_WCE */
}
APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
apr_fileperms_t perm,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_file_namedpipe_create(const char *filename,
fspr_fileperms_t perm,
fspr_pool_t *pool)
{
/* Not yet implemented, interface not suitable.
* Win32 requires the named pipe to be *opened* at the time it's
@ -200,31 +200,31 @@ APR_DECLARE(apr_status_t) apr_file_namedpipe_create(const char *filename,
* would be to handle stdio-style or blocking pipes. Win32 doesn't have
* select() blocking for pipes anyways :(
*/
APR_DECLARE(apr_status_t) apr_os_pipe_put_ex(apr_file_t **file,
apr_os_file_t *thefile,
APR_DECLARE(fspr_status_t) fspr_os_pipe_put_ex(fspr_file_t **file,
fspr_os_file_t *thefile,
int register_cleanup,
apr_pool_t *pool)
fspr_pool_t *pool)
{
(*file) = apr_pcalloc(pool, sizeof(apr_file_t));
(*file) = fspr_pcalloc(pool, sizeof(fspr_file_t));
(*file)->pool = pool;
(*file)->pipe = 1;
(*file)->timeout = -1;
(*file)->ungetchar = -1;
(*file)->filehand = *thefile;
(void) apr_pollset_create(&(*file)->pollset, 1, pool, 0);
(void) fspr_pollset_create(&(*file)->pollset, 1, pool, 0);
if (register_cleanup) {
apr_pool_cleanup_register(pool, *file, file_cleanup,
apr_pool_cleanup_null);
fspr_pool_cleanup_register(pool, *file, file_cleanup,
fspr_pool_cleanup_null);
}
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
apr_os_file_t *thefile,
apr_pool_t *pool)
APR_DECLARE(fspr_status_t) fspr_os_pipe_put(fspr_file_t **file,
fspr_os_file_t *thefile,
fspr_pool_t *pool)
{
return apr_os_pipe_put_ex(file, thefile, 0, pool);
return fspr_os_pipe_put_ex(file, thefile, 0, pool);
}

View File

@ -14,23 +14,23 @@
* limitations under the License.
*/
#include "win32/apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_strings.h"
#include "apr_lib.h"
#include "apr_errno.h"
#include "win32/fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_strings.h"
#include "fspr_lib.h"
#include "fspr_errno.h"
#include <malloc.h>
#include "apr_arch_atime.h"
#include "apr_arch_misc.h"
#include "fspr_arch_atime.h"
#include "fspr_arch_misc.h"
/*
* read_with_timeout()
* Uses async i/o to emulate unix non-blocking i/o with timeouts.
*/
static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t len_in, apr_size_t *nbytes)
static fspr_status_t read_with_timeout(fspr_file_t *file, void *buf, fspr_size_t len_in, fspr_size_t *nbytes)
{
apr_status_t rv;
fspr_status_t rv;
DWORD len = (DWORD)len_in;
DWORD bytesread = 0;
@ -42,7 +42,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
if (file->pipe) {
DWORD bytes;
if (!PeekNamedPipe(file->filehand, NULL, 0, NULL, &bytes, NULL)) {
rv = apr_get_os_error();
rv = fspr_get_os_error();
if (rv == APR_FROM_OS_ERROR(ERROR_BROKEN_PIPE)) {
rv = APR_EOF;
}
@ -77,7 +77,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
*nbytes = bytesread;
if (!rv) {
rv = apr_get_os_error();
rv = fspr_get_os_error();
if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) {
/* Wait for the pending i/o */
if (file->timeout > 0) {
@ -101,7 +101,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
break;
case WAIT_FAILED:
rv = apr_get_os_error();
rv = fspr_get_os_error();
break;
default:
@ -109,7 +109,7 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
}
if (rv != APR_SUCCESS) {
if (apr_os_level >= APR_WIN_98) {
if (fspr_os_level >= APR_WIN_98) {
CancelIo(file->filehand);
}
}
@ -131,9 +131,9 @@ static apr_status_t read_with_timeout(apr_file_t *file, void *buf, apr_size_t le
return rv;
}
APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *len)
APR_DECLARE(fspr_status_t) fspr_file_read(fspr_file_t *thefile, void *buf, fspr_size_t *len)
{
apr_status_t rv;
fspr_status_t rv;
DWORD bytes_read = 0;
if (*len <= 0) {
@ -143,14 +143,14 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
/* If the file is open for xthread support, allocate and
* initialize the overlapped and io completion event (hEvent).
* Threads should NOT share an apr_file_t or its hEvent.
* Threads should NOT share an fspr_file_t or its hEvent.
*/
if ((thefile->flags & APR_XTHREAD) && !thefile->pOverlapped ) {
thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
thefile->pOverlapped = (OVERLAPPED*) fspr_pcalloc(thefile->pool,
sizeof(OVERLAPPED));
thefile->pOverlapped->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!thefile->pOverlapped->hEvent) {
rv = apr_get_os_error();
rv = fspr_get_os_error();
return rv;
}
}
@ -169,15 +169,15 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
}
if (thefile->buffered) {
char *pos = (char *)buf;
apr_size_t blocksize;
apr_size_t size = *len;
fspr_size_t blocksize;
fspr_size_t size = *len;
apr_thread_mutex_lock(thefile->mutex);
fspr_thread_mutex_lock(thefile->mutex);
if (thefile->direction == 1) {
rv = apr_file_flush(thefile);
rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS) {
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
return rv;
}
thefile->bufpos = 0;
@ -188,7 +188,7 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
rv = 0;
while (rv == 0 && size > 0) {
if (thefile->bufpos >= thefile->dataRead) {
apr_size_t read;
fspr_size_t read;
rv = read_with_timeout(thefile, thefile->buffer,
APR_FILE_BUFSIZE, &read);
if (read == 0) {
@ -214,10 +214,10 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
if (*len) {
rv = APR_SUCCESS;
}
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
} else {
/* Unbuffered i/o */
apr_size_t nbytes;
fspr_size_t nbytes;
rv = read_with_timeout(thefile, buf, *len, &nbytes);
if (rv == APR_EOF)
thefile->eof_hit = TRUE;
@ -227,35 +227,35 @@ APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size
return rv;
}
APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
APR_DECLARE(fspr_status_t) fspr_file_write(fspr_file_t *thefile, const void *buf, fspr_size_t *nbytes)
{
apr_status_t rv;
fspr_status_t rv;
DWORD bwrote;
/* If the file is open for xthread support, allocate and
* initialize the overlapped and io completion event (hEvent).
* Threads should NOT share an apr_file_t or its hEvent.
* Threads should NOT share an fspr_file_t or its hEvent.
*/
if ((thefile->flags & APR_XTHREAD) && !thefile->pOverlapped ) {
thefile->pOverlapped = (OVERLAPPED*) apr_pcalloc(thefile->pool,
thefile->pOverlapped = (OVERLAPPED*) fspr_pcalloc(thefile->pool,
sizeof(OVERLAPPED));
thefile->pOverlapped->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
if (!thefile->pOverlapped->hEvent) {
rv = apr_get_os_error();
rv = fspr_get_os_error();
return rv;
}
}
if (thefile->buffered) {
char *pos = (char *)buf;
apr_size_t blocksize;
apr_size_t size = *nbytes;
fspr_size_t blocksize;
fspr_size_t size = *nbytes;
apr_thread_mutex_lock(thefile->mutex);
fspr_thread_mutex_lock(thefile->mutex);
if (thefile->direction == 0) {
// Position file pointer for writing at the offset we are logically reading from
apr_off_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
fspr_off_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
DWORD offlo = (DWORD)offset;
DWORD offhi = (DWORD)(offset >> 32);
if (offset != thefile->filePtr)
@ -267,7 +267,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
rv = 0;
while (rv == 0 && size > 0) {
if (thefile->bufpos == APR_FILE_BUFSIZE) // write buffer is full
rv = apr_file_flush(thefile);
rv = fspr_file_flush(thefile);
blocksize = size > APR_FILE_BUFSIZE - thefile->bufpos ? APR_FILE_BUFSIZE - thefile->bufpos : size;
memcpy(thefile->buffer + thefile->bufpos, pos, blocksize);
@ -276,27 +276,27 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
size -= blocksize;
}
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
return rv;
} else {
if (!thefile->pipe) {
apr_off_t offset = 0;
apr_status_t rc;
fspr_off_t offset = 0;
fspr_status_t rc;
if (thefile->append) {
/* apr_file_lock will mutex the file across processes.
* The call to apr_thread_mutex_lock is added to avoid
/* fspr_file_lock will mutex the file across processes.
* The call to fspr_thread_mutex_lock is added to avoid
* a race condition between LockFile and WriteFile
* that occasionally leads to deadlocked threads.
*/
apr_thread_mutex_lock(thefile->mutex);
rc = apr_file_lock(thefile, APR_FLOCK_EXCLUSIVE);
fspr_thread_mutex_lock(thefile->mutex);
rc = fspr_file_lock(thefile, APR_FLOCK_EXCLUSIVE);
if (rc != APR_SUCCESS) {
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
return rc;
}
rc = apr_file_seek(thefile, APR_END, &offset);
rc = fspr_file_seek(thefile, APR_END, &offset);
if (rc != APR_SUCCESS) {
apr_thread_mutex_unlock(thefile->mutex);
fspr_thread_mutex_unlock(thefile->mutex);
return rc;
}
}
@ -307,8 +307,8 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
rv = WriteFile(thefile->filehand, buf, (DWORD)*nbytes, &bwrote,
thefile->pOverlapped);
if (thefile->append) {
apr_file_unlock(thefile);
apr_thread_mutex_unlock(thefile->mutex);
fspr_file_unlock(thefile);
fspr_thread_mutex_unlock(thefile->mutex);
}
}
else {
@ -321,7 +321,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
}
else {
(*nbytes) = 0;
rv = apr_get_os_error();
rv = fspr_get_os_error();
if (rv == APR_FROM_OS_ERROR(ERROR_IO_PENDING)) {
DWORD timeout_ms;
@ -348,13 +348,13 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
rv = APR_TIMEUP;
break;
case WAIT_FAILED:
rv = apr_get_os_error();
rv = fspr_get_os_error();
break;
default:
break;
}
if (rv != APR_SUCCESS) {
if (apr_os_level >= APR_WIN_98)
if (fspr_os_level >= APR_WIN_98)
CancelIo(thefile->filehand);
}
}
@ -368,21 +368,21 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
/* ToDo: Write for it anyway and test the oslevel!
* Too bad WriteFileGather() is not supported on 95&98 (or NT prior to SP2)
*/
APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
APR_DECLARE(fspr_status_t) fspr_file_writev(fspr_file_t *thefile,
const struct iovec *vec,
apr_size_t nvec,
apr_size_t *nbytes)
fspr_size_t nvec,
fspr_size_t *nbytes)
{
apr_status_t rv = APR_SUCCESS;
apr_size_t i;
apr_size_t bwrote = 0;
fspr_status_t rv = APR_SUCCESS;
fspr_size_t i;
fspr_size_t bwrote = 0;
char *buf;
*nbytes = 0;
for (i = 0; i < nvec; i++) {
buf = vec[i].iov_base;
bwrote = vec[i].iov_len;
rv = apr_file_write(thefile, buf, &bwrote);
rv = fspr_file_write(thefile, buf, &bwrote);
*nbytes += bwrote;
if (rv != APR_SUCCESS) {
break;
@ -391,26 +391,26 @@ APR_DECLARE(apr_status_t) apr_file_writev(apr_file_t *thefile,
return rv;
}
APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_putc(char ch, fspr_file_t *thefile)
{
apr_size_t len = 1;
fspr_size_t len = 1;
return apr_file_write(thefile, &ch, &len);
return fspr_file_write(thefile, &ch, &len);
}
APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_ungetc(char ch, fspr_file_t *thefile)
{
thefile->ungetchar = (unsigned char) ch;
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_getc(char *ch, fspr_file_t *thefile)
{
apr_status_t rc;
apr_size_t bread;
fspr_status_t rc;
fspr_size_t bread;
bread = 1;
rc = apr_file_read(thefile, ch, &bread);
rc = fspr_file_read(thefile, ch, &bread);
if (rc) {
return rc;
@ -423,22 +423,22 @@ APR_DECLARE(apr_status_t) apr_file_getc(char *ch, apr_file_t *thefile)
return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_file_puts(const char *str, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_puts(const char *str, fspr_file_t *thefile)
{
apr_size_t len = strlen(str);
fspr_size_t len = strlen(str);
return apr_file_write(thefile, str, &len);
return fspr_file_write(thefile, str, &len);
}
APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_gets(char *str, int len, fspr_file_t *thefile)
{
apr_size_t readlen;
apr_status_t rv = APR_SUCCESS;
fspr_size_t readlen;
fspr_status_t rv = APR_SUCCESS;
int i;
for (i = 0; i < len-1; i++) {
readlen = 1;
rv = apr_file_read(thefile, str+i, &readlen);
rv = fspr_file_read(thefile, str+i, &readlen);
if (rv != APR_SUCCESS && rv != APR_EOF)
return rv;
@ -459,13 +459,13 @@ APR_DECLARE(apr_status_t) apr_file_gets(char *str, int len, apr_file_t *thefile)
return rv;
}
APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
APR_DECLARE(fspr_status_t) fspr_file_flush(fspr_file_t *thefile)
{
if (thefile->buffered) {
DWORD numbytes, written = 0;
apr_status_t rc = 0;
fspr_status_t rc = 0;
char *buffer;
apr_size_t bytesleft;
fspr_size_t bytesleft;
if (thefile->direction == 1 && thefile->bufpos) {
buffer = thefile->buffer;
@ -480,7 +480,7 @@ APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
}
if (!WriteFile(thefile->filehand, buffer, numbytes, &written, NULL)) {
rc = apr_get_os_error();
rc = fspr_get_os_error();
thefile->filePtr += written;
break;
}
@ -504,17 +504,17 @@ APR_DECLARE(apr_status_t) apr_file_flush(apr_file_t *thefile)
return APR_SUCCESS;
}
struct apr_file_printf_data {
apr_vformatter_buff_t vbuff;
apr_file_t *fptr;
struct fspr_file_printf_data {
fspr_vformatter_buff_t vbuff;
fspr_file_t *fptr;
char *buf;
};
static int file_printf_flush(apr_vformatter_buff_t *buff)
static int file_printf_flush(fspr_vformatter_buff_t *buff)
{
struct apr_file_printf_data *data = (struct apr_file_printf_data *)buff;
struct fspr_file_printf_data *data = (struct fspr_file_printf_data *)buff;
if (apr_file_write_full(data->fptr, data->buf,
if (fspr_file_write_full(data->fptr, data->buf,
data->vbuff.curpos - data->buf, NULL)) {
return -1;
}
@ -523,10 +523,10 @@ static int file_printf_flush(apr_vformatter_buff_t *buff)
return 0;
}
APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
APR_DECLARE_NONSTD(int) fspr_file_printf(fspr_file_t *fptr,
const char *format, ...)
{
struct apr_file_printf_data data;
struct fspr_file_printf_data data;
va_list ap;
int count;
@ -538,10 +538,10 @@ APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t *fptr,
data.vbuff.endpos = data.buf + HUGE_STRING_LEN;
data.fptr = fptr;
va_start(ap, format);
count = apr_vformatter(file_printf_flush,
(apr_vformatter_buff_t *)&data, format, ap);
/* apr_vformatter does not call flush for the last bits */
if (count >= 0) file_printf_flush((apr_vformatter_buff_t *)&data);
count = fspr_vformatter(file_printf_flush,
(fspr_vformatter_buff_t *)&data, format, ap);
/* fspr_vformatter does not call flush for the last bits */
if (count >= 0) file_printf_flush((fspr_vformatter_buff_t *)&data);
va_end(ap);

View File

@ -14,20 +14,20 @@
* limitations under the License.
*/
#include "win32/apr_arch_file_io.h"
#include "apr_file_io.h"
#include "win32/fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include <errno.h>
#include <string.h>
static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
static fspr_status_t setptr(fspr_file_t *thefile, fspr_off_t pos )
{
apr_size_t newbufpos;
apr_status_t rv;
fspr_size_t newbufpos;
fspr_status_t rv;
DWORD rc;
if (thefile->direction == 1) {
/* XXX: flush here is not mutex protected */
rv = apr_file_flush(thefile);
rv = fspr_file_flush(thefile);
if (rv != APR_SUCCESS)
return rv;
thefile->bufpos = thefile->dataRead = 0;
@ -37,11 +37,11 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
/* We may be truncating to size here.
* XXX: testing an 'unsigned' as >= 0 below indicates a bug
*/
newbufpos = (apr_size_t)(pos - (thefile->filePtr
newbufpos = (fspr_size_t)(pos - (thefile->filePtr
- thefile->dataRead));
if (newbufpos >= 0 && newbufpos <= thefile->dataRead) {
thefile->bufpos = (apr_size_t)newbufpos;
thefile->bufpos = (fspr_size_t)newbufpos;
rv = APR_SUCCESS;
} else {
DWORD offlo = (DWORD)pos;
@ -54,7 +54,7 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
* to confirm this. INVALID_SET_FILE_POINTER is too recently
* added for us to rely on it as a constant.
*/
rv = apr_get_os_error();
rv = fspr_get_os_error();
else
rv = APR_SUCCESS;
@ -70,10 +70,10 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
}
APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t where, apr_off_t *offset)
APR_DECLARE(fspr_status_t) fspr_file_seek(fspr_file_t *thefile, fspr_seek_where_t where, fspr_off_t *offset)
{
apr_finfo_t finfo;
apr_status_t rc = APR_SUCCESS;
fspr_finfo_t finfo;
fspr_status_t rc = APR_SUCCESS;
thefile->eof_hit = 0;
@ -89,7 +89,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
break;
case APR_END:
rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
rc = fspr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
if (rc == APR_SUCCESS)
rc = setptr(thefile, finfo.size + *offset);
break;
@ -115,7 +115,7 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
break;
case APR_END:
rc = apr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
rc = fspr_file_info_get(&finfo, APR_FINFO_SIZE, thefile);
if (rc == APR_SUCCESS && finfo.size + *offset >= 0)
thefile->filePtr = finfo.size + *offset;
break;
@ -144,31 +144,31 @@ APR_DECLARE(apr_status_t) apr_file_seek(apr_file_t *thefile, apr_seek_where_t wh
offlo = SetFilePointer(thefile->filehand, (LONG)offlo,
(LONG*)&offhi, howmove);
if (offlo == 0xFFFFFFFF)
rc = apr_get_os_error();
rc = fspr_get_os_error();
else
rc = APR_SUCCESS;
/* Since we can land at 0xffffffff we will measure our APR_SUCCESS */
if (rc == APR_SUCCESS)
*offset = ((apr_off_t)offhi << 32) | offlo;
*offset = ((fspr_off_t)offhi << 32) | offlo;
return rc;
}
}
APR_DECLARE(apr_status_t) apr_file_trunc(apr_file_t *thefile, apr_off_t offset)
APR_DECLARE(fspr_status_t) fspr_file_trunc(fspr_file_t *thefile, fspr_off_t offset)
{
apr_status_t rv;
fspr_status_t rv;
DWORD offlo = (DWORD)offset;
DWORD offhi = (DWORD)(offset >> 32);
DWORD rc;
rc = SetFilePointer(thefile->filehand, offlo, &offhi, FILE_BEGIN);
if (rc == 0xFFFFFFFF)
if ((rv = apr_get_os_error()) != APR_SUCCESS)
if ((rv = fspr_get_os_error()) != APR_SUCCESS)
return rv;
if (!SetEndOfFile(thefile->filehand))
return apr_get_os_error();
return fspr_get_os_error();
if (thefile->buffered) {
return setptr(thefile, offset);

View File

@ -8,7 +8,7 @@ shift if $just_check;
my $dir = shift || '.';
my %names;
my $prefix = 'apr_';
my $prefix = 'fspr_';
while (<DATA>) {
chomp;
@ -41,7 +41,7 @@ sub replace {
while (<IN>) {
for (m/[^_\"]*$prefix($pattern)\b/og) {
$found++;
print " $file:$. apr_$_ -> apr_$names{$_}\n";
print " $file:$. fspr_$_ -> fspr_$names{$_}\n";
}
push @lines, $_ if $replace;
}
@ -66,41 +66,41 @@ sub replace {
}
__DATA__
apr_time_t:
apr_implode_gmt apr_time_exp_gmt_get
fspr_time_t:
fspr_implode_gmt fspr_time_exp_gmt_get
apr_socket_t:
apr_close_socket apr_socket_close
apr_create_socket apr_socket_create
apr_get_sockaddr apr_socket_addr_get
apr_get_socketdata apr_socket_data_get
apr_set_socketdata apr_socket_data_set
apr_shutdown apr_socket_shutdown
apr_bind apr_socket_bind
apr_listen apr_socket_listen
apr_accept apr_socket_accept
apr_connect apr_socket_connect
apr_send apr_socket_send
apr_sendv apr_socket_sendv
apr_sendto apr_socket_sendto
apr_recvfrom apr_socket_recvfrom
apr_sendfile apr_socket_sendfile
apr_recv apr_socket_recv
fspr_socket_t:
fspr_close_socket fspr_socket_close
fspr_create_socket fspr_socket_create
fspr_get_sockaddr fspr_socket_addr_get
fspr_get_socketdata fspr_socket_data_get
fspr_set_socketdata fspr_socket_data_set
fspr_shutdown fspr_socket_shutdown
fspr_bind fspr_socket_bind
fspr_listen fspr_socket_listen
fspr_accept fspr_socket_accept
fspr_connect fspr_socket_connect
fspr_send fspr_socket_send
fspr_sendv fspr_socket_sendv
fspr_sendto fspr_socket_sendto
fspr_recvfrom fspr_socket_recvfrom
fspr_sendfile fspr_socket_sendfile
fspr_recv fspr_socket_recv
apr_filepath_*:
apr_filename_of_pathname apr_filepath_name_get
fspr_filepath_*:
fspr_filename_of_pathname fspr_filepath_name_get
apr_gid_t:
apr_get_groupid apr_gid_get
apr_get_groupname apr_gid_name_get
apr_group_name_get apr_gid_name_get
apr_compare_groups apr_gid_compare
fspr_gid_t:
fspr_get_groupid fspr_gid_get
fspr_get_groupname fspr_gid_name_get
fspr_group_name_get fspr_gid_name_get
fspr_compare_groups fspr_gid_compare
apr_uid_t:
apr_get_home_directory apr_uid_homepath_get
apr_get_userid apr_uid_get
apr_current_userid apr_uid_current
apr_compare_users apr_uid_compare
apr_get_username apr_uid_name_get
apr_compare_users apr_uid_compare
fspr_uid_t:
fspr_get_home_directory fspr_uid_homepath_get
fspr_get_userid fspr_uid_get
fspr_current_userid fspr_uid_current
fspr_compare_users fspr_uid_compare
fspr_get_username fspr_uid_name_get
fspr_compare_users fspr_uid_compare

View File

@ -1,74 +0,0 @@
/* 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.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef APR_RANDOM_H
#define APR_RANDOM_H
#include <apr_pools.h>
typedef struct apr_crypto_hash_t apr_crypto_hash_t;
typedef void apr_crypto_hash_init_t(apr_crypto_hash_t *hash);
typedef void apr_crypto_hash_add_t(apr_crypto_hash_t *hash,const void *data,
apr_size_t bytes);
typedef void apr_crypto_hash_finish_t(apr_crypto_hash_t *hash,
unsigned char *result);
/* FIXME: make this opaque */
struct apr_crypto_hash_t {
apr_crypto_hash_init_t *init;
apr_crypto_hash_add_t *add;
apr_crypto_hash_finish_t *finish;
apr_size_t size;
void *data;
};
APR_DECLARE(apr_crypto_hash_t *) apr_crypto_sha256_new(apr_pool_t *p);
typedef struct apr_random_t apr_random_t;
APR_DECLARE(void) apr_random_init(apr_random_t *g,apr_pool_t *p,
apr_crypto_hash_t *pool_hash,
apr_crypto_hash_t *key_hash,
apr_crypto_hash_t *prng_hash);
APR_DECLARE(apr_random_t *) apr_random_standard_new(apr_pool_t *p);
APR_DECLARE(void) apr_random_add_entropy(apr_random_t *g,
const void *entropy_,
apr_size_t bytes);
APR_DECLARE(apr_status_t) apr_random_insecure_bytes(apr_random_t *g,
void *random,
apr_size_t bytes);
APR_DECLARE(apr_status_t) apr_random_secure_bytes(apr_random_t *g,
void *random,
apr_size_t bytes);
APR_DECLARE(void) apr_random_barrier(apr_random_t *g);
APR_DECLARE(apr_status_t) apr_random_secure_ready(apr_random_t *r);
APR_DECLARE(apr_status_t) apr_random_insecure_ready(apr_random_t *r);
/* Call this in the child after forking to mix the randomness
pools. Note that its generally a bad idea to fork a process with a
real PRNG in it - better to have the PRNG externally and get the
randomness from there. However, if you really must do it, then you
should supply all your entropy to all the PRNGs - don't worry, they
won't produce the same output.
Note that apr_proc_fork() calls this for you, so only weird
applications need ever call it themselves.
*/
struct apr_proc_t;
APR_DECLARE(void) apr_random_after_fork(struct apr_proc_t *proc);
#endif /* ndef APR_RANDOM_H */

View File

@ -17,11 +17,11 @@
#ifndef DSO_H
#define DSO_H
#include "apr_private.h"
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
#include "apr.h"
#include "fspr_private.h"
#include "fspr_general.h"
#include "fspr_pools.h"
#include "fspr_dso.h"
#include "fspr.h"
#if APR_HAS_DSO
@ -30,8 +30,8 @@ void *dlsym(void *handle, const char *symbol);
const char *dlerror(void);
int dlclose(void *handle);
struct apr_dso_handle_t {
apr_pool_t *pool;
struct fspr_dso_handle_t {
fspr_pool_t *pool;
void *handle;
const char *errormsg;
};

View File

@ -17,20 +17,20 @@
#ifndef DSO_H
#define DSO_H
#include "apr_private.h"
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_errno.h"
#include "apr_dso.h"
#include "apr.h"
#include "fspr_private.h"
#include "fspr_general.h"
#include "fspr_pools.h"
#include "fspr_errno.h"
#include "fspr_dso.h"
#include "fspr.h"
#include <kernel/image.h>
#include <string.h>
#if APR_HAS_DSO
struct apr_dso_handle_t {
struct fspr_dso_handle_t {
image_id handle; /* Handle to the DSO loaded */
apr_pool_t *pool;
fspr_pool_t *pool;
const char *errormsg; /* if the load fails, we have an error
* message here :)
*/

View File

@ -17,15 +17,15 @@
#ifndef PROC_MUTEX_H
#define PROC_MUTEX_H
#include "apr_pools.h"
#include "apr_proc_mutex.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_lib.h"
#include "apr_portable.h"
#include "fspr_pools.h"
#include "fspr_proc_mutex.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_lib.h"
#include "fspr_portable.h"
struct apr_proc_mutex_t {
apr_pool_t *pool;
struct fspr_proc_mutex_t {
fspr_pool_t *pool;
/* Our lock :) */
sem_id Lock;

View File

@ -18,23 +18,23 @@
#define THREAD_COND_H
#include <kernel/OS.h>
#include "apr_pools.h"
#include "apr_thread_cond.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_lib.h"
#include "apr_portable.h"
#include "apr_ring.h"
#include "fspr_pools.h"
#include "fspr_thread_cond.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_lib.h"
#include "fspr_portable.h"
#include "fspr_ring.h"
struct waiter_t {
APR_RING_ENTRY(waiter_t) link;
sem_id sem;
};
struct apr_thread_cond_t {
apr_pool_t *pool;
struct fspr_thread_cond_t {
fspr_pool_t *pool;
sem_id lock;
apr_thread_mutex_t *condlock;
fspr_thread_mutex_t *condlock;
thread_id owner;
/* active list */
APR_RING_HEAD(active_list, waiter_t) alist;

View File

@ -18,15 +18,15 @@
#define THREAD_MUTEX_H
#include <kernel/OS.h>
#include "apr_pools.h"
#include "apr_thread_mutex.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_lib.h"
#include "apr_portable.h"
#include "fspr_pools.h"
#include "fspr_thread_mutex.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_lib.h"
#include "fspr_portable.h"
struct apr_thread_mutex_t {
apr_pool_t *pool;
struct fspr_thread_mutex_t {
fspr_pool_t *pool;
/* Our lock :) */
sem_id Lock;
@ -34,7 +34,7 @@ struct apr_thread_mutex_t {
/* If we nest locks we need these... */
int nested;
apr_os_thread_t owner;
fspr_os_thread_t owner;
int owner_ref;
};

View File

@ -18,15 +18,15 @@
#define THREAD_RWLOCK_H
#include <kernel/OS.h>
#include "apr_pools.h"
#include "apr_thread_rwlock.h"
#include "apr_file_io.h"
#include "apr_general.h"
#include "apr_lib.h"
#include "apr_portable.h"
#include "fspr_pools.h"
#include "fspr_thread_rwlock.h"
#include "fspr_file_io.h"
#include "fspr_general.h"
#include "fspr_lib.h"
#include "fspr_portable.h"
struct apr_thread_rwlock_t {
apr_pool_t *pool;
struct fspr_thread_rwlock_t {
fspr_pool_t *pool;
/* Our lock :) */
sem_id Lock;

View File

@ -14,12 +14,12 @@
* limitations under the License.
*/
#include "apr_thread_proc.h"
#include "apr_arch_file_io.h"
#include "apr_file_io.h"
#include "apr_thread_proc.h"
#include "apr_general.h"
#include "apr_portable.h"
#include "fspr_thread_proc.h"
#include "fspr_arch_file_io.h"
#include "fspr_file_io.h"
#include "fspr_thread_proc.h"
#include "fspr_general.h"
#include "fspr_portable.h"
#include <kernel/OS.h>
#include <signal.h>
#include <string.h>
@ -39,23 +39,23 @@
#define BEOS_MAX_DATAKEYS 128
struct apr_thread_t {
apr_pool_t *pool;
struct fspr_thread_t {
fspr_pool_t *pool;
thread_id td;
void *data;
apr_thread_start_t func;
apr_status_t exitval;
fspr_thread_start_t func;
fspr_status_t exitval;
};
struct apr_threadattr_t {
apr_pool_t *pool;
struct fspr_threadattr_t {
fspr_pool_t *pool;
int32 attr;
int detached;
int joinable;
};
struct apr_threadkey_t {
apr_pool_t *pool;
struct fspr_threadkey_t {
fspr_pool_t *pool;
int32 key;
};
@ -73,20 +73,20 @@ struct beos_key {
void (* destructor) (void *);
};
struct apr_procattr_t {
apr_pool_t *pool;
apr_file_t *parent_in;
apr_file_t *child_in;
apr_file_t *parent_out;
apr_file_t *child_out;
apr_file_t *parent_err;
apr_file_t *child_err;
struct fspr_procattr_t {
fspr_pool_t *pool;
fspr_file_t *parent_in;
fspr_file_t *child_in;
fspr_file_t *parent_out;
fspr_file_t *child_out;
fspr_file_t *parent_err;
fspr_file_t *child_err;
char *currdir;
apr_int32_t cmdtype;
apr_int32_t detached;
fspr_int32_t cmdtype;
fspr_int32_t detached;
};
struct apr_thread_once_t {
struct fspr_thread_once_t {
sem_id sem;
int hit;
};

View File

@ -21,22 +21,22 @@
#ifndef APR_PRIVATE_COMMON_H
#define APR_PRIVATE_COMMON_H
#include "apr_pools.h"
#include "apr_tables.h"
#include "fspr_pools.h"
#include "fspr_tables.h"
apr_status_t apr_filepath_list_split_impl(apr_array_header_t **pathelts,
fspr_status_t fspr_filepath_list_split_impl(fspr_array_header_t **pathelts,
const char *liststr,
char separator,
apr_pool_t *p);
fspr_pool_t *p);
apr_status_t apr_filepath_list_merge_impl(char **liststr,
apr_array_header_t *pathelts,
fspr_status_t fspr_filepath_list_merge_impl(char **liststr,
fspr_array_header_t *pathelts,
char separator,
apr_pool_t *p);
fspr_pool_t *p);
/* temporary defines to handle 64bit compile mismatches */
#define APR_INT_TRUNC_CAST int
#define APR_UINT32_TRUNC_CAST apr_uint32_t
#define APR_UINT32_TRUNC_CAST fspr_uint32_t
#define APR_UINT32_MAX 0xFFFFFFFFUL
#endif /*APR_PRIVATE_COMMON_H*/

View File

@ -17,11 +17,11 @@
#ifndef DSO_H
#define DSO_H
#include "apr_private.h"
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
#include "apr.h"
#include "fspr_private.h"
#include "fspr_general.h"
#include "fspr_pools.h"
#include "fspr_dso.h"
#include "fspr.h"
#include <dlfcn.h>
@ -32,8 +32,8 @@ struct sym_list {
char *symbol;
};
struct apr_dso_handle_t {
apr_pool_t *pool;
struct fspr_dso_handle_t {
fspr_pool_t *pool;
void *handle;
const char *errormsg;
sym_list *symbols;

View File

@ -17,15 +17,15 @@
#ifndef FILE_IO_H
#define FILE_IO_H
#include "apr.h"
#include "apr_private.h"
#include "apr_general.h"
#include "apr_tables.h"
#include "apr_file_io.h"
#include "apr_file_info.h"
#include "apr_errno.h"
#include "apr_lib.h"
#include "apr_poll.h"
#include "fspr.h"
#include "fspr_private.h"
#include "fspr_general.h"
#include "fspr_tables.h"
#include "fspr_file_io.h"
#include "fspr_file_info.h"
#include "fspr_errno.h"
#include "fspr_lib.h"
#include "fspr_poll.h"
/* System headers the file I/O library needs */
#if APR_HAVE_FCNTL_H
@ -78,45 +78,45 @@
typedef struct stat struct_stat;
struct apr_file_t {
apr_pool_t *pool;
struct fspr_file_t {
fspr_pool_t *pool;
int filedes;
char *fname;
apr_int32_t flags;
fspr_int32_t flags;
int eof_hit;
int is_pipe;
apr_interval_time_t timeout;
fspr_interval_time_t timeout;
int buffered;
enum {BLK_UNKNOWN, BLK_OFF, BLK_ON } blocking;
int ungetchar; /* Last char provided by an unget op. (-1 = no char)*/
/* if there is a timeout set, then this pollset is used */
apr_pollset_t *pollset;
fspr_pollset_t *pollset;
/* Stuff for buffered mode */
char *buffer;
int bufpos; /* Read/Write position in buffer */
apr_off_t dataRead; /* amount of valid data read into buffer */
fspr_off_t dataRead; /* amount of valid data read into buffer */
int direction; /* buffer being used for 0 = read, 1 = write */
apr_off_t filePtr; /* position in file of handle */
fspr_off_t filePtr; /* position in file of handle */
#if APR_HAS_THREADS
struct apr_thread_mutex_t *thlock;
struct fspr_thread_mutex_t *thlock;
#endif
};
struct apr_dir_t {
apr_pool_t *pool;
struct fspr_dir_t {
fspr_pool_t *pool;
char *dirname;
DIR *dirstruct;
struct dirent *entry;
};
typedef struct apr_stat_entry_t apr_stat_entry_t;
typedef struct fspr_stat_entry_t fspr_stat_entry_t;
struct apr_stat_entry_t {
struct fspr_stat_entry_t {
struct stat info;
char *casedName;
apr_time_t expire;
fspr_time_t expire;
NXPathCtx_t pathCtx;
};
@ -131,21 +131,21 @@ struct apr_stat_entry_t {
* we need to fold the case to canonical form. This function is
* supposed to do so.
*/
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);
fspr_status_t filepath_root_case(char **rootpath, char *root, fspr_pool_t *p);
/* This function check to see of the given path includes a drive/volume
* specifier. If the _only_ parameter is set to DRIVE_ONLY then it
* check to see of the path only contains a drive/volume specifier and
* nothing else.
*/
apr_status_t filepath_has_drive(const char *rootpath, int only, apr_pool_t *p);
fspr_status_t filepath_has_drive(const char *rootpath, int only, fspr_pool_t *p);
/* This function compares the drive/volume specifiers for each given path.
* It returns zero if they match or non-zero if not.
*/
apr_status_t filepath_compare_drive(const char *path1, const char *path2, apr_pool_t *p);
fspr_status_t filepath_compare_drive(const char *path1, const char *path2, fspr_pool_t *p);
apr_status_t apr_unix_file_cleanup(void *);
fspr_status_t fspr_unix_file_cleanup(void *);
#endif /* ! FILE_IO_H */

View File

@ -17,12 +17,12 @@
#ifndef GLOBAL_MUTEX_H
#define GLOBAL_MUTEX_H
#include "apr_global_mutex.h"
#include "apr_thread_mutex.h"
#include "fspr_global_mutex.h"
#include "fspr_thread_mutex.h"
struct apr_global_mutex_t {
apr_pool_t *pool;
apr_thread_mutex_t *mutex;
struct fspr_global_mutex_t {
fspr_pool_t *pool;
fspr_thread_mutex_t *mutex;
};
#endif /* GLOBAL_MUTEX_H */

View File

@ -17,10 +17,10 @@
#ifndef TIME_INTERNAL_H
#define TIME_INTERNAL_H
#include "apr.h"
#include "fspr.h"
#define TZONE (*___timezone())
void apr_netware_setup_time(void);
void fspr_netware_setup_time(void);
#endif /* TIME_INTERNAL_H */

View File

@ -22,9 +22,9 @@
arch/netware and then arch/unix. But in this specific case we
want arch/win32.
*/
#include <../win32/apr_arch_networkio.h>
#include <../win32/fspr_arch_networkio.h>
#else
#include <../unix/apr_arch_networkio.h>
#include <../unix/fspr_arch_networkio.h>
#endif
#endif /* ! NETWORK_IO_H */

View File

@ -17,12 +17,12 @@
#ifndef PROC_MUTEX_H
#define PROC_MUTEX_H
#include "apr_proc_mutex.h"
#include "apr_thread_mutex.h"
#include "fspr_proc_mutex.h"
#include "fspr_thread_mutex.h"
struct apr_proc_mutex_t {
apr_pool_t *pool;
apr_thread_mutex_t *mutex;
struct fspr_proc_mutex_t {
fspr_pool_t *pool;
fspr_thread_mutex_t *mutex;
};
#endif /* PROC_MUTEX_H */

View File

@ -17,11 +17,11 @@
#ifndef THREAD_COND_H
#define THREAD_COND_H
#include "apr_thread_cond.h"
#include "fspr_thread_cond.h"
#include <nks/synch.h>
struct apr_thread_cond_t {
apr_pool_t *pool;
struct fspr_thread_cond_t {
fspr_pool_t *pool;
NXCond_t *cond;
};

View File

@ -17,11 +17,11 @@
#ifndef THREAD_MUTEX_H
#define THREAD_MUTEX_H
#include "apr_thread_mutex.h"
#include "fspr_thread_mutex.h"
#include <nks/synch.h>
struct apr_thread_mutex_t {
apr_pool_t *pool;
struct fspr_thread_mutex_t {
fspr_pool_t *pool;
NXMutex_t *mutex;
};

View File

@ -17,11 +17,11 @@
#ifndef THREAD_RWLOCK_H
#define THREAD_RWLOCK_H
#include "apr_thread_rwlock.h"
#include "fspr_thread_rwlock.h"
#include <nks/synch.h>
struct apr_thread_rwlock_t {
apr_pool_t *pool;
struct fspr_thread_rwlock_t {
fspr_pool_t *pool;
NXRwLock_t *rwlock;
};

View File

@ -14,9 +14,9 @@
* limitations under the License.
*/
#include "apr.h"
#include "apr_thread_proc.h"
#include "apr_file_io.h"
#include "fspr.h"
#include "fspr_thread_proc.h"
#include "fspr_file_io.h"
#include <sys/wait.h>
@ -26,52 +26,52 @@
#define SHELL_PATH ""
#define APR_DEFAULT_STACK_SIZE 65536
struct apr_thread_t {
apr_pool_t *pool;
struct fspr_thread_t {
fspr_pool_t *pool;
NXContext_t ctx;
NXThreadId_t td;
char *thread_name;
apr_int32_t cancel;
apr_int32_t cancel_how;
fspr_int32_t cancel;
fspr_int32_t cancel_how;
void *data;
apr_thread_start_t func;
apr_status_t exitval;
fspr_thread_start_t func;
fspr_status_t exitval;
};
struct apr_threadattr_t {
apr_pool_t *pool;
apr_size_t stack_size;
apr_int32_t detach;
struct fspr_threadattr_t {
fspr_pool_t *pool;
fspr_size_t stack_size;
fspr_int32_t detach;
char *thread_name;
};
struct apr_threadkey_t {
apr_pool_t *pool;
struct fspr_threadkey_t {
fspr_pool_t *pool;
NXKey_t key;
};
struct apr_procattr_t {
apr_pool_t *pool;
apr_file_t *parent_in;
apr_file_t *child_in;
apr_file_t *parent_out;
apr_file_t *child_out;
apr_file_t *parent_err;
apr_file_t *child_err;
struct fspr_procattr_t {
fspr_pool_t *pool;
fspr_file_t *parent_in;
fspr_file_t *child_in;
fspr_file_t *parent_out;
fspr_file_t *child_out;
fspr_file_t *parent_err;
fspr_file_t *child_err;
char *currdir;
apr_int32_t cmdtype;
apr_int32_t detached;
apr_int32_t addrspace;
fspr_int32_t cmdtype;
fspr_int32_t detached;
fspr_int32_t addrspace;
};
struct apr_thread_once_t {
struct fspr_thread_once_t {
unsigned long value;
};
//struct apr_proc_t {
// apr_pool_t *pool;
//struct fspr_proc_t {
// fspr_pool_t *pool;
// pid_t pid;
// apr_procattr_t *attr;
// fspr_procattr_t *attr;
//};
#endif /* ! THREAD_PROC_H */

View File

@ -28,7 +28,7 @@
/* Include the public APR symbols, include our idea of the 'right'
* subset of the Windows.h header. This saves us repetition.
*/
#include "apr.h"
#include "fspr.h"
#include <sys/types.h>
#include <stddef.h>
@ -185,7 +185,7 @@ void* getStatCache();
/*
* Include common private declarations.
*/
#include "../apr_private_common.h"
#include "../fspr_private_common.h"
#endif /*APR_PRIVATE_H*/
#endif /*NETWARE*/

View File

@ -1,59 +0,0 @@
/* 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.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "apr_errno.h"
#include <sys/types.h>
#include <sys/socket.h>
extern int (*apr_os2_socket)(int, int, int);
extern int (*apr_os2_select)(int *, int, int, int, long);
extern int (*apr_os2_sock_errno)();
extern int (*apr_os2_accept)(int, struct sockaddr *, int *);
extern int (*apr_os2_bind)(int, struct sockaddr *, int);
extern int (*apr_os2_connect)(int, struct sockaddr *, int);
extern int (*apr_os2_getpeername)(int, struct sockaddr *, int *);
extern int (*apr_os2_getsockname)(int, struct sockaddr *, int *);
extern int (*apr_os2_getsockopt)(int, int, int, char *, int *);
extern int (*apr_os2_ioctl)(int, int, caddr_t, int);
extern int (*apr_os2_listen)(int, int);
extern int (*apr_os2_recv)(int, char *, int, int);
extern int (*apr_os2_send)(int, const char *, int, int);
extern int (*apr_os2_setsockopt)(int, int, int, char *, int);
extern int (*apr_os2_shutdown)(int, int);
extern int (*apr_os2_soclose)(int);
extern int (*apr_os2_writev)(int, struct iovec *, int);
extern int (*apr_os2_sendto)(int, const char *, int, int, const struct sockaddr *, int);
extern int (*apr_os2_recvfrom)(int, char *, int, int, struct sockaddr *, int *);
#define socket apr_os2_socket
#define select apr_os2_select
#define sock_errno apr_os2_sock_errno
#define accept apr_os2_accept
#define bind apr_os2_bind
#define connect apr_os2_connect
#define getpeername apr_os2_getpeername
#define getsockname apr_os2_getsockname
#define getsockopt apr_os2_getsockopt
#define ioctl apr_os2_ioctl
#define listen apr_os2_listen
#define recv apr_os2_recv
#define send apr_os2_send
#define setsockopt apr_os2_setsockopt
#define shutdown apr_os2_shutdown
#define soclose apr_os2_soclose
#define writev apr_os2_writev
#define sendto apr_os2_sendto
#define recvfrom apr_os2_recvfrom

View File

@ -17,18 +17,18 @@
#ifndef DSO_H
#define DSO_H
#include "apr_private.h"
#include "apr_general.h"
#include "apr_pools.h"
#include "apr_dso.h"
#include "apr.h"
#include "fspr_private.h"
#include "fspr_general.h"
#include "fspr_pools.h"
#include "fspr_dso.h"
#include "fspr.h"
#if APR_HAS_DSO
struct apr_dso_handle_t {
apr_pool_t *cont; /* Context for returning error strings */
struct fspr_dso_handle_t {
fspr_pool_t *cont; /* Context for returning error strings */
HMODULE handle; /* Handle to the DSO loaded */
apr_status_t load_error;
fspr_status_t load_error;
char *failed_module;
};

View File

@ -17,13 +17,13 @@
#ifndef FILE_IO_H
#define FILE_IO_H
#include "apr_private.h"
#include "apr_general.h"
#include "apr_thread_mutex.h"
#include "apr_file_io.h"
#include "apr_file_info.h"
#include "apr_errno.h"
#include "apr_poll.h"
#include "fspr_private.h"
#include "fspr_general.h"
#include "fspr_thread_mutex.h"
#include "fspr_file_io.h"
#include "fspr_file_info.h"
#include "fspr_errno.h"
#include "fspr_poll.h"
/* We have an implementation of mkstemp but it's not very multi-threading
* friendly & is part of the POSIX emulation rather than native so don't
@ -33,14 +33,14 @@
#define APR_FILE_BUFSIZE 4096
struct apr_file_t {
apr_pool_t *pool;
struct fspr_file_t {
fspr_pool_t *pool;
HFILE filedes;
char * fname;
int isopen;
int buffered;
int eof_hit;
apr_int32_t flags;
fspr_int32_t flags;
int timeout;
int pipe;
HEV pipeSem;
@ -52,32 +52,32 @@ struct apr_file_t {
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
fspr_thread_mutex_t *mutex;// mutex semaphore, must be owned to access the above fields
};
struct apr_dir_t {
apr_pool_t *pool;
struct fspr_dir_t {
fspr_pool_t *pool;
char *dirname;
ULONG handle;
FILEFINDBUF3 entry;
int validentry;
};
apr_status_t apr_file_cleanup(void *);
apr_status_t apr_os2_time_to_apr_time(apr_time_t *result, FDATE os2date,
fspr_status_t fspr_file_cleanup(void *);
fspr_status_t fspr_os2_time_to_fspr_time(fspr_time_t *result, FDATE os2date,
FTIME os2time);
apr_status_t apr_apr_time_to_os2_time(FDATE *os2date, FTIME *os2time,
apr_time_t aprtime);
fspr_status_t fspr_fspr_time_to_os2_time(FDATE *os2date, FTIME *os2time,
fspr_time_t aprtime);
/* see win32/fileio.h for description of these */
extern const char c_is_fnchar[256];
#define IS_FNCHAR(c) c_is_fnchar[(unsigned char)c]
apr_status_t filepath_root_test(char *path, apr_pool_t *p);
apr_status_t filepath_drive_get(char **rootpath, char drive,
apr_int32_t flags, apr_pool_t *p);
apr_status_t filepath_root_case(char **rootpath, char *root, apr_pool_t *p);
fspr_status_t filepath_root_test(char *path, fspr_pool_t *p);
fspr_status_t filepath_drive_get(char **rootpath, char drive,
fspr_int32_t flags, fspr_pool_t *p);
fspr_status_t filepath_root_case(char **rootpath, char *root, fspr_pool_t *p);
#endif /* ! FILE_IO_H */

View File

@ -17,11 +17,11 @@
#ifndef NETWORK_IO_H
#define NETWORK_IO_H
#include "apr_private.h"
#include "apr_network_io.h"
#include "apr_general.h"
#include "apr_arch_os2calls.h"
#include "apr_poll.h"
#include "fspr_private.h"
#include "fspr_network_io.h"
#include "fspr_general.h"
#include "fspr_arch_os2calls.h"
#include "fspr_poll.h"
#if APR_HAVE_NETDB_H
#include <netdb.h>
@ -34,24 +34,24 @@ struct sock_userdata_t {
void *data;
};
struct apr_socket_t {
apr_pool_t *pool;
struct fspr_socket_t {
fspr_pool_t *pool;
int socketdes;
int type;
int protocol;
apr_sockaddr_t *local_addr;
apr_sockaddr_t *remote_addr;
apr_interval_time_t timeout;
fspr_sockaddr_t *local_addr;
fspr_sockaddr_t *remote_addr;
fspr_interval_time_t timeout;
int nonblock;
int local_port_unknown;
int local_interface_unknown;
int remote_addr_unknown;
apr_int32_t options;
apr_int32_t inherit;
fspr_int32_t options;
fspr_int32_t inherit;
sock_userdata_t *userdata;
/* if there is a timeout set, then this pollset is used */
apr_pollset_t *pollset;
fspr_pollset_t *pollset;
};
/* Error codes returned from sock_errno() */
@ -68,9 +68,9 @@ struct apr_socket_t {
#define SOCEPIPE (SOCBASEERR+32) /* Broken pipe */
#define SOCEOS2ERR (SOCBASEERR+100) /* OS/2 Error */
const char *apr_inet_ntop(int af, const void *src, char *dst, apr_size_t size);
int apr_inet_pton(int af, const char *src, void *dst);
void apr_sockaddr_vars_set(apr_sockaddr_t *, int, apr_port_t);
const char *fspr_inet_ntop(int af, const void *src, char *dst, fspr_size_t size);
int fspr_inet_pton(int af, const char *src, void *dst);
void fspr_sockaddr_vars_set(fspr_sockaddr_t *, int, fspr_port_t);
#endif /* ! NETWORK_IO_H */

Some files were not shown because too many files have changed in this diff Show More