re GNATS libgcj/15 (_REENTRANT should be defined more consistently)
authorTom Tromey <tromey@cygnus.com>
Fri, 21 Apr 2000 20:38:43 +0000 (20:38 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 21 Apr 2000 20:38:43 +0000 (20:38 +0000)
Fix for PR libgcj/15:
* java/util/natGregorianCalendar.cc (_REENTRANT,
_POSIX_PTHREAD_SEMANTICS): Don't define.
* java/net/natInetAddress.cc (_REENTRANT): Don't define.
* java/lang/natSystem.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS):
Don't define.
* java/io/natFile.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS): Don't
define.
* configure: Rebuilt.
* configure.in: If using POSIX threads, define _REENTRANT if
needed.  Define _POSIX_PTHREAD_SEMANTICS.  Don't define
GETHOSTBYNAME_R_NEEDS_REENTRANT.

From-SVN: r33318

libjava/ChangeLog
libjava/java/io/natFile.cc
libjava/java/lang/natSystem.cc
libjava/java/net/natInetAddress.cc
libjava/java/util/natGregorianCalendar.cc

index 305d1d3eed5060e8a97dff2da19b6dc5563d92fb..4a9d930e370ae6b05f00575f41b53ac2e16a933f 100644 (file)
@@ -1,5 +1,18 @@
 2000-04-21  Tom Tromey  <tromey@cygnus.com>
 
+       Fix for PR libgcj/15:
+       * java/util/natGregorianCalendar.cc (_REENTRANT,
+       _POSIX_PTHREAD_SEMANTICS): Don't define.
+       * java/net/natInetAddress.cc (_REENTRANT): Don't define.
+       * java/lang/natSystem.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS):
+       Don't define.
+       * java/io/natFile.cc (_REENTRANT, _POSIX_PTHREAD_SEMANTICS): Don't
+       define.
+       * configure: Rebuilt.
+       * configure.in: If using POSIX threads, define _REENTRANT if
+       needed.  Define _POSIX_PTHREAD_SEMANTICS.  Don't define
+       GETHOSTBYNAME_R_NEEDS_REENTRANT.
+
        * java/io/PipedInputStream.java, java/io/PipedReader.java,
        java/io/PipedOutputStream.java, java/io/PipedWriter.java: New
        version from Classpath.
index dd98dc1708ae82ce3006a2cac009bddd3f4cb6cc..2b0da1bebf40ad365b7647b97d1da1d6fe87e4b2 100644 (file)
@@ -1,6 +1,6 @@
 // natFile.cc - Native part of File class.
 
-/* Copyright (C) 1998, 1999  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -21,10 +21,6 @@ details.  */
 #endif
 #include <stdlib.h>
 #ifdef HAVE_DIRENT_H
-#define _POSIX_PTHREAD_SEMANTICS
-#ifndef _REENTRANT
-#  define _REENTRANT
-#endif
 #include <dirent.h>
 #endif
 #include <string.h>
index 66448b7d5df92cd05e5dbf17532f684e5ab74e6d..e376ec2f84c5e8fd054c2b959385cf53acd2305c 100644 (file)
@@ -10,13 +10,6 @@ details.  */
 
 #include <config.h>
 
-#ifdef HAVE_GETPWUID_R
-#define _POSIX_PTHREAD_SEMANTICS
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#endif
-
 #include <string.h>
 #include <time.h>
 #include <stdlib.h>
index a25e643957b0be24d7565359e74a66b318076f1e..930803eb2954bf1f8cd52644e18b7f90a25864b7 100644 (file)
@@ -1,6 +1,6 @@
 // natInetAddress.cc
 
-/* Copyright (C) 1998, 1999  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -10,10 +10,6 @@ details.  */
 
 #include <config.h>
 
-#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT)
-# define _REENTRANT 1
-#endif
-
 #ifdef USE_WINSOCK
 
 #include <windows.h>
index af0d4e7eef4af5c2cdcee46a38e07d5e00b25df5..f412410518c8576da46a0b28816d0c14d92379b2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -8,16 +8,6 @@ details.  */
 
 #include <config.h>
 
-// We want to make sure to pick up the POSIX `_r' functions.  Some
-// systems, such as Solaris 2.6, require this define in order to
-// declare the functions in the appropriate header.
-#if defined (HAVE_GMTIME_R) || defined (HAVE_LOCALTIME_R)
-#  define _POSIX_PTHREAD_SEMANTICS
-#  ifndef _REENTRANT
-#    define _REENTRANT
-#  endif /* _REENTRANT */
-#endif
-
 #ifdef ECOS
 #include <string.h>
 #endif