[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch |
Date: |
Mon, 15 Sep 2003 19:39:25 +0200 |
User-agent: |
KMail/1.5 |
Paul Eggert wrote:
> I thought about it a bit more, and decided that it'd be better to use
> a solution that simply causes 'free' to work as expected in C89 or
> letter. We shouldn't introduce yet another symbol like 'xfree'; we
> should just make 'free' work.
Fully agreed. That's a good general guideline.
> I'm also proposing changing the maintainer for the xalloc module to 'all'.
> (The actual maintainers have mostly been Bruno, Jim, and myself.)
Agreed.
> +AC_DEFUN([gl_FUNC_FREE_NULL],
> +[
> + AC_CACHE_CHECK([whether free (NULL) is known to work],
> + [gl_cv_func_free_null],
> + [AC_COMPILE_IFELSE(
> + [AC_LANG_PROGRAM(
> + address@hidden:@include <unistd.h>]],
> + address@hidden:@if _POSIX_VERSION < 200112 && !defined __GLIBC__
> + @%:@error "'free (NULL)' is not known to work"
> + @%:@endif]])],
This is too conservative. This test succeeds only on glibc systems,
and fails on Solaris, IRIX, HP-UX, OSF/1, AIX, Woe32. Honestly, I don't want
the binaries on all these platforms (Solaris, IRIX, HP-UX, OSF/1, AIX,
Woe32) to be punished for a bug in old old SunOS 4. Can you instead make
up a test specific to SunOS 4 ? (We already agreed that we don't care
about BSD 4.2 systems and things like that.) Three ways to test for
SunOS 4 are:
- use AC_CANONICAL_HOST
- test for (defined(sun) && defined(__sun)) && defined (HAVE_VADVISE)
- test for !HAVE_ATEXIT
Bruno
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, (continued)
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Paul Eggert, 2003/09/11
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Gary V. Vaughan, 2003/09/11
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Paul Eggert, 2003/09/12
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Jim Meyering, 2003/09/13
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Gary V. Vaughan, 2003/09/15
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Paul Eggert, 2003/09/15
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Gary V . Vaughan, 2003/09/16
- [Bug-gnulib] Re: Patch proposal: 1-gary-safe-xfree.patch, Simon Josefsson, 2003/09/16
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch,
Bruno Haible <=
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Paul Eggert, 2003/09/15
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Bruno Haible, 2003/09/15
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Gary V. Vaughan, 2003/09/19
- Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Paul Eggert, 2003/09/22
Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Gary V . Vaughan, 2003/09/11
Re: [Bug-gnulib] Patch proposal: 1-gary-safe-xfree.patch, Karl Berry, 2003/09/10