[Date Prev][Date Next]
RE: PATCH: ud.c mkstemp becomes tmpfile (ITS#1500)
In the HEAD stream, you'll see that ldapsearch.c now uses mkstemp as well.
The mkstemp function must be used when the caller must know the temp file's
name, as is the case for both ud and ldapsearch. The mkstemp function
updates the string passed in to reflect the temp file's name.
Also in the HEAD stream is a fix for Windows. The mkstemp function is
implemented in liblutil/utils.c. It uses the mktemp function, which is
supported in Windows. The mktemp function does everything the mkstemp
function does, except that it does not actually open the file. The
implementation in liblutil/utils.c takes care of this by doing the open with
the O_EXCL flag.
> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> Sent: Thursday, December 20, 2001 3:46 AM
> To: openldap-its@OpenLDAP.org
> Subject: PATCH: ud.c mkstemp becomes tmpfile (ITS#1500)
> Full_Name: Mike Gerdts
> Version: 2.0.18
> OS: Win2k
> URL: ftp://ftp.openldap.org/incoming/openldap-ud-tmpfile.patch
> Submission from: (NULL) (184.108.40.206)
> Current ud is the only program in openldap that uses the
> mkstemp() function.
> The rest that need similar functionality use tmpfile(). The
> patch referenced
> below fixes that inconsistency.
> Why do I care? Win2k does not appear to have mkstemp() but does have