From: Eric Blake Date: Fri, 11 Apr 2008 17:21:55 +0000 (+0000) Subject: Fix usage of setmode without declaration on cygwin. X-Git-Tag: v2.2.4~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=484680fe022563c93a37dad3b1bca46028b1e866;p=thirdparty%2Flibtool.git Fix usage of setmode without declaration on cygwin. * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): Ensure setmode has prototype for both mingw and cygwin. --- diff --git a/ChangeLog b/ChangeLog index f806f5ad6..b4fac0219 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-11 Eric Blake + + Fix usage of setmode without declaration on cygwin. + * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): Ensure + setmode has prototype for both mingw and cygwin. + 2008-04-10 Ralf Wildenhues * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Move non-XSI @@ -182,7 +188,7 @@ 2008-03-06 Peter O'Gorman - * libltdl/m4/libtool.m4 (_LT_PROG_FC): Undo commit - bad idea. + * libltdl/m4/libtool.m4 (_LT_PROG_FC): Undo commit - bad idea. * libltdl/m4/libtool.m4 (_LT_PROG_FC): Report FC=no if the FC compiler is not a GNU compiler and the CXX compiler is a GNU @@ -332,7 +338,7 @@ * libltdl/m4/ltoptions.m4 (_LT_SET_OPTIONS): Only set default LT_INIT values for LT_INIT, not LTDL_INIT. - Reported by Jochem Huhmann + Reported by Jochem Huhmann 2008-02-01 Ralf Wildenhues @@ -500,8 +506,8 @@ * doc/notes.texi: Fix errors in previous commit. - * libltdl/m4/libtool.m4 (sys_lib_search_path_spec, - sys_lib_dlsearch_path_spec): Allow for a cache variable + * libltdl/m4/libtool.m4 (sys_lib_search_path_spec, + sys_lib_dlsearch_path_spec): Allow for a cache variable lt_cv_sys_lib_... to set these at configure time. * doc/notes.texi: Short note about the above change. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 8ffcbaf90..28022545f 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -1005,7 +1005,7 @@ compiler." exit $EXIT_SUCCESS } -$opt_help || { +$opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } @@ -2506,9 +2506,13 @@ EOF # include # include # include +# define setmode _setmode #else # include # include +# ifdef __CYGWIN__ +# include +# endif #endif #include #include @@ -2652,7 +2656,7 @@ EOF case "$host" in *mingw* | *cygwin* ) # make stdout use "unix" line endings - echo " _setmode(1,_O_BINARY);" + echo " setmode(1,_O_BINARY);" ;; esac