curl-users
[patch] 7.10.7: A cross-compilation improvement for the argv test
From: Maciej W. Rozycki <macro_at_ds2.pg.gda.pl>
Date: Sat, 15 Nov 2003 17:58:42 +0100 (CET)
Date: Sat, 15 Nov 2003 17:58:42 +0100 (CET)
Hello,
As of 7.10.7 there is a problem when cross-compiling curl. The writable
argv test does not use a cache variable and therefore its result cannot be
overridden and the default used might not be satisfactory.
Here is an obvious fix.
2003-11-15 Maciej W. Rozycki <macro_at_ds2.pg.gda.pl>
* configure.ac: Use a cache variable for the writable argv test to
aid cross-compilation.
I've successfully tested it doing a build for the mipsel-linux host using
an i386-linux build system. Please apply.
Maciej
-- + Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: macro_at_ds2.pg.gda.pl, PGP key available + curl-7.10.7-argv.patch diff -up --recursive --new-file curl-7.10.7.macro/configure.ac curl-7.10.7/configure.ac --- curl-7.10.7.macro/configure.ac 2003-08-14 22:44:06.000000000 +0000 +++ curl-7.10.7/configure.ac 2003-10-28 16:32:50.000000000 +0000 @@ -352,18 +352,30 @@ dnl Check if the operating system allows dnl ********************************************************************** AC_MSG_CHECKING([if argv can be written to]) +AC_CACHE_VAL(curl_cv_writable_argv, [ AC_RUN_IFELSE([[ int main(int argc, char ** argv) { argv[0][0] = ' '; return (argv[0][0] == ' ')?0:1; } ]], + curl_cv_writable_argv=yes, + curl_cv_writable_argv=no, + curl_cv_writable_argv=cross) +]) +case $curl_cv_writable_argv in +yes) AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) - AC_MSG_RESULT(yes), - AC_MSG_RESULT(no), + AC_MSG_RESULT(yes) + ;; +no) + AC_MSG_RESULT(no) + ;; +*) AC_MSG_RESULT(no) AC_MSG_WARN([the previous check could not be made default was used]) -) + ;; +esac dnl ********************************************************************** dnl Check for the presence of Kerberos4 libraries and headers ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmplReceived on 2003-11-15