classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] scripts/check_jni_entries.sh: mktemp portability


From: Steven Augart
Subject: [cp-patches] scripts/check_jni_entries.sh: mktemp portability
Date: Mon, 10 Jan 2005 22:29:59 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217

I'd like to commit the following patch, which fixes a portability
problem (scripts/check_jni_methods.sh fails on my Red Hat Linux 7.3 system, 
which uses a version of mktemp that requires a pattern argument.)

The ChangeLog entry:

2005-01-10  Steven Augart  <address@hidden>

        * classpath/scripts/check_jni_methods.sh: Portable to the OpenBSD
        "mktemp", as used in Red Hat Linux 7.3.
        Check whether "mktemp" fails; abort if it does.


Index: scripts/check_jni_methods.sh
===================================================================
RCS file: /cvsroot/classpath/classpath/scripts/check_jni_methods.sh,v
retrieving revision 1.1
diff -I*.class -u -r1.1 check_jni_methods.sh
--- scripts/check_jni_methods.sh        15 Nov 2004 20:36:50 -0000      1.1
+++ scripts/check_jni_methods.sh        11 Jan 2005 03:24:10 -0000
@@ -1,8 +1,9 @@
 #!/bin/sh
 
-TMPFILE=`mktemp`
-TMPFILE2=`mktemp`
-TMPFILE3=`mktemp`
+pattern=/tmp/check-jni-methods.XXXXXX
+TMPFILE=`mktemp $pattern` || { echo >&2 "$0: Unable to make temp file; 
aborting" ; exit 3; }
+TMPFILE2=`mktemp $pattern` || { echo >&2 "$0: Unable to make temp file; 
aborting" ; exit 3; }
+TMPFILE3=`mktemp $pattern` || { echo >&2 "$0: Unable to make temp file; 
aborting" ; exit 3; }
 
 # Find all methods defined in the header files generated
 # from the java source files.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]