]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix usage of setmode without declaration on cygwin.
authorEric Blake <ebb9@byu.net>
Fri, 11 Apr 2008 17:21:55 +0000 (17:21 +0000)
committerEric Blake <ebb9@byu.net>
Fri, 11 Apr 2008 17:21:55 +0000 (17:21 +0000)
* libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): Ensure
setmode has prototype for both mingw and cygwin.

ChangeLog
libltdl/config/ltmain.m4sh

index f806f5ad6f0a47942b21fce0a50cf232eebe6411..b4fac0219dd1428468782ed08aecccde8807ecac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-11  Eric Blake  <ebb9@byu.net>
+
+       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  <Ralf.Wildenhues@gmx.de>
 
        * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS): Move non-XSI
 
 2008-03-06  Peter O'Gorman  <peter@pogma.com>
 
-       * 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
 
        * libltdl/m4/ltoptions.m4 (_LT_SET_OPTIONS): Only set default
        LT_INIT values for LT_INIT, not LTDL_INIT.
-       Reported by Jochem Huhmann <joh@revier.com> 
+       Reported by Jochem Huhmann <joh@revier.com>
 
 2008-02-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
 
        * 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.
 
index 8ffcbaf902255914755cb539dab0e54fdaec4bf0..28022545f069ee703f5a669f779c10379960e3dd 100644 (file)
@@ -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 <direct.h>
 # include <process.h>
 # include <io.h>
+# define setmode _setmode
 #else
 # include <unistd.h>
 # include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+# endif
 #endif
 #include <malloc.h>
 #include <stdarg.h>
@@ -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