Bug 46233 - APR does not compile universal binaries on Mac OS X 10.5
Summary: APR does not compile universal binaries on Mac OS X 10.5
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: 1.3.3
Hardware: Macintosh other
: P2 major (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-18 13:27 UTC by vincent
Modified: 2008-11-30 14:01 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vincent 2008-11-18 13:27:44 UTC
The APR configure phase does not handle correctly the universal compilation feature present on Mac OS X 10.5 (Leopard) which allow for simultaneous build of 32 and 64bit binaries on both Intel and PPC environement.

Specificaly in include/apr.h:

1. Typedefs of apr_[u]int*_t should be set to the respective [u]int*_t (from <sys/types.h>) and not be standard C types;

2. The APR_SIZEOF_VOIDP is set to 4, irrespectively of the arch. This should be replaced by something like (for gcc):

#if defined(__LP32__)
  #define APR_SIZEOF_VOIDP 4
#elif defined (__LP64__)
  #define APR_SIZEOF_VOIDP 8
#endif

Patching the include/apr.h with these two changes allows the build to finish correctly, but it would be nice to get rid of them, if possible.

Thanks!