Bruno Haible <[EMAIL PROTECTED]> wrote:
> You cannot assume that malloc() and realloc() set errno upon failure.
>
>   - In ISO C 99, the description of malloc() and realloc() does not mention
>     errno. Also, <errno.h> is not required to declare a macro 'ENOMEM'.
>   - Windows (mingw) malloc() and realloc() don't always set errno.

Note that POSIX *does* require a failed malloc call to set errno to
ENOMEM, albeit with CX shading (meaning IEEE Std 1003.1-2001).

  http://www.opengroup.org/susv3xsh/malloc.html

Let's try not to let substandard systems dictate interface design.
If some system has a poor implementation of a function like malloc,
we can easily ensure that it is replaced.


_______________________________________________
bug-gnulib mailing list
bug-gnulib@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnulib

Reply via email to