From 2693eddb3291848e0c2193f01d2ffb16639d08a8 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 19 Jul 2010 18:25:41 +0000 Subject: [PATCH] Document mkostemp and mkostemps. * textbinary.sgml (textbin-devel): Document temp file behavior. (textbin-issue): Use sed rather than cat as an example of a default-mode application. * new-features.sgml (ov-new1.7.6): Document mkostemp[s]. --- winsup/doc/ChangeLog | 7 +++++++ winsup/doc/new-features.sgml | 4 ++++ winsup/doc/textbinary.sgml | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index ca4b196a8..f2e49999a 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,10 @@ +2010-07-19 Eric Blake + + * textbinary.sgml (textbin-devel): Document temp file behavior. + (textbin-issue): Use sed rather than cat as an example of a + default-mode application. + * new-features.sgml (ov-new1.7.6): Document mkostemp[s]. + 2010-06-27 Yaakov Selkowitz * Makefile.in: Use "xmlto pdf" instead of docbook2pdf. diff --git a/winsup/doc/new-features.sgml b/winsup/doc/new-features.sgml index 97c2809c2..8cef1f9b5 100644 --- a/winsup/doc/new-features.sgml +++ b/winsup/doc/new-features.sgml @@ -30,6 +30,10 @@ strings. locale(1) prints these values just as on Linux. nl_langinfo(3) allows to fetch them. + +New interfaces mkostemp(3) and mkostemps(3) are added. + + diff --git a/winsup/doc/textbinary.sgml b/winsup/doc/textbinary.sgml index 98aa2b1ae..7f4aae5fb 100644 --- a/winsup/doc/textbinary.sgml +++ b/winsup/doc/textbinary.sgml @@ -23,7 +23,7 @@ standard input and output) as text. All other programs (such as would use binary mode. In practice with Cygwin, programs that deal explicitly with object files specify binary mode (this is the case of od, which is helpful to diagnose CR problems). Most -other programs (such as cat, cmp, +other programs (such as sed, cmp, tr) use the default mode. @@ -113,6 +113,11 @@ specified with the flag O_BINARY and text mode with O_TEXT. These symbols are defined in fcntl.h. +The mkstemp() and mkstemps() +calls force binary mode. Use mkostemp() or +mkostemps() with the same flags +as open() for more control on temporary files. + In the fopen() and popen() function calls, binary mode can be specified by adding a b to the mode string. Text mode is specified by adding a t