|
From: Carlo W. <li...@us...> - 2002-01-05 04:22:35
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2002-00-05 04:22:35 UTC
Modified files:
libcwd/debugmalloc.cc libcwd/include/sys.ho.in
libcwd/include/libcw/private_threading.h
Log message:
I believe this is not an issue for gcc-2.x. And if it is... we don't really
support gcc-2.x and theads anyway. Needed to compile it though.
---------------------- diff included ----------------------
Index: src/libcwd/debugmalloc.cc
diff -u src/libcwd/debugmalloc.cc:1.67 src/libcwd/debugmalloc.cc:1.68
--- src/libcwd/debugmalloc.cc:1.67 Fri Jan 4 19:53:35 2002
+++ src/libcwd/debugmalloc.cc Fri Jan 4 20:22:24 2002
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.67 2002/01/05 03:53:35 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.68 2002/01/05 04:22:24 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -122,12 +122,12 @@
#define DEBUGMALLOC_INTERNAL
#include "sys.h"
#include <libcw/debug_config.h>
-#ifdef LIBCWD_THREAD_SAFE
+#if defined(LIBCWD_THREAD_SAFE) && (__GNUC__ >= 3 || __GNUC_MINOR__ >= 97)
// This has to be very early (must not have been included elsewhere already).
#define private public // Ugly, I know.
#include <bits/stl_alloc.h>
#undef private
-#endif // LIBCWD_THREAD_SAFE
+#endif // __GNUC__ >= 3 && LIBCWD_THREAD_SAFE
#if defined(DEBUGMALLOC) || defined(LIBCW_DOXYGEN)
@@ -212,6 +212,7 @@
namespace _private_ {
+#if __GNUC__ >= 3 || __GNUC_MINOR__ >= 97
#ifdef LIBCWD_THREAD_SAFE
// The following tries to take the "node allocator" lock -- the lock of the
// default allocator for threaded applications. The parameter is the value to
@@ -239,7 +240,8 @@
#endif
__gthread_mutex_unlock(&std::__default_alloc_template<true, 0>::_S_node_allocator_lock._M_lock);
}
-#endif // LIBCWD_THREAD_SAFE
+#endif // LIBCWD_THREAD_SAFE
+#endif // __GNUC__ >= 3
void no_alloc_print_int_to(std::ostream* os, unsigned long val, bool hexadecimal)
{
Index: src/libcwd/include/libcw/private_threading.h
diff -u src/libcwd/include/libcw/private_threading.h:1.2 src/libcwd/include/libcw/private_threading.h:1.3
--- src/libcwd/include/libcw/private_threading.h:1.2 Sat Dec 29 20:17:50 2001
+++ src/libcwd/include/libcw/private_threading.h Fri Jan 4 20:22:25 2002
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_threading.h,v 1.2 2001/12/30 04:17:50 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/private_threading.h,v 1.3 2002/01/05 04:22:25 libcw Exp $
//
// Copyright (C) 2001, by
//
@@ -222,7 +222,7 @@
if (instance != mutex_initialization_instance)
mutex_tct<mutex_initialization_instance>::unlock();
}
-#endif
+#endif // LIBCWD_USE_LINUXTHREADS
#ifndef LIBCWD_USE_LINUXTHREADS
template <int instance>
Index: src/libcwd/include/sys.ho.in
diff -u src/libcwd/include/sys.ho.in:1.4 src/libcwd/include/sys.ho.in:1.5
--- src/libcwd/include/sys.ho.in:1.4 Sun Dec 30 12:05:41 2001
+++ src/libcwd/include/sys.ho.in Fri Jan 4 20:22:25 2002
@@ -1,5 +1,5 @@
// @configure_input@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.4 2001/12/30 20:05:41 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/include/sys.ho.in,v 1.5 2002/01/05 04:22:25 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -16,6 +16,11 @@
#define SYS_H
#include "../config.h"
+
+//
+// Use all GNU extensions.
+//
+#define _GNU_SOURCE
//
// Define _REENTRANT to make sure that the glibc functions are thread safe too.
----------------------- End of diff -----------------------
|