Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitffa3bfb

Browse files
committed
Move thread os defines into template files.
1 parent467839d commitffa3bfb

File tree

6 files changed

+43
-51
lines changed

6 files changed

+43
-51
lines changed

‎configure

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3903,41 +3903,24 @@ echo "$as_me: error: pthread.h not found, required for --with-threads" >&2;}
39033903
fi
39043904
39053905
3906-
case$host_osin
3907-
netbsd*|bsdi*)
3908-
# these require no special flags or libraries
3909-
NEED_REENTRANT_FUNC_NAMES=no
3910-
;;
3911-
freebsd2*|freebsd3*|freebsd4*)
3912-
THREAD_CFLAGS="-pthread"
3913-
NEED_REENTRANT_FUNC_NAMES=yes
3914-
;;
3915-
freebsd*)
3916-
THREAD_LIBS="-lc_r"
3917-
NEED_REENTRANT_FUNC_NAMES=yes
3918-
;;
3919-
linux*) THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
3920-
THREAD_LIBS="-lpthread"
3921-
NEED_REENTRANT_FUNC_NAMES=yes
3922-
;;
3923-
*)
3924-
# other operating systems might fail because they have pthread.h but need
3925-
# special libs we don't know about yet.
3926-
{ {echo"$as_me:$LINENO: error:
3906+
3907+
iftest"$SUPPORTS_THREADS"!= yes;then
3908+
{ {echo"$as_me:$LINENO: error:
39273909
Cannot enable threads on your platform.
39283910
Please report your platform threading info to the PostgreSQL mailing lists
3929-
so it can be added to the next release. Report any compileor link flags,
3930-
or libraries required for threading support.
3911+
so it can be added to the next release. Report any compileflags, link flags,
3912+
functions,or libraries required for threading support.
39313913
">&5
39323914
echo"$as_me: error:
39333915
Cannot enable threads on your platform.
39343916
Please report your platform threading info to the PostgreSQL mailing lists
3935-
so it can be added to the next release. Report any compileor link flags,
3936-
or libraries required for threading support.
3917+
so it can be added to the next release. Report any compileflags, link flags,
3918+
functions,or libraries required for threading support.
39373919
">&2;}
39383920
{ (exit 1);exit 1; }; }
3939-
esac
39403921
fi
3922+
fi
3923+
39413924
39423925
39433926

‎configure.in

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.263 2003/06/1417:49:53 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.264 2003/06/1419:21:42 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -560,37 +560,20 @@ AC_SUBST(ELF_SYS)
560560
NEED_REENTRANT_FUNC_NAMES=no
561561
if test "$with_threads" = yes; then
562562
AC_CHECK_HEADER(pthread.h, [], [AC_MSG_ERROR([pthread.h not found, required for --with-threads])])
563-
case $host_os in
564-
netbsd*|bsdi*)
565-
# these require no special flags or libraries
566-
NEED_REENTRANT_FUNC_NAMES=no
567-
;;
568-
freebsd2*|freebsd3*|freebsd4*)
569-
THREAD_CFLAGS="-pthread"
570-
NEED_REENTRANT_FUNC_NAMES=yes
571-
;;
572-
freebsd*)
573-
THREAD_LIBS="-lc_r"
574-
NEED_REENTRANT_FUNC_NAMES=yes
575-
;;
576-
linux*) THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
577-
THREAD_LIBS="-lpthread"
578-
NEED_REENTRANT_FUNC_NAMES=yes
579-
;;
580-
*)
581-
# other operating systems might fail because they have pthread.h but need
582-
# special libs we don't know about yet.
583-
AC_MSG_ERROR([
563+
564+
if test "$SUPPORTS_THREADS" != yes; then
565+
AC_MSG_ERROR([
584566
Cannot enable threads on your platform.
585567
Please report your platform threading info to the PostgreSQL mailing lists
586-
so it can be added to the next release. Report any compileor link flags,
587-
or libraries required for threading support.
568+
so it can be added to the next release. Report any compileflags, link flags,
569+
functions,or libraries required for threading support.
588570
])
589-
esac
571+
fi
590572
fi
591573
AC_SUBST(THREAD_CFLAGS)
592574
AC_SUBST(THREAD_LIBS)
593575

576+
594577
#
595578
# Assignments
596579
#

‎src/template/bsdi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ case $host_os in
99
CC=gcc2
1010
;;
1111
esac
12+
13+
SUPPORTS_THREADS=yes
14+
NEED_REENTRANT_FUNC_NAMES=no
15+

‎src/template/freebsd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,15 @@ CFLAGS='-pipe'
33
case $host_cpu in
44
alpha*) CFLAGS="$CFLAGS -O" ;;
55
esac
6+
7+
SUPPORTS_THREADS=yes
8+
case $host_os in
9+
freebsd2*|freebsd3*|freebsd4*)
10+
THREAD_CFLAGS="-pthread"
11+
NEED_REENTRANT_FUNC_NAMES=yes
12+
;;
13+
*)
14+
THREAD_LIBS="-lc_r"
15+
NEED_REENTRANT_FUNC_NAMES=yes
16+
;;
17+
esac

‎src/template/linux

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
CFLAGS=-O2
2+
3+
SUPPORTS_THREADS=yes
4+
THREAD_CFLAGS="-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
5+
THREAD_LIBS="-lpthread"
6+
NEED_REENTRANT_FUNC_NAMES=yes
7+

‎src/template/netbsd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
CFLAGS='-O2 -pipe'
2+
3+
SUPPORTS_THREADS=yes
4+
NEED_REENTRANT_FUNC_NAMES=no
5+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp