Mercurial > hg > octave-kai > gnulib-hg
diff lib/setenv.c @ 13394:6999c44d1f59
Module setenv does not depend on 'malloc-posix', 'realloc-posix'.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 09 Jun 2010 12:40:40 +0200 |
parents | 81bcdef18cd8 |
children | 758ef73803db |
line wrap: on
line diff
--- a/lib/setenv.c +++ b/lib/setenv.c @@ -147,6 +147,9 @@ : realloc (last_environ, (size + 2) * sizeof (char *))); if (new_environ == NULL) { + /* It's easier to set errno to ENOMEM than to rely on the + 'malloc-posix' and 'realloc-posix' gnulib modules. */ + __set_errno (ENOMEM); UNLOCK; return -1; }