1--- file_io/unix/dir-32-bit-inode.c.orig 2007-04-17 17:29:51.000000000 -0700 2+++ file_io/unix/dir-32-bit-inode.c 2009-01-09 00:56:35.000000000 -0800 3@@ -0,0 +1,14 @@ 4+/* 5+ * We assumes that 64-bit inodes are on by default, so we build the 32-bit 6+ * inode (undecorated) variants here (unless the platform only supports 7+ * 64-bit inodes, then which we do nothing). 8+ */ 9+ 10+#undef __DARWIN_64_BIT_INO_T 11+#define __DARWIN_64_BIT_INO_T 0 12+#include <sys/cdefs.h> 13+ 14+#if __DARWIN_ONLY_64_BIT_INO_T == 0 15+#define __DARWIN_APR_BUILDING_32_BIT_INODE 16+#include "dir.c" 17+#endif /* __DARWIN_ONLY_64_BIT_INO_T == 0 */ 18--- file_io/unix/dir.c.orig 2007-04-17 17:29:51.000000000 -0700 19+++ file_io/unix/dir.c 2009-01-09 00:56:31.000000000 -0800 20@@ -24,7 +24,10 @@ 21 #include <limits.h> 22 #endif 23 24-static apr_status_t dir_cleanup(void *thedir) 25+#ifdef __DARWIN_APR_BUILDING_32_BIT_INODE 26+__private_extern__ apr_status_t dir_cleanup(void *thedir); 27+#else /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 28+__private_extern__ apr_status_t dir_cleanup(void *thedir) 29 { 30 apr_dir_t *dir = thedir; 31 if (closedir(dir->dirstruct) == 0) { 32@@ -67,6 +70,7 @@ 33 34 return apr_pstrndup (pool, path, (i < 0) ? 0 : i); 35 } 36+#endif /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 37 38 apr_status_t apr_dir_open(apr_dir_t **new, const char *dirname, 39 apr_pool_t *pool) 40@@ -97,13 +101,18 @@ 41 return APR_SUCCESS; 42 } 43 44+#ifndef __DARWIN_APR_BUILDING_32_BIT_INODE 45 apr_status_t apr_dir_close(apr_dir_t *thedir) 46 { 47 return apr_pool_cleanup_run(thedir->pool, thedir, dir_cleanup); 48 } 49+#endif /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 50 51 #ifdef DIRENT_TYPE 52-static apr_filetype_e filetype_from_dirent_type(int type) 53+#ifdef __DARWIN_APR_BUILDING_32_BIT_INODE 54+__private_extern__ apr_filetype_e filetype_from_dirent_type(int type); 55+#else /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 56+__private_extern__ apr_filetype_e filetype_from_dirent_type(int type) 57 { 58 switch (type) { 59 case DT_REG: 60@@ -128,6 +137,7 @@ 61 return APR_UNKFILE; 62 } 63 } 64+#endif /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 65 #endif 66 67 apr_status_t apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, 68@@ -285,6 +295,7 @@ 69 return APR_SUCCESS; 70 } 71 72+#ifndef __DARWIN_APR_BUILDING_32_BIT_INODE 73 apr_status_t apr_dir_make(const char *path, apr_fileperms_t perm, 74 apr_pool_t *pool) 75 { 76@@ -356,4 +367,4 @@ 77 return APR_SUCCESS; 78 } 79 80- 81+#endif /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 82--- file_io/unix/filestat-32-bit-inode.c.orig 2007-10-16 20:35:55.000000000 -0700 83+++ file_io/unix/filestat-32-bit-inode.c 2009-01-09 00:59:53.000000000 -0800 84@@ -0,0 +1,14 @@ 85+/* 86+ * We assumes that 64-bit inodes are on by default, so we build the 32-bit 87+ * inode (undecorated) variants here (unless the platform only supports 88+ * 64-bit inodes, then which we do nothing). 89+ */ 90+ 91+#undef __DARWIN_64_BIT_INO_T 92+#define __DARWIN_64_BIT_INO_T 0 93+#include <sys/cdefs.h> 94+ 95+#if __DARWIN_ONLY_64_BIT_INO_T == 0 96+#define __DARWIN_APR_BUILDING_32_BIT_INODE 97+#include "filestat.c" 98+#endif /* __DARWIN_ONLY_64_BIT_INO_T == 0 */ 99--- file_io/unix/filestat.c.orig 2007-10-16 20:35:55.000000000 -0700 100+++ file_io/unix/filestat.c 2009-01-09 01:08:16.000000000 -0800 101@@ -24,7 +24,10 @@ 102 #include <utime.h> 103 #endif 104 105-static apr_filetype_e filetype_from_mode(mode_t mode) 106+#ifdef __DARWIN_APR_BUILDING_32_BIT_INODE 107+__private_extern__ apr_filetype_e filetype_from_mode(mode_t mode); 108+#else /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 109+__private_extern__ apr_filetype_e filetype_from_mode(mode_t mode) 110 { 111 apr_filetype_e type; 112 113@@ -66,6 +69,7 @@ 114 } 115 return type; 116 } 117+#endif /* __DARWIN_APR_BUILDING_32_BIT_INODE */ 118 119 static void fill_out_finfo(apr_finfo_t *finfo, struct_stat *info, 120 apr_int32_t wanted) 121@@ -171,6 +175,7 @@ 122 } 123 } 124 125+#ifndef __DARWIN_APR_BUILDING_32_BIT_INODE 126 APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname, 127 apr_fileperms_t perms) 128 { 129@@ -279,6 +284,7 @@ 130 131 return APR_SUCCESS; 132 } 133+#endif /* !__DARWIN_APR_BUILDING_32_BIT_INODE */ 134 135 136 APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, 137--- include/apr_file_info.h.orig 2007-10-23 21:40:33.000000000 -0700 138+++ include/apr_file_info.h 2009-01-09 00:22:53.000000000 -0800 139@@ -227,7 +227,8 @@ 140 * to verify that what you're looking for is there. 141 */ 142 APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, const char *fname, 143- apr_int32_t wanted, apr_pool_t *pool); 144+ apr_int32_t wanted, apr_pool_t *pool) 145+ __DARWIN_INODE64(apr_stat); 146 147 /** @} */ 148 /** 149@@ -243,7 +244,8 @@ 150 */ 151 APR_DECLARE(apr_status_t) apr_dir_open(apr_dir_t **new_dir, 152 const char *dirname, 153- apr_pool_t *pool); 154+ apr_pool_t *pool) 155+ __DARWIN_INODE64(apr_dir_open); 156 157 /** 158 * close the specified directory. 159@@ -265,13 +267,15 @@ 160 * entries are available, APR_ENOENT is returned. 161 */ 162 APR_DECLARE(apr_status_t) apr_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, 163- apr_dir_t *thedir); 164+ apr_dir_t *thedir) 165+ __DARWIN_INODE64(apr_dir_read); 166 167 /** 168 * Rewind the directory to the first entry. 169 * @param thedir the directory descriptor to rewind. 170 */ 171-APR_DECLARE(apr_status_t) apr_dir_rewind(apr_dir_t *thedir); 172+APR_DECLARE(apr_status_t) apr_dir_rewind(apr_dir_t *thedir) 173+ __DARWIN_INODE64(apr_dir_rewind); 174 /** @} */ 175 176 /** 177--- include/apr_file_io.h.orig 2007-11-05 19:13:42.000000000 -0800 178+++ include/apr_file_io.h 2009-01-09 00:23:36.000000000 -0800 179@@ -870,7 +870,8 @@ 180 */ 181 APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, 182 apr_int32_t wanted, 183- apr_file_t *thefile); 184+ apr_file_t *thefile) 185+ __DARWIN_INODE64(apr_file_info_get); 186 187 188 /** 189--- include/arch/unix/apr_arch_file_io.h.orig 2007-10-16 20:13:55.000000000 -0700 190+++ include/arch/unix/apr_arch_file_io.h 2009-01-09 03:46:05.000000000 -0800 191@@ -167,7 +167,8 @@ 192 193 apr_status_t apr_file_flush_locked(apr_file_t *thefile); 194 apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted, 195- apr_file_t *thefile); 196+ apr_file_t *thefile) 197+ __DARWIN_INODE64(apr_file_info_get_locked); 198 199 200 #endif /* ! FILE_IO_H */ 201--- build-outputs.mk 2010-01-20 23:59:44.000000000 -0800 202+++ build-outputs.mk 2010-11-11 15:10:48.000000000 -0800 203@@ -32,8 +32,12 @@ 204 file_io/unix/readwrite.lo: file_io/unix/readwrite.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_strings.h include/apr_support.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h 205 file_io/unix/seek.lo: file_io/unix/seek.c .make.dirs 206 file_io/unix/tempdir.lo: file_io/unix/tempdir.c .make.dirs include/apr_allocator.h include/apr_env.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_inherit.h include/apr_pools.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_time.h include/apr_user.h include/apr_want.h 207+file_io/unix/dir-32-bit-inode.lo: file_io/unix/dir-32-bit-inode.c .make.dirs 208+file_io/unix/filestat-32-bit-inode.lo: file_io/unix/filestat-32-bit-inode.c .make.dirs 209 210 OBJECTS_file_io_unix = file_io/unix/buffer.lo file_io/unix/copy.lo file_io/unix/dir.lo file_io/unix/fileacc.lo file_io/unix/filedup.lo file_io/unix/filepath.lo file_io/unix/filepath_util.lo file_io/unix/filestat.lo file_io/unix/flock.lo file_io/unix/fullrw.lo file_io/unix/mktemp.lo file_io/unix/open.lo file_io/unix/pipe.lo file_io/unix/readwrite.lo file_io/unix/seek.lo file_io/unix/tempdir.lo 211+OBJECTS_file_io_unix += file_io/unix/dir-32-bit-inode.lo 212+OBJECTS_file_io_unix += file_io/unix/filestat-32-bit-inode.lo 213 214 locks/unix/global_mutex.lo: locks/unix/global_mutex.c .make.dirs include/apr_allocator.h include/apr_dso.h include/apr_errno.h include/apr_file_info.h include/apr_file_io.h include/apr_general.h include/apr_global_mutex.h include/apr_inherit.h include/apr_network_io.h include/apr_pools.h include/apr_portable.h include/apr_proc_mutex.h include/apr_shm.h include/apr_strings.h include/apr_tables.h include/apr_thread_mutex.h include/apr_thread_proc.h include/apr_time.h include/apr_user.h include/apr_want.h 215 locks/unix/proc_mutex.lo: locks/unix/proc_mutex.c .make.dirs include/apr_allocator.h include/apr_errno.h include/apr_general.h include/apr_hash.h include/apr_pools.h include/apr_strings.h include/apr_thread_mutex.h include/apr_want.h 216