mirror of
https://github.com/postgres/postgres.git
synced 2025-07-24 14:22:24 +03:00
-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS for all ports. It can't hurt if they are not supported, but it makes our job easier for porting. Should fix Darwin compile and other platforms without mucking with the thread detection code.
29 lines
635 B
Plaintext
29 lines
635 B
Plaintext
if test "$GCC" = yes; then
|
|
PTHREAD_CFLAGS="-pthread"
|
|
else
|
|
# The -Kno_host is for a bug in the compiler. See -hackers
|
|
# discussion on 7-8/Aug/2003.
|
|
cat >conftest.c <<__EOF__
|
|
extern char *strcpy(char *, const char *);
|
|
|
|
static void f(char *p, int n){
|
|
strcpy(p+n,"");
|
|
}
|
|
void g(void){
|
|
f(0, 0);
|
|
}
|
|
__EOF__
|
|
|
|
if $CC -c -O -Kinline conftest.c >conftest.err 2>&1; then
|
|
CFLAGS="-O -Kinline"
|
|
else
|
|
CFLAGS="-O -Kinline,no_host"
|
|
fi
|
|
rm -f conftest.*
|
|
|
|
PTHREAD_CFLAGS="-Kpthread"
|
|
fi
|
|
|
|
# Disabled because flags are required for all apps using libpq.
|
|
# Waiting to see if other platforms need this too. 2004-03-22
|