]> Savannah Git Hosting - gnulib.git/commitdiff
pthread: don't assume AC_CANONICAL_HOST, port better to Solaris, etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 14 Jun 2014 19:33:26 +0000 (12:33 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 14 Jun 2014 19:36:17 +0000 (12:36 -0700)
* modules/pthread (Depends-on): Add 'extensions', as it defines
_POSIX_PTHREAD_SEMANTICS, which is needed on Solaris.
(configure.ac-early): New section.
* m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, as
it is no longer needed.

ChangeLog
m4/pthread.m4
modules/pthread

index 05501530d21e5990975217769b6700e6e6514222..6fff9d785deb3d21641c96fcda971a4edc517428 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       pthread: don't assume AC_CANONICAL_HOST, port better to Solaris, etc.
+       * modules/pthread (Depends-on): Add 'extensions', as it defines
+       _POSIX_PTHREAD_SEMANTICS, which is needed on Solaris.
+       (configure.ac-early): New section.
+       * m4/pthread.m4 (gl_PTHREAD_CHECK): Revert previous change, as
+       it is no longer needed.
+
 2014-06-14  Pádraig Brady  <P@draigBrady.com>
 
        pthread: define thread-safe macros on some platforms
index 44538bd941664e5aff1f6fea555808b2076cd483..1ed0dd335ed8091f39b412771b7b2bcbbe6c4381 100644 (file)
@@ -88,20 +88,6 @@ AC_DEFUN([gl_PTHREAD_CHECK],
    fi
    AC_SUBST([LIB_PTHREAD])
 
-   dnl Some systems optimize for single-threaded programs by default, and
-   dnl need special flags to disable these optimizations. For example, the
-   dnl definition of 'errno' in <errno.h>.
-   case "$host_os" in
-     aix* | freebsd*)
-       AC_DEFINE([_THREAD_SAFE], 1,
-         [Define on some systems, to enable only thread-safe operations.])
-     ;;
-     osf* | solaris*)
-       AC_DEFINE([_REENTRANT], 1,
-         [Define on some systems, to enable only thread-safe operations.])
-     ;;
-   esac
-
    AC_REQUIRE([AC_C_RESTRICT])
 ])
 
index e583929e1b762e8788c70b1868212981f05b8005..3fb39208ab2f8c85b300b1d5a20782ce7612f44c 100644 (file)
@@ -7,10 +7,15 @@ lib/pthread.in.h
 m4/pthread.m4
 
 Depends-on:
+extensions
 extern-inline
 sched
 time
 
+configure.ac-early:
+AC_DEFINE([_REENTRANT], 1, [For thread-safety on OSF/1, Solaris.])
+AC_DEFINE([_THREAD_SAFE], 1, [For thread-safety on AIX, FreeBSD.])
+
 configure.ac:
 gl_PTHREAD_CHECK
 gl_MODULE_INDICATOR([pthread])