diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index 3e231b5e4..fe47e959e 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,9 @@ +2010-08-30 Corinna Vinschen + + * new-features.sgml (ov-new1.7.7): Document change to binmode/textmode + link libs. + * textbinary.sgml (textbin-devel): Ditto. + 2010-08-28 Corinna Vinschen * new-features.sgml (ov-new1.7.7): Document change to avoid DLL diff --git a/winsup/doc/new-features.sgml b/winsup/doc/new-features.sgml index e459d5ffa..fdaa01ac4 100644 --- a/winsup/doc/new-features.sgml +++ b/winsup/doc/new-features.sgml @@ -17,6 +17,12 @@ Make sure to follow the Microsoft security advisory concerning DLL hijacking. See the Microsoft Security Advisory (2269637) "Insecure Library Loading Could Allow Remote Code Execution" for details. + +Allow to link against -lbinmode instead of /lib/binmode.o. Same for +-ltextmode, -ltextreadmode and -lautomode. +See for details. + + diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml index 7f4aae5fb..6e6e83025 100644 --- a/winsup/doc/textbinary.sgml +++ b/winsup/doc/textbinary.sgml @@ -142,38 +142,46 @@ in your project, like this: $ gcc my_tiny_app.c /lib/binmode.o -o my_tiny_app +Starting with Cygwin 1.7.7, you can use the even simpler: + + + $ gcc my_tiny_app.c -lbinmode -o my_tiny_app + + This adds code which sets the default open mode for all files opened by my_tiny_app to binary for reading and writing. -Cygwin provides the following object files to set the default open mode -just by linking an application against them: +Cygwin provides the following libraries and object files to set the +default open mode just by linking an application against them: -/lib/automode.o - Open files for reading in textmode - Open files for writing in binary mode +/lib/libautomode.a - Open files for reading in textmode, +/lib/automode.o open files for writing in binary mode -/lib/binmode.o - Open files for reading and writing in binary mode +/lib/libbinmode.a - Open files for reading and writing in binary mode +/lib/binmode.o -/lib/textmode.o - Open files for reading and writing in textmode +/lib/libtextmode.a - Open files for reading and writing in textmode +/lib/textmode.o -/lib/textreadmode.o - Open files for reading in textmode - Keep default behaviour for writing. +/lib/libtextreadmode.a - Open files for reading in textmode, +/lib/textreadmode.o keep default behaviour for writing.