From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib <newlib@sourceware.org>
Subject: Re: mkdtemp() and HAVE_MKDIR
Date: Wed, 1 Feb 2023 07:58:09 +0100 [thread overview]
Message-ID: <6b094258-45cf-3b5d-8b4a-7de97fcfa8ff@embedded-brains.de> (raw)
In-Reply-To: <Y9jY/bjiYV5q3Bmb@calimero.vinschen.de>
On 31.01.23 10:01, Corinna Vinschen wrote:
> On Jan 30 10:11, Sebastian Huber wrote:
>> Hello,
>>
>> in the mkdtemp() implementation we have:
>>
>> for (;;)
>> {
>> #if !defined _ELIX_LEVEL || _ELIX_LEVEL >= 4
>> if (domkdir)
>> {
>> #ifdef HAVE_MKDIR
>> if (_mkdir_r (ptr, path, 0700) == 0)
>> return 1;
>> if (_REENT_ERRNO(ptr) != EEXIST)
>> return 0;
>> #else /* !HAVE_MKDIR */
>> _REENT_ERRNO(ptr) = ENOSYS;
>> return 0;
>> #endif /* !HAVE_MKDIR */
>> }
>> else
>> #endif /* _ELIX_LEVEL */
>>
>> The HAVE_MKDIR was added by:
>>
>> commit 12387ab6f77d6ae4fa3d8fdc1756d416a27197dd
>> Author: Jeff Johnston<jjohnstn@redhat.com>
>> Date: Wed Aug 12 18:22:38 2009 +0000
>>
>> 2009=08-12 Jeff Johnston<jjohnstn@redhat.com>
>>
>> * libc/stdio/mktemp.c (_gettemp): Do not call _mkdir_r unless
>> HAVE_MKDIR is defined.
>>
>> Do we really need this check since Newlib provides an mkdir()
>> implementation? How should a system set the HAVE_MKDIR define?
> I asked the same question back in 2009:
> https://sourceware.org/pipermail/newlib/2009/007905.html
> and got this reply from Jeff:
> https://sourceware.org/pipermail/newlib/2009/007906.html
Thanks, I will add it to configure.host for RTEMS.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
prev parent reply other threads:[~2023-02-01 6:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 9:11 Sebastian Huber
2023-01-31 9:01 ` Corinna Vinschen
2023-02-01 6:58 ` Sebastian Huber [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b094258-45cf-3b5d-8b4a-7de97fcfa8ff@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).