I'm running into a problem building SQLite 3.5.1 targeting a minimum of Mac OS X 10.3, but building against the 10.4 (Universal) SDK.

The problem is that the 10.4 SDK does name mangling on the pthread_join symbol in some cases. Specifically, if the _XOPEN_SOURCE symbol is defined, pthread_join gets mangled to pthread_join$UNIX2003, which is a symbol that is not available in 10.3.

Building with --enable-threadsafe tends to want to define the _XOPEN_SYMBOL (in sqliteInt.h). I noticed that if the symbol __MACOS__ is defined, sqliteInt.h, won't define _XOPEN_SOURCE. However, if __MACOS__ is defined, shell.c won't compile with the following errors:

/src/shell.c:35:22: error: console.h: No such file or directory
./src/shell.c:38:21: error: extras.h: No such file or directory
./src/shell.c:39:20: error: Files.h: No such file or directory
./src/shell.c:40:22: error: Folders.h: No such file or directory
./src/shell.c: In function 'find_home_dir':
./src/shell.c:1714: error: '_MAX_PATH' undeclared (first use in this function) ./src/shell.c:1714: error: (Each undeclared identifier is reported only once
./src/shell.c:1714: error: for each function it appears in.)

If I simply #undef __MACOS__ in shell.c, right before the conditional includes, it compiles and everything *seems* to work. However, I'm not confident that I'm actually thread safe if I'm defining __MACOS__ and just undef'ing the symbol in shell.c seems a little suspect.

Does anyone have any experience with this, or any suggestions?

--Peter Johnson
[EMAIL PROTECTED]

This email is PRIVILEGED AND CONFIDENTIAL to Zattoo Inc.



Reply via email to