/[autoconf]/autoconf/doc/autoconf.texi
ViewVC logotype

Diff of /autoconf/doc/autoconf.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.638 by akim, Tue Jul 16 13:37:53 2002 UTC revision 1.639 by akim, Wed Jul 17 08:09:43 2002 UTC
# Line 3737  If @code{lstat} behaves properly, define Line 3737  If @code{lstat} behaves properly, define
3737    
3738  @defmac AC_FUNC_MALLOC  @defmac AC_FUNC_MALLOC
3739  @acindex FUNC_MALLOC  @acindex FUNC_MALLOC
3740    @cvindex HAVE_MALLOC
3741    @cvindex malloc
3742  @c @fuindex malloc  @c @fuindex malloc
3743  @prindex @code{malloc}  @prindex @code{malloc}
3744  If the @code{malloc} works correctly (@samp{malloc (0)} returns a valid  If the @code{malloc} works correctly (@samp{malloc (0)} returns a valid
3745  pointer), define @code{HAVE_MALLOC}.  pointer), define @code{HAVE_MALLOC} to 1.  Otherwise define
3746    @code{HAVE_MALLOC} to 0, ask for an @code{AC_LIBOBJ} replacement for
3747    @samp{malloc}, and define @code{malloc} to @code{rpl_malloc} so that the
3748    native @code{malloc} is not used in the main project.
3749    
3750    Typically, the replacement file @file{malloc.c} should look like (note
3751    the @samp{#undef malloc}:
3752    
3753    @verbatim
3754    #if HAVE_CONFIG_H
3755    # include <config.h>
3756    #endif
3757    #undef malloc
3758    
3759    #include <sys/types.h>
3760    
3761    char *malloc ();
3762    
3763    /* Allocate an N-byte block of memory from the heap.
3764       If N is zero, allocate a 1-byte block.  */
3765    
3766    char *
3767    rpl_malloc (size_t n)
3768    {
3769      if (n == 0)
3770        n = 1;
3771      return malloc (n);
3772    }
3773    @end verbatim
3774  @end defmac  @end defmac
3775    
3776  @defmac AC_FUNC_MEMCMP  @defmac AC_FUNC_MEMCMP
# Line 3782  If the obstacks are found, define @code{ Line 3812  If the obstacks are found, define @code{
3812  @code{AC_LIBOBJ} replacement for @samp{obstack}.  @code{AC_LIBOBJ} replacement for @samp{obstack}.
3813  @end defmac  @end defmac
3814    
3815    @defmac AC_FUNC_REALLOC
3816    @acindex FUNC_REALLOC
3817    @cvindex HAVE_REALLOC
3818    @cvindex realloc
3819    @c @fuindex realloc
3820    @prindex @code{realloc}
3821    If the @code{realloc} works correctly (@samp{realloc (0, 0)} returns a
3822    valid pointer), define @code{HAVE_REALLOC} to 1.  Otherwise define
3823    @code{HAVE_REALLOC} to 0, ask for an @code{AC_LIBOBJ} replacement for
3824    @samp{realloc}, and define @code{realloc} to @code{rpl_realloc} so that
3825    the native @code{realloc} is not used in the main project.  See
3826    @code{AC_FUNC_MALLOC} for details.
3827    @end defmac
3828    
3829  @defmac AC_FUNC_SELECT_ARGTYPES  @defmac AC_FUNC_SELECT_ARGTYPES
3830  @acindex FUNC_SELECT_ARGTYPES  @acindex FUNC_SELECT_ARGTYPES
3831  @cvindex SELECT_TYPE_ARG1  @cvindex SELECT_TYPE_ARG1

Legend:
Removed from v.1.638  
changed lines
  Added in v.1.639

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26