# HG changeset patch # User Rik # Date 1348958478 25200 # Node ID 9b9f6dba39e0a791e282d017aa1e6913cb83ee82 # Parent 2d7bdbdd9f5d0d7aaadce335a47a3f92f8c63013 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. diff -r 2d7bdbdd9f5d -r 9b9f6dba39e0 build-aux/bootstrap_gnulib.conf --- a/build-aux/bootstrap_gnulib.conf Sat Sep 29 12:13:38 2012 -0700 +++ b/build-aux/bootstrap_gnulib.conf Sat Sep 29 15:41:18 2012 -0700 @@ -56,6 +56,7 @@ open opendir pathmax + putenv progname readdir readlink diff -r 2d7bdbdd9f5d -r 9b9f6dba39e0 configure.ac --- a/configure.ac Sat Sep 29 12:13:38 2012 -0700 +++ b/configure.ac Sat Sep 29 15:41:18 2012 -0700 @@ -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 diff -r 2d7bdbdd9f5d -r 9b9f6dba39e0 libgnu/Makefile.am --- a/libgnu/Makefile.am Sat Sep 29 12:13:38 2012 -0700 +++ b/libgnu/Makefile.am Sat Sep 29 15:41:18 2012 -0700 @@ -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 diff -r 2d7bdbdd9f5d -r 9b9f6dba39e0 liboctave/util/lo-utils.cc --- a/liboctave/util/lo-utils.cc Sat Sep 29 12:13:38 2012 -0700 +++ b/liboctave/util/lo-utils.cc Sat Sep 29 15:41:18 2012 -0700 @@ -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); }