aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2004-03-23 17:54:02 +0000
committerTom Tromey <tromey@gcc.gnu.org>2004-03-23 17:54:02 +0000
commit986dc4e5c484406ad0024de79feb8905602542b4 (patch)
tree52748eb4dfb3adf092fda65d6d860d57d9176c57 /gcc/java
parent37214c415f81fa7519af4f4530e8a6fc5270a257 (diff)
downloadgcc-986dc4e5c484406ad0024de79feb8905602542b4.zip
gcc-986dc4e5c484406ad0024de79feb8905602542b4.tar.gz
gcc-986dc4e5c484406ad0024de79feb8905602542b4.tar.bz2
re PR java/14315 ([3.4 only]: Java compiler is not parallel make safe)
PR java/14315: * jcf-write.c (make_class_file_name): Don't report if mkdir failed with EEXIST. From-SVN: r79868
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/jcf-write.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 712bcf6..833d494 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,5 +1,11 @@
2004-03-23 Tom Tromey <tromey@redhat.com>
+ PR java/14315:
+ * jcf-write.c (make_class_file_name): Don't report if mkdir
+ failed with EEXIST.
+
+2004-03-23 Tom Tromey <tromey@redhat.com>
+
* gcj.texi (Extensions): Document GCJ_PROPERTIES.
2004-03-20 Kazu Hirata <kazu@cs.umass.edu>
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c
index dbc34c6..9492396 100644
--- a/gcc/java/jcf-write.c
+++ b/gcc/java/jcf-write.c
@@ -1,5 +1,5 @@
/* Write out a Java(TM) class file.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GCC.
@@ -3392,9 +3392,11 @@ make_class_file_name (tree clas)
if (s == NULL)
break;
*s = '\0';
+ /* Try to make directory if it doesn't already exist. */
if (stat (r, &sb) == -1
- /* Try to make it. */
- && mkdir (r, 0755) == -1)
+ && mkdir (r, 0755) == -1
+ /* The directory might have been made by another process. */
+ && errno != EEXIST)
fatal_error ("can't create directory %s: %m", r);
*s = sep;