This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH]: adds missing System properties for gcj under mingw
On Thu, Apr 11, 2002 at 03:31:28PM -0600, Tom Tromey wrote:
>
> Grr. Yes, sorry about that. Adam and/or Adam, can you test it with
> this patch? I don't want to screw up again.
It now compiles fine for me - thanks. While you're doing some code
cleaning, how about the following?
Index: natSystem.cc
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/java/lang/natSystem.cc,v
retrieving revision 1.48.2.4
diff -u -r1.48.2.4 natSystem.cc
--- natSystem.cc 7 Apr 2002 11:30:08 -0000 1.48.2.4
+++ natSystem.cc 11 Apr 2002 21:51:57 -0000
@@ -389,7 +389,7 @@
#ifdef HAVE_UNISTD_H
/* Use getcwd to set "user.dir". */
int buflen = 250;
- char *buffer = (char *) malloc (buflen);
+ char *buffer = (char *) _Jv_MallocUnchecked (buflen);
while (buffer != NULL)
{
if (getcwd (buffer, buflen) != NULL)
@@ -400,10 +400,10 @@
if (errno != ERANGE)
break;
buflen = 2 * buflen;
- buffer = (char *) realloc (buffer, buflen);
+ buffer = (char *) _Jv_Realloc (buffer, buflen);
}
if (buffer != NULL)
- free (buffer);
+ _Jv_Free (buffer);
#endif /* HAVE_UNISTD_H */
#endif /* HAVE_GETCWD */