remove-darwin10-hacks.diff   [plain text]


--- include/apr.h.in.orig	2011-09-13 17:22:40.000000000 -0700
+++ include/apr.h.in	2011-09-13 17:24:02.000000000 -0700
@@ -316,42 +316,8 @@
 
 #define APR_SIZEOF_VOIDP @voidp_size@
 
-/*
- * Darwin 10's default compiler (gcc42) builds for both 64 and
- * 32 bit architectures unless specifically told not to.
- * In those cases, we need to override types depending on how
- * we're being built at compile time.
- * NOTE: This is an ugly work-around for Darwin's
- * concept of universal binaries, a single package
- * (executable, lib, etc...) which contains both 32
- * and 64 bit versions. The issue is that if APR is
- * built universally, if something else is compiled
- * against it, some bit sizes will depend on whether
- * it is 32 or 64 bit. This is determined by the __LP64__
- * flag. Since we need to support both, we have to
- * handle OS X unqiuely.
- */
-#ifdef DARWIN_10
-#undef APR_SIZEOF_VOIDP
-#undef INT64_C
-#undef UINT64_C
-#ifdef __LP64__
- typedef  long            apr_int64_t;
- typedef  unsigned long   apr_uint64_t;
- #define APR_SIZEOF_VOIDP     8
- #define INT64_C(v)   (v ## L)
- #define UINT64_C(v)  (v ## UL)
-#else
- typedef  long long            apr_int64_t;
- typedef  unsigned long long   apr_uint64_t;
- #define APR_SIZEOF_VOIDP     4
- #define INT64_C(v)   (v ## LL)
- #define UINT64_C(v)  (v ## ULL)
-#endif
-#else
  typedef  @long_value@            apr_int64_t;
  typedef  unsigned @long_value@   apr_uint64_t;
-#endif
 
 typedef  @size_t_value@          apr_size_t;
 typedef  @ssize_t_value@         apr_ssize_t;
@@ -534,43 +500,6 @@
 /* And APR_UINT64_T_HEX_FMT */
 @uint64_t_hex_fmt@
 
-/*
- * Ensure we work with universal binaries on Darwin
- */
-#ifdef DARWIN_10
-
-#undef APR_HAS_LARGE_FILES
-#undef APR_SIZEOF_VOIDP
-#undef APR_INT64_T_FMT
-#undef APR_UINT64_T_FMT
-#undef APR_UINT64_T_HEX_FMT
-
-#ifdef __LP64__
- #define APR_HAS_LARGE_FILES  0
- #define APR_SIZEOF_VOIDP     8
- #define APR_INT64_T_FMT      "ld"
- #define APR_UINT64_T_FMT     "lu"
- #define APR_UINT64_T_HEX_FMT "lx"
-#else
- #define APR_HAS_LARGE_FILES  1
- #define APR_SIZEOF_VOIDP     4
- #define APR_INT64_T_FMT      "lld"
- #define APR_UINT64_T_FMT     "llu"
- #define APR_UINT64_T_HEX_FMT "llx"
-#endif
-
-#undef APR_IS_BIGENDIAN
-#ifdef __BIG_ENDIAN__
- #define APR_IS_BIGENDIAN	1
-#else
- #define APR_IS_BIGENDIAN	0
-#endif
-
-#undef APR_OFF_T_FMT
-#define APR_OFF_T_FMT "lld"
-
-#endif /* DARWIN_10 */
-
 /* Does the proc mutex lock threads too */
 #define APR_PROC_MUTEX_IS_GLOBAL      @proc_mutex_is_global@
 
--- include/arch/unix/apr_private.h.in.orig	2011-09-13 17:22:49.000000000 -0700
+++ include/arch/unix/apr_private.h.in	2011-09-13 17:23:11.000000000 -0700
@@ -932,60 +932,6 @@
 #endif
 
 /*
- * Darwin 10's default compiler (gcc42) builds for both 64 and
- * 32 bit architectures unless specifically told not to.
- * In those cases, we need to override types depending on how
- * we're being built at compile time.
- * NOTE: This is an ugly work-around for Darwin's
- * concept of universal binaries, a single package
- * (executable, lib, etc...) which contains both 32
- * and 64 bit versions. The issue is that if APR is
- * built universally, if something else is compiled
- * against it, some bit sizes will depend on whether
- * it is 32 or 64 bit. This is determined by the __LP64__
- * flag. Since we need to support both, we have to
- * handle OS X unqiuely.
- */
-#ifdef DARWIN_10
-
-#undef APR_OFF_T_STRFN
-#undef APR_INT64_STRFN
-#undef SIZEOF_LONG
-#undef SIZEOF_SIZE_T
-#undef SIZEOF_SSIZE_T
-#undef SIZEOF_VOIDP
-#undef SIZEOF_STRUCT_IOVEC
-
-#ifdef __LP64__
- #define APR_INT64_STRFN strtol
- #define SIZEOF_LONG    8
- #define SIZEOF_SIZE_T  8
- #define SIZEOF_SSIZE_T 8
- #define SIZEOF_VOIDP   8
- #define SIZEOF_STRUCT_IOVEC 16
-#else
- #define APR_INT64_STRFN strtoll
- #define SIZEOF_LONG    4
- #define SIZEOF_SIZE_T  4
- #define SIZEOF_SSIZE_T 4
- #define SIZEOF_VOIDP   4
- #define SIZEOF_STRUCT_IOVEC 8
-#endif
-
-#undef APR_OFF_T_STRFN
-#define APR_OFF_T_STRFN APR_INT64_STRFN
- 
-
-#undef SETPGRP_VOID
-#ifdef __DARWIN_UNIX03
- #define SETPGRP_VOID 1
-#else
-/* #undef SETPGRP_VOID */
-#endif
- 
-#endif /* DARWIN_10 */
-
-/*
  * Include common private declarations.
  */
 #include "../apr_private_common.h"