From 7234f9bc03ee5cc50a74100bd26c76b4d1a2e48d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 21 Apr 2000 20:38:43 +0000 Subject: [PATCH] re GNATS libgcj/15 (_REENTRANT should be defined more consistently) 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 | 13 +++++++++++++ libjava/java/io/natFile.cc | 6 +----- libjava/java/lang/natSystem.cc | 7 ------- libjava/java/net/natInetAddress.cc | 6 +----- libjava/java/util/natGregorianCalendar.cc | 12 +----------- 5 files changed, 16 insertions(+), 28 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 305d1d3eed5..4a9d930e370 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,18 @@ 2000-04-21 Tom Tromey + 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. diff --git a/libjava/java/io/natFile.cc b/libjava/java/io/natFile.cc index dd98dc1708a..2b0da1bebf4 100644 --- a/libjava/java/io/natFile.cc +++ b/libjava/java/io/natFile.cc @@ -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 #ifdef HAVE_DIRENT_H -#define _POSIX_PTHREAD_SEMANTICS -#ifndef _REENTRANT -# define _REENTRANT -#endif #include #endif #include diff --git a/libjava/java/lang/natSystem.cc b/libjava/java/lang/natSystem.cc index 66448b7d5df..e376ec2f84c 100644 --- a/libjava/java/lang/natSystem.cc +++ b/libjava/java/lang/natSystem.cc @@ -10,13 +10,6 @@ details. */ #include -#ifdef HAVE_GETPWUID_R -#define _POSIX_PTHREAD_SEMANTICS -#ifndef _REENTRANT -#define _REENTRANT -#endif -#endif - #include #include #include diff --git a/libjava/java/net/natInetAddress.cc b/libjava/java/net/natInetAddress.cc index a25e643957b..930803eb295 100644 --- a/libjava/java/net/natInetAddress.cc +++ b/libjava/java/net/natInetAddress.cc @@ -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 -#if GETHOSTBYNAME_R_NEEDS_REENTRANT && !defined(_REENTRANT) -# define _REENTRANT 1 -#endif - #ifdef USE_WINSOCK #include diff --git a/libjava/java/util/natGregorianCalendar.cc b/libjava/java/util/natGregorianCalendar.cc index af0d4e7eef4..f412410518c 100644 --- a/libjava/java/util/natGregorianCalendar.cc +++ b/libjava/java/util/natGregorianCalendar.cc @@ -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 -// 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 #endif