Mercurial > hg > octave-nkf
changeset 15454:9b9f6dba39e0
build: Use putenv module from gnulib.
* bootstrap_gnulib.conf: Add putenv to list of modules.
* configure.ac: Remove AC_CHECK_FUNCS call for putenv.
* lo-utils.cc: Add gnulib:: decorator on putenv call.
* libgnu/Makefile.am: Automatically updated by addition of putenv.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 29 Sep 2012 15:41:18 -0700 |
parents | 2d7bdbdd9f5d |
children | 2fa06d83263a |
files | build-aux/bootstrap_gnulib.conf configure.ac libgnu/Makefile.am liboctave/util/lo-utils.cc |
diffstat | 4 files changed, 13 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/build-aux/bootstrap_gnulib.conf +++ b/build-aux/bootstrap_gnulib.conf @@ -56,6 +56,7 @@ open opendir pathmax + putenv progname readdir readlink
--- a/configure.ac +++ b/configure.ac @@ -1920,7 +1920,7 @@ AC_CHECK_FUNCS([_kbhit]) dnl There are no workarounds in the code for missing these functions. -AC_CHECK_FUNCS([modf pow putenv sqrt sqrtf], [], +AC_CHECK_FUNCS([modf pow sqrt sqrtf], [], [AC_MSG_ERROR([Missing function required to build Octave])]) ## exp2, round, tgamma function checks
--- a/libgnu/Makefile.am +++ b/libgnu/Makefile.am @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl base64 canonicalize chdir close closedir copysign copysignf crypto/md5 dup2 fclose fcntl fflush filemode float floor floorf fnmatch fopen fseek ftell getcwd gethostname getopt-gnu gettimeofday glob isatty link lstat malloc-gnu mkdir mkfifo mkostemp mktime nanosleep nproc open opendir pathmax progname readdir readlink realloc-gnu rename rmdir round roundf select sigaction signal sigprocmask sleep stat stddef stdint stdio strerror strftime strptime symlink sys_stat sys_time sys_times time times tmpfile trunc truncf unistd unlink vasprintf +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl base64 canonicalize chdir close closedir copysign copysignf crypto/md5 dup2 fclose fcntl fflush filemode float floor floorf fnmatch fopen fseek ftell getcwd gethostname getopt-gnu gettimeofday glob isatty link lstat malloc-gnu mkdir mkfifo mkostemp mktime nanosleep nproc open opendir pathmax progname putenv readdir readlink realloc-gnu rename rmdir round roundf select sigaction signal sigprocmask sleep stat stddef stdint stdio strerror strftime strptime symlink sys_stat sys_time sys_times time times tmpfile trunc truncf unistd unlink vasprintf AUTOMAKE_OPTIONS = 1.5 gnits @@ -1448,6 +1448,15 @@ ## end gnulib module progname +## begin gnulib module putenv + + +EXTRA_DIST += putenv.c + +EXTRA_libgnu_la_SOURCES += putenv.c + +## end gnulib module putenv + ## begin gnulib module raise
--- a/liboctave/util/lo-utils.cc +++ b/liboctave/util/lo-utils.cc @@ -106,7 +106,7 @@ // As far as I can see there's no way to distinguish between the // various errors; putenv doesn't have errno values. - if (putenv (new_item) < 0) + if (gnulib::putenv (new_item) < 0) (*current_liboctave_error_handler) ("putenv (%s) failed", new_item); }