Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
732f2fda
Commit
732f2fda
authored
Jul 10, 2004
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --enable-thread-safety-force to force a thread compile even if the
OS thread tests fail.
parent
45254184
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
17 deletions
+91
-17
configure
configure
+66
-10
configure.in
configure.in
+25
-7
No files found.
configure
View file @
732f2fda
...
@@ -846,6 +846,7 @@ Optional Features:
...
@@ -846,6 +846,7 @@ Optional Features:
--enable-depend turn on automatic dependency tracking
--enable-depend turn on automatic dependency tracking
--enable-cassert enable assertion checks (for debugging)
--enable-cassert enable assertion checks (for debugging)
--enable-thread-safety make client libraries thread-safe
--enable-thread-safety make client libraries thread-safe
--enable-thread-safety-force force thread-safety in spite of thread test failure
--disable-largefile omit support for large files
--disable-largefile omit support for large files
Optional Packages:
Optional Packages:
...
@@ -2937,11 +2938,7 @@ if test "${enable_thread_safety+set}" = set; then
...
@@ -2937,11 +2938,7 @@ if test "${enable_thread_safety+set}" = set; then
case
$enableval
in
case
$enableval
in
yes
)
yes
)
:
cat
>>
confdefs.h
<<
\
_ACEOF
#define ENABLE_THREAD_SAFETY 1
_ACEOF
;;
;;
no
)
no
)
:
:
...
@@ -2958,6 +2955,40 @@ else
...
@@ -2958,6 +2955,40 @@ else
fi
;
fi
;
# Check whether --enable-thread-safety-force or --disable-thread-safety-force was given.
if
test
"
${
enable_thread_safety_force
+set
}
"
=
set
;
then
enableval
=
"
$enable_thread_safety_force
"
case
$enableval
in
yes
)
:
;;
no
)
:
;;
*
)
{
{
echo
"
$as_me
:
$LINENO
: error: no argument expected for --enable-thread-safety-force option"
>
&5
echo
"
$as_me
: error: no argument expected for --enable-thread-safety-force option"
>
&2
;
}
{
(
exit
1
)
;
exit
1
;
}
;
}
;;
esac
else
enable_thread_safety_force
=
no
fi
;
if
test
"
$enable_thread_safety
"
=
yes
-o
test
"
$enable_thread_safety_force
"
=
yes
;
then
enable_thread_safety
=
"yes"
# for 'force'
cat
>>
confdefs.h
<<
\
_ACEOF
#define ENABLE_THREAD_SAFETY 1
_ACEOF
fi
echo
"
$as_me
:
$LINENO
: result:
$enable_thread_safety
"
>
&5
echo
"
$as_me
:
$LINENO
: result:
$enable_thread_safety
"
>
&5
echo
"
${
ECHO_T
}
$enable_thread_safety
"
>
&6
echo
"
${
ECHO_T
}
$enable_thread_safety
"
>
&6
...
@@ -17941,7 +17972,20 @@ done
...
@@ -17941,7 +17972,20 @@ done
# We have to run the thread test near the end so we have all our symbols
# We have to run the thread test near the end so we have all our symbols
# defined. Cross compiling throws a warning.
# defined. Cross compiling throws a warning.
#
#
if
test
"
$enable_thread_safety
"
=
yes
;
then
if
test
"
$enable_thread_safety_force
"
=
yes
;
then
{
echo
"
$as_me
:
$LINENO
: WARNING:
*** Skipping thread test program. --enable-thread-safety-force was used.
*** Run the program in src/tools/thread on the your machine and add
proper locking function calls to your applications to guarantee thread
safety.
"
>
&5
echo
"
$as_me
: WARNING:
*** Skipping thread test program. --enable-thread-safety-force was used.
*** Run the program in src/tools/thread on the your machine and add
proper locking function calls to your applications to guarantee thread
safety.
"
>
&2
;
}
elif
test
"
$enable_thread_safety
"
=
yes
;
then
echo
"
$as_me
:
$LINENO
: checking thread safety of required library functions"
>
&5
echo
"
$as_me
:
$LINENO
: checking thread safety of required library functions"
>
&5
echo
$ECHO_N
"checking thread safety of required library functions...
$ECHO_C
"
>
&6
echo
$ECHO_N
"checking thread safety of required library functions...
$ECHO_C
"
>
&6
...
@@ -17954,11 +17998,11 @@ if test "$cross_compiling" = yes; then
...
@@ -17954,11 +17998,11 @@ if test "$cross_compiling" = yes; then
echo
"
${
ECHO_T
}
maybe"
>
&6
echo
"
${
ECHO_T
}
maybe"
>
&6
{
echo
"
$as_me
:
$LINENO
: WARNING:
{
echo
"
$as_me
:
$LINENO
: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/tools/thread on the target ma
t
chine.
*** Run the program in src/tools/thread on the target machine.
"
>
&5
"
>
&5
echo
"
$as_me
: WARNING:
echo
"
$as_me
: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/tools/thread on the target ma
t
chine.
*** Run the program in src/tools/thread on the target machine.
"
>
&2
;
}
"
>
&2
;
}
else
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
cat
>
conftest.
$ac_ext
<<
_ACEOF
...
@@ -17988,10 +18032,22 @@ echo "$as_me:$LINENO: result: no" >&5
...
@@ -17988,10 +18032,22 @@ echo "$as_me:$LINENO: result: no" >&5
echo
"
${
ECHO_T
}
no"
>
&6
echo
"
${
ECHO_T
}
no"
>
&6
{
{
echo
"
$as_me
:
$LINENO
: error:
{
{
echo
"
$as_me
:
$LINENO
: error:
*** Thread test program failed. Your platform is not thread-safe.
*** Thread test program failed. Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason."
>
&5
*** Check the file 'config.log'for the exact reason.
***
*** You can use the configure option --enable-thread-safety-force
*** to force threads to be enabled. However, you must then run
*** the program in src/tools/thread and add locking function calls
*** to your applications to guarantee thread safety.
"
>
&5
echo
"
$as_me
: error:
echo
"
$as_me
: error:
*** Thread test program failed. Your platform is not thread-safe.
*** Thread test program failed. Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason."
>
&2
;
}
*** Check the file 'config.log'for the exact reason.
***
*** You can use the configure option --enable-thread-safety-force
*** to force threads to be enabled. However, you must then run
*** the program in src/tools/thread and add locking function calls
*** to your applications to guarantee thread safety.
"
>
&2
;
}
{
(
exit
1
)
;
exit
1
;
}
;
}
{
(
exit
1
)
;
exit
1
;
}
;
}
fi
fi
rm
-f
core core.
*
*
.core conftest
$ac_exeext
conftest.
$ac_objext
conftest.
$ac_ext
rm
-f
core core.
*
*
.core conftest
$ac_exeext
conftest.
$ac_objext
conftest.
$ac_ext
...
...
configure.in
View file @
732f2fda
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.36
5 2004/06/24 18:55:18 tgl
Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.36
6 2004/07/10 01:24:29 momjian
Exp $
dnl
dnl
dnl Developers, please strive to achieve this order:
dnl Developers, please strive to achieve this order:
dnl
dnl
...
@@ -358,9 +358,14 @@ IFS=$ac_save_IFS
...
@@ -358,9 +358,14 @@ IFS=$ac_save_IFS
# Enable thread-safe client libraries
# Enable thread-safe client libraries
#
#
AC_MSG_CHECKING([allow thread-safe client libraries])
AC_MSG_CHECKING([allow thread-safe client libraries])
PGAC_ARG_BOOL(enable, thread-safety, no, [ --enable-thread-safety make client libraries thread-safe],
PGAC_ARG_BOOL(enable, thread-safety, no, [ --enable-thread-safety make client libraries thread-safe])
[AC_DEFINE([ENABLE_THREAD_SAFETY], 1,
PGAC_ARG_BOOL(enable, thread-safety-force, no, [ --enable-thread-safety-force force thread-safety in spite of thread test failure])
[Define to 1 to build client libraries as thread-safe code. (--enable-thread-safety)])])
if test "$enable_thread_safety" = yes -o
test "$enable_thread_safety_force" = yes; then
enable_thread_safety="yes" # for 'force'
AC_DEFINE([ENABLE_THREAD_SAFETY], 1,
[Define to 1 to build client libraries as thread-safe code. (--enable-thread-safety)])
fi
AC_MSG_RESULT([$enable_thread_safety])
AC_MSG_RESULT([$enable_thread_safety])
AC_SUBST(enable_thread_safety)
AC_SUBST(enable_thread_safety)
...
@@ -1184,7 +1189,14 @@ AC_CHECK_PROGS(SGMLSPL, sgmlspl)
...
@@ -1184,7 +1189,14 @@ AC_CHECK_PROGS(SGMLSPL, sgmlspl)
# We have to run the thread test near the end so we have all our symbols
# We have to run the thread test near the end so we have all our symbols
# defined. Cross compiling throws a warning.
# defined. Cross compiling throws a warning.
#
#
if test "$enable_thread_safety" = yes; then
if test "$enable_thread_safety_force" = yes; then
AC_MSG_WARN([
*** Skipping thread test program. --enable-thread-safety-force was used.
*** Run the program in src/tools/thread on the your machine and add
proper locking function calls to your applications to guarantee thread
safety.
])
elif test "$enable_thread_safety" = yes; then
AC_MSG_CHECKING([thread safety of required library functions])
AC_MSG_CHECKING([thread safety of required library functions])
_CFLAGS="$CFLAGS"
_CFLAGS="$CFLAGS"
...
@@ -1196,11 +1208,17 @@ AC_TRY_RUN([#include "$srcdir/src/tools/thread/thread_test.c"],
...
@@ -1196,11 +1208,17 @@ AC_TRY_RUN([#include "$srcdir/src/tools/thread/thread_test.c"],
[AC_MSG_RESULT(no)
[AC_MSG_RESULT(no)
AC_MSG_ERROR([
AC_MSG_ERROR([
*** Thread test program failed. Your platform is not thread-safe.
*** Thread test program failed. Your platform is not thread-safe.
*** Check the file 'config.log'for the exact reason.])],
*** Check the file 'config.log'for the exact reason.
***
*** You can use the configure option --enable-thread-safety-force
*** to force threads to be enabled. However, you must then run
*** the program in src/tools/thread and add locking function calls
*** to your applications to guarantee thread safety.
])],
[AC_MSG_RESULT(maybe)
[AC_MSG_RESULT(maybe)
AC_MSG_WARN([
AC_MSG_WARN([
*** Skipping thread test program because of cross-compile build.
*** Skipping thread test program because of cross-compile build.
*** Run the program in src/tools/thread on the target ma
t
chine.
*** Run the program in src/tools/thread on the target machine.
])])
])])
CFLAGS="$_CFLAGS"
CFLAGS="$_CFLAGS"
LIBS="$_LIBS"
LIBS="$_LIBS"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment