]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ropeimpl.h: Check __STL_PTHREADS instead of _PTHREADS.
authorH.J. Lu <hjl@gnu.org>
Fri, 20 Feb 1998 11:09:09 +0000 (11:09 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 20 Feb 1998 11:09:09 +0000 (06:09 -0500)
* ropeimpl.h: Check __STL_PTHREADS instead of _PTHREADS.
* stl_alloc.h: Ditto.
* stl_config.h: Ditto.
* stl_rope.h: Ditto.
* stl_config.h: include <_G_config.h> if __GNUG__ is defined.
(__STL_PTHREADS): Defined if _PTHREADS is defined or
__GLIBC__ >= 2.

Co-Authored-By: Jason Merrill <jason@yorick.cygnus.com>
From-SVN: r18137

libstdc++/stl/ChangeLog
libstdc++/stl/ropeimpl.h
libstdc++/stl/stl_alloc.h
libstdc++/stl/stl_config.h
libstdc++/stl/stl_rope.h

index c9aff2748c5bfd7dd49670c65358dbe94dda8388..8c300e39db132fa45d612e9ebf0889a7213892e0 100644 (file)
@@ -1,3 +1,15 @@
+Wed Jan 14 16:15:05 1998  H.J. Lu  (hjl@gnu.org)
+                         Jason Merrill  <jason@yorick.cygnus.com>
+
+       * ropeimpl.h: Check __STL_PTHREADS instead of _PTHREADS.
+       * stl_alloc.h: Ditto.
+       * stl_config.h: Ditto.
+       * stl_rope.h: Ditto.
+
+       * stl_config.h: include <_G_config.h> if __GNUG__ is defined.
+       (__STL_PTHREADS): Defined if _PTHREADS is defined or
+       __GLIBC__ >= 2.
+
 Sat Nov  8 00:45:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * stl_hash_set.h (swap): Fix typo.
index dcd6bfd511760036a1cee2b17121d5a40204376a..d652c815b45db4b0e0e610ae82bced514c67a298 100644 (file)
@@ -1429,7 +1429,7 @@ rope<charT, Alloc>::rope(size_t n, charT c)
 
 template<class charT, class Alloc> charT rope<charT,Alloc>::empty_c_str[1];
 
-# ifdef _PTHREADS
+# ifdef __STL_PTHREADS
     template<class charT, class Alloc>
     pthread_mutex_t rope<charT,Alloc>::swap_lock = PTHREAD_MUTEX_INITIALIZER;
 # endif
index a6d41437bd4f495729218f96306a16173e979ba7..0f2ba28bb98e4b77eb74957679484f2d0389682d 100644 (file)
 #  define __RESTRICT
 #endif
 
-#if !defined(_PTHREADS) && !defined(_NOTHREADS) \
+#if !defined(__STL_PTHREADS) && !defined(_NOTHREADS) \
  && !defined(__STL_SGI_THREADS) && !defined(__STL_WIN32THREADS)
 #   define _NOTHREADS
 #endif
 
-# ifdef _PTHREADS
+# ifdef __STL_PTHREADS
     // POSIX Threads
     // This is dubious, since this is likely to be a high contention
     // lock.   Performance may not be adequate.
@@ -357,7 +357,7 @@ private:
     static inline void __unlock(volatile unsigned long *);
 # endif
 
-# ifdef _PTHREADS
+# ifdef __STL_PTHREADS
     static pthread_mutex_t __node_allocator_lock;
 # endif
 
@@ -558,7 +558,7 @@ __default_alloc_template<threads, inst>::reallocate(void *p,
     return(result);
 }
 
-#ifdef _PTHREADS
+#ifdef __STL_PTHREADS
     template <bool threads, int inst>
     pthread_mutex_t
     __default_alloc_template<threads, inst>::__node_allocator_lock
index c6546667a93fe62d4bff8f0869f287af1a5b6fde..ff73028989748c5f35ecf0a3f865e43ad1b2fdd5 100644 (file)
 //  (19) Defines __stl_assert either as a test or as a null macro,
 //       depending on whether or not __STL_ASSERTIONS is defined.
 
+#ifdef _PTHREADS
+#   define __STL_PTHREADS
+#endif
+
 # if defined(__sgi) && !defined(__GNUC__)
 #   if !defined(_BOOL)
 #     define __STL_NEED_BOOL
 #   if (_COMPILER_VERSION >= 721) && defined(_NAMESPACES)
 #     define __STL_USE_NAMESPACES
 #   endif 
-#   if !defined(_NOTHREADS) && !defined(_PTHREADS)
+#   if !defined(_NOTHREADS) && !defined(__STL_PTHREADS)
 #     define __STL_SGI_THREADS
 #   endif
 # endif
 
 # ifdef __GNUC__
-#   if 0 && (__GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8))
+#   include <_G_config.h>
+#   if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
 #     define __STL_STATIC_TEMPLATE_MEMBER_BUG
 #     define __STL_NEED_TYPENAME
 #     define __STL_NEED_EXPLICIT
 #     define __STL_EXPLICIT_FUNCTION_TMPL_ARGS
 #     define __STL_MEMBER_TEMPLATES
 #   endif
+#   if !defined(_NOTHREADS) && __GLIBC__ >= 2
+#     define __STL_PTHREADS
+#   endif
 #   ifdef __EXCEPTIONS
 #     define __STL_USE_EXCEPTIONS
 #   endif
index 620db6ffbc5ffc8e49ccc9b76d4e7e0e14997630..d37c679ba288dc948f9fb1ab2e065192410d350c 100644 (file)
@@ -306,7 +306,7 @@ struct __rope_RopeBase {
             {
                 return InterlockedDecrement(&refcount);
             }
-#      elif defined(_PTHREADS)
+#      elif defined(__STL_PTHREADS)
            // This should be portable, but performance is expected
            // to be quite awful.  This really needs platform specific
            // code.
@@ -939,7 +939,7 @@ class rope {
            static cstrptr atomic_swap(cstrptr *p, cstrptr q) {
                return (cstrptr) InterlockedExchange((LPLONG)p, (LONG)q);
            }
-#      elif defined(_PTHREADS)
+#      elif defined(__STL_PTHREADS)
            // This should be portable, but performance is expected
            // to be quite awful.  This really needs platform specific
            // code.