This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

add mkostemp


Sed wants to use the glibc invention of mkostemp as enhanced by gnulib, in
order to control the use of O_TEXT vs. O_BINARY vs. 0 (for native mount)
mode[1].  glibc added this interface for other reasons as well - it is
also useful to specify O_CLOEXEC, O_APPEND, and/or O_SYNC on some
temporary files.  In glibc, the flags argument explicitly excludes
O_ACCMODE bits, since temp files are already specified as O_RDWR, so I
copied that pattern.  (man-pages 3.23 documents mkostemp since glibc 2.7,
but fails to document mkostemps, even though it was added at the same time
as mkstemps in glibc 2.11).

[1] http://lists.gnu.org/archive/html/bug-coreutils/2010-07/msg00114.html

Okay to commit, along with a corresponding patch to doc/new-features.sgml
and a cygwin-specific patch to newlib's stdlib.h?

2010-07-19  Eric Blake  <eblake@redhat.com>

	* mktemp.cc (_gettemp): Add flags argument.  All callers updated.
	(mkostemp, mkostemps): New functions.
	* cygwin.din (mkostemp, mkostemps): Export.
	* posix.sgml: Document them.
	* include/cygwin/version.h: Bump version.

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: cygwin.patch37
Description: Text document

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]