mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-25 05:40:26 +08:00
name-finder.h (_Jv_name_finder::myclose): New method.
* include/name-finder.h (_Jv_name_finder::myclose): New method. * name-finder.cc (_Jv_name_finder): Initialize file descriptors. From-SVN: r51234
This commit is contained in:
parent
9817ad7792
commit
f5c5a4e915
@ -1,3 +1,8 @@
|
||||
2002-03-23 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* include/name-finder.h (_Jv_name_finder::myclose): New method.
|
||||
* name-finder.cc (_Jv_name_finder): Initialize file descriptors.
|
||||
|
||||
2002-03-23 Michael Smith <msmith@spinnakernet.com>
|
||||
|
||||
* java/util/GregorianCalendar.java (minimums, maximums): Correct
|
||||
|
@ -79,6 +79,7 @@ GCDEPS = @GCDEPS@
|
||||
GCINCS = @GCINCS@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
GCJVERSION = @GCJVERSION@
|
||||
GCLIBS = @GCLIBS@
|
||||
GCOBJS = @GCOBJS@
|
||||
GCSPEC = @GCSPEC@
|
||||
@ -125,13 +126,19 @@ mkinstalldirs = @mkinstalldirs@
|
||||
tool_include_dir = @tool_include_dir@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
@TESTSUBDIR_TRUE@SUBDIRS = @TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
|
||||
@TESTSUBDIR_FALSE@SUBDIRS = @TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
|
||||
@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
|
||||
@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
|
||||
@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
|
||||
@XLIB_AWT_TRUE@cond_x_ltlibrary = @XLIB_AWT_TRUE@libgcjx.la
|
||||
@XLIB_AWT_FALSE@cond_x_ltlibrary =
|
||||
@TESTSUBDIR_TRUE@SUBDIRS = \
|
||||
@TESTSUBDIR_TRUE@$(DIRLTDL) testsuite gcj include
|
||||
@TESTSUBDIR_FALSE@SUBDIRS = \
|
||||
@TESTSUBDIR_FALSE@$(DIRLTDL) gcj include
|
||||
@USE_LIBDIR_TRUE@toolexeclibdir = \
|
||||
@USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
|
||||
@USE_LIBDIR_FALSE@toolexeclibdir = \
|
||||
@USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
|
||||
@USE_LIBDIR_FALSE@toolexecdir = \
|
||||
@USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
|
||||
@XLIB_AWT_TRUE@cond_x_ltlibrary = \
|
||||
@XLIB_AWT_TRUE@libgcjx.la
|
||||
@XLIB_AWT_FALSE@cond_x_ltlibrary = \
|
||||
|
||||
toolexeclib_LTLIBRARIES = libgcj.la $(cond_x_ltlibrary)
|
||||
toolexeclib_DATA = libgcj.spec
|
||||
@ -139,14 +146,20 @@ data_DATA = libgcj.jar
|
||||
|
||||
secdir = $(libdir)/security
|
||||
|
||||
@NATIVE_TRUE@bin_PROGRAMS = @NATIVE_TRUE@jv-convert gij rmic rmiregistry
|
||||
@NATIVE_TRUE@bin_PROGRAMS = \
|
||||
@NATIVE_TRUE@jv-convert gij rmic rmiregistry
|
||||
|
||||
bin_SCRIPTS = addr2name.awk
|
||||
@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
|
||||
@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = @CANADIAN_TRUE@@NULL_TARGET_FALSE@jar
|
||||
@CANADIAN_FALSE@ZIP = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
|
||||
@CANADIAN_TRUE@GCJH = @CANADIAN_TRUE@gcjh
|
||||
@CANADIAN_FALSE@GCJH = @CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
|
||||
@CANADIAN_TRUE@@NULL_TARGET_TRUE@ZIP = \
|
||||
@CANADIAN_TRUE@@NULL_TARGET_TRUE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
|
||||
@CANADIAN_TRUE@@NULL_TARGET_FALSE@ZIP = \
|
||||
@CANADIAN_TRUE@@NULL_TARGET_FALSE@jar
|
||||
@CANADIAN_FALSE@ZIP = \
|
||||
@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/fastjar/jar$(EXEEXT)
|
||||
@CANADIAN_TRUE@GCJH = \
|
||||
@CANADIAN_TRUE@gcjh
|
||||
@CANADIAN_FALSE@GCJH = \
|
||||
@CANADIAN_FALSE@$(MULTIBUILDTOP)../$(COMPPATH)/gcc/gcjh$(EXEEXT)
|
||||
|
||||
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8
|
||||
|
||||
@ -166,8 +179,10 @@ AM_CXXFLAGS = -fno-rtti -fnon-call-exceptions \
|
||||
@LIBGCJ_CXXFLAGS@ @X_CFLAGS@ $(WARNINGS) -D_GNU_SOURCE \
|
||||
-DPREFIX="\"$(prefix)\""
|
||||
|
||||
@USING_GCC_TRUE@AM_CFLAGS = @USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
|
||||
@USING_GCC_FALSE@AM_CFLAGS = @USING_GCC_FALSE@@LIBGCJ_CFLAGS@
|
||||
@USING_GCC_TRUE@AM_CFLAGS = \
|
||||
@USING_GCC_TRUE@@LIBGCJ_CFLAGS@ $(WARNINGS)
|
||||
@USING_GCC_FALSE@AM_CFLAGS = \
|
||||
@USING_GCC_FALSE@@LIBGCJ_CFLAGS@
|
||||
|
||||
JCFLAGS = -g
|
||||
JC1FLAGS = @LIBGCJ_JAVAFLAGS@ $(GCJFLAGS)
|
||||
@ -242,7 +257,8 @@ extra_headers = java/lang/Object.h java/lang/Class.h
|
||||
|
||||
NM = nm
|
||||
|
||||
@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = @NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
|
||||
@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@noinst_PROGRAMS = \
|
||||
@NATIVE_TRUE@@MAINTAINER_MODE_TRUE@gen-from-JIS
|
||||
|
||||
CONVERT_DIR = gnu/gcj/convert
|
||||
|
||||
@ -1724,7 +1740,7 @@ libgcj-test.spec.in libgcj.spec.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DIST_SUBDIRS = @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include
|
||||
DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
|
||||
@ -3025,7 +3041,7 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|
633
libjava/configure
vendored
633
libjava/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -76,7 +76,14 @@ case "${host}" in
|
||||
libgcj_interpreter=yes
|
||||
libgcj_cxxflags="-D__NO_MATH_INLINES"
|
||||
libgcj_cflags="-D__NO_MATH_INLINES"
|
||||
DIVIDESPEC=-fno-use-divide-subroutine
|
||||
case "${host}" in
|
||||
i?86-*-solaris2*)
|
||||
# Keep default.
|
||||
;;
|
||||
*)
|
||||
DIVIDESPEC=-fno-use-divide-subroutine
|
||||
;;
|
||||
esac
|
||||
enable_hash_synchronization_default=yes
|
||||
slow_pthread_self=yes
|
||||
;;
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -80,6 +80,7 @@ GCDEPS = @GCDEPS@
|
||||
GCINCS = @GCINCS@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
GCJVERSION = @GCJVERSION@
|
||||
GCLIBS = @GCLIBS@
|
||||
GCOBJS = @GCOBJS@
|
||||
GCSPEC = @GCSPEC@
|
||||
@ -109,13 +110,13 @@ RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
SYSDEP_SOURCES = @SYSDEP_SOURCES@
|
||||
SYSTEMSPEC = @SYSTEMSPEC@
|
||||
SYS_ZLIBS = @SYS_ZLIBS@
|
||||
THREADDEPS = @THREADDEPS@
|
||||
THREADINCS = @THREADINCS@
|
||||
THREADLIBS = @THREADLIBS@
|
||||
THREADOBJS = @THREADOBJS@
|
||||
THREADSPEC = @THREADSPEC@
|
||||
VERSION = @VERSION@
|
||||
ZDEPS = @ZDEPS@
|
||||
ZINCS = @ZINCS@
|
||||
ZLIBS = @ZLIBS@
|
||||
ZLIBSPEC = @ZLIBSPEC@
|
||||
@ -142,7 +143,7 @@ DIST_COMMON = ./stamp-h2.in Makefile.am Makefile.in libgcj-config.h.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
@ -254,7 +255,7 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -80,6 +80,7 @@ GCDEPS = @GCDEPS@
|
||||
GCINCS = @GCINCS@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
GCJVERSION = @GCJVERSION@
|
||||
GCLIBS = @GCLIBS@
|
||||
GCOBJS = @GCOBJS@
|
||||
GCSPEC = @GCSPEC@
|
||||
@ -109,13 +110,13 @@ RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
SYSDEP_SOURCES = @SYSDEP_SOURCES@
|
||||
SYSTEMSPEC = @SYSTEMSPEC@
|
||||
SYS_ZLIBS = @SYS_ZLIBS@
|
||||
THREADDEPS = @THREADDEPS@
|
||||
THREADINCS = @THREADINCS@
|
||||
THREADLIBS = @THREADLIBS@
|
||||
THREADOBJS = @THREADOBJS@
|
||||
THREADSPEC = @THREADSPEC@
|
||||
VERSION = @VERSION@
|
||||
ZDEPS = @ZDEPS@
|
||||
ZINCS = @ZINCS@
|
||||
ZLIBS = @ZLIBS@
|
||||
ZLIBSPEC = @ZLIBSPEC@
|
||||
@ -138,7 +139,7 @@ DIST_COMMON = ./stamp-h1.in Makefile.am Makefile.in config.h.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
@ -235,7 +236,7 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|
@ -40,12 +40,19 @@ public:
|
||||
~_Jv_name_finder ()
|
||||
{
|
||||
#if defined (HAVE_PIPE) && defined (HAVE_FORK)
|
||||
close (f_pipe[1]);
|
||||
fclose (b_pipe_fd);
|
||||
myclose (f_pipe[0]);
|
||||
myclose (f_pipe[1]);
|
||||
myclose (b_pipe[0]);
|
||||
myclose (b_pipe[1]);
|
||||
if (b_pipe_fd != NULL)
|
||||
fclose (b_pipe_fd);
|
||||
|
||||
int wstat;
|
||||
// We don't care about errors here.
|
||||
waitpid (pid, &wstat, 0);
|
||||
if (pid >= 0)
|
||||
{
|
||||
int wstat;
|
||||
// We don't care about errors here.
|
||||
waitpid (pid, &wstat, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -72,5 +79,13 @@ private:
|
||||
int f_pipe[2], b_pipe[2];
|
||||
FILE *b_pipe_fd;
|
||||
int error;
|
||||
|
||||
// Close a descriptor only if it has not been closed.
|
||||
void myclose (int fd)
|
||||
{
|
||||
if (fd != -1)
|
||||
close (fd);
|
||||
}
|
||||
|
||||
#endif
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
// name-finder.cc - Convert addresses to names
|
||||
|
||||
/* Copyright (C) 2000 Free Software Foundation, Inc
|
||||
/* Copyright (C) 2000, 2002 Free Software Foundation, Inc
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
@ -61,6 +61,13 @@ _Jv_name_finder::_Jv_name_finder (char *executable)
|
||||
#if defined (HAVE_PIPE) && defined (HAVE_FORK) && defined (HAVE_EXECVP)
|
||||
error = 0;
|
||||
|
||||
// Initialize file descriptors so that shutdown works properly.
|
||||
f_pipe[0] = -1;
|
||||
f_pipe[1] = -1;
|
||||
b_pipe[0] = -1;
|
||||
b_pipe[1] = -1;
|
||||
b_pipe_fd = NULL;
|
||||
|
||||
char *argv[6];
|
||||
{
|
||||
int arg = 0;
|
||||
@ -93,8 +100,12 @@ _Jv_name_finder::_Jv_name_finder (char *executable)
|
||||
_exit (127);
|
||||
}
|
||||
|
||||
// Close child end of pipes. Set local descriptors to -1 so we
|
||||
// don't try to close the fd again.
|
||||
close (f_pipe [0]);
|
||||
f_pipe[0] = -1;
|
||||
close (b_pipe [1]);
|
||||
b_pipe[1] = -1;
|
||||
|
||||
if (pid < 0)
|
||||
{
|
||||
@ -104,6 +115,12 @@ _Jv_name_finder::_Jv_name_finder (char *executable)
|
||||
|
||||
b_pipe_fd = fdopen (b_pipe[0], "r");
|
||||
error |= !b_pipe_fd;
|
||||
|
||||
if (! error)
|
||||
{
|
||||
// Don't try to close the fd twice.
|
||||
b_pipe[0] = -1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -80,6 +80,7 @@ GCDEPS = @GCDEPS@
|
||||
GCINCS = @GCINCS@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
GCJVERSION = @GCJVERSION@
|
||||
GCLIBS = @GCLIBS@
|
||||
GCOBJS = @GCOBJS@
|
||||
GCSPEC = @GCSPEC@
|
||||
@ -109,13 +110,13 @@ RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
SYSDEP_SOURCES = @SYSDEP_SOURCES@
|
||||
SYSTEMSPEC = @SYSTEMSPEC@
|
||||
SYS_ZLIBS = @SYS_ZLIBS@
|
||||
THREADDEPS = @THREADDEPS@
|
||||
THREADINCS = @THREADINCS@
|
||||
THREADLIBS = @THREADLIBS@
|
||||
THREADOBJS = @THREADOBJS@
|
||||
THREADSPEC = @THREADSPEC@
|
||||
VERSION = @VERSION@
|
||||
ZDEPS = @ZDEPS@
|
||||
ZINCS = @ZINCS@
|
||||
ZLIBS = @ZLIBS@
|
||||
ZLIBSPEC = @ZLIBSPEC@
|
||||
@ -147,7 +148,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
@ -175,7 +176,7 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|
Loading…
x
Reference in New Issue
Block a user