classpath-patches
[Top][All Lists]
Advanced

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

Re: [cp-patches] Patch JCL_realloc()


From: Mark Wielaard
Subject: Re: [cp-patches] Patch JCL_realloc()
Date: Thu, 04 Nov 2004 14:23:42 +0100

Hi,

On Wed, 2004-11-03 at 13:53, Dr. Torsten Rupp wrote:
> 2004-11-03  Torsten Rupp  address@hidden
> 
>       * native/jni/classpath/jcl.h, native/jni/classpath/jcl.c,
>       native/jni/java-io/java_io_VMFile.c:
>       Inserted native layer macros for OS functions, added parameter for old
>       memory size to JCL_realloc() to be able to make an malloc() on system
>       where no realloc() is available.

I don't really get this patch. There is a lot of changes, reformatting,
in this patch that make it difficult to see what is really going on.
The patch also uses TARGET_NATIVE_MEMORY_ALLOC and
TARGET_NATIVE_MEMORY_REALLOC macros which we never define (and I thought
we agreed to get rid of these kind of macros and would use normal
functions as much as possible in the future.)

We should probably use autoconf to properly support systems that don't
have a working realloc implementation. Autoconf has the following
support for it:

Macro: AC_FUNC_REALLOC
        If the realloc function is compatible with the GNU C library
        realloc (i.e., `realloc (0, 0)' returns a valid pointer), define
        HAVE_REALLOC to 1. Otherwise define HAVE_REALLOC to 0, ask for
        an AC_LIBOBJ replacement for `realloc', and define realloc to
        rpl_realloc so that the native realloc is not used in the main
        project. See AC_FUNC_MALLOC for details.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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