[cp-patches] FYI: GCC 4.3.3 build fix
This fixes a warning that causes a build failure when compiling with -Werror on GCC 4.3.3. ChangeLog: 2009-02-03 Andrew John Hughes ahug...@redhat.com * native/jni/native-lib/cpproc.c: (cpproc_forkAndExec): Handle return of chdir. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 Index: native/jni/native-lib/cpproc.c === RCS file: /sources/classpath/classpath/native/jni/native-lib/cpproc.c,v retrieving revision 1.4 diff -u -u -r1.4 cpproc.c --- native/jni/native-lib/cpproc.c 11 Apr 2007 21:32:57 - 1.4 +++ native/jni/native-lib/cpproc.c 4 Feb 2009 03:09:06 - @@ -86,7 +86,9 @@ close_all_fds(local_fds, pipe_count * 2); - chdir(wd); + i = chdir(wd); + if (i == -1) + return errno; if (newEnviron == NULL) execvp(commandLine[0], commandLine); else
Re: [cp-patches] FYI: GCC 4.3.3 build fix
2009/2/4 Robert Lougher rob.loug...@gmail.com: Hi Andrew, 2009/2/4 Andrew John Hughes gnu_and...@member.fsf.org: This fixes a warning that causes a build failure when compiling with -Werror on GCC 4.3.3. ChangeLog: 2009-02-03 Andrew John Hughes ahug...@redhat.com * native/jni/native-lib/cpproc.c: (cpproc_forkAndExec): Handle return of chdir. A while ago, I made a similar change, but it broke process forking (easiest way to test is to run the Mauve harness). I tracked it down to the fact that it was exiting when chdir failed, which implies it fails in valid cases. I'm away from any Linux box of any kind at the moment, so I can't check any of this though... Thanks, Rob. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 Thanks for spotting. I should have gone with my gut instinct and not added the return... For now, I've reverted the return, keeping the assignment which avoids the GCC warning. We should come back to this later for a better solution, I've flagged it with a FIXME. -- Andrew :-) IcedTea/OpenJDK Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Re: [cp-patches] FYI: GCC 4.3.3 build fix
Hi Andrew, 2009/2/4 Andrew John Hughes gnu_and...@member.fsf.org: This fixes a warning that causes a build failure when compiling with -Werror on GCC 4.3.3. ChangeLog: 2009-02-03 Andrew John Hughes ahug...@redhat.com * native/jni/native-lib/cpproc.c: (cpproc_forkAndExec): Handle return of chdir. A while ago, I made a similar change, but it broke process forking (easiest way to test is to run the Mauve harness). I tracked it down to the fact that it was exiting when chdir failed, which implies it fails in valid cases. I'm away from any Linux box of any kind at the moment, so I can't check any of this though... Thanks, Rob. -- Andrew :) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8