This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [RFA:] add _mkdir_r, fixing fallout from "add mkstemps, mkdtemp"
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: jjohnstn at redhat dot com
- Cc: ebb9 at byu dot net, hans-peter dot nilsson at axis dot com, newlib at sources dot redhat dot com
- Date: Wed, 12 Aug 2009 19:40:47 +0200
- Subject: Re: [RFA:] add _mkdir_r, fixing fallout from "add mkstemps, mkdtemp"
> Date: Wed, 12 Aug 2009 12:26:14 -0400
> From: Jeff Johnston <jjohnstn@redhat.com>
> Actually, I don't agree with this. The better way to handle this is to
> protect the code with HAVE_MKDIR and put in the libnosys logic directly
> if it is not provided.
Can you rephrase the bit about the libnosys condition; should
that part of the patch be applied with a big #ifndef HAVE_MKDIR
around the guts of mkdir.c or what?
> Otherwise, this forces platforms to either
> implement _mkdir or link with libnosys which is unreasonable.
I was under the illusion that all targets that care already did
link with libnosys as a fallback, but with that prerequisite
gone I agree conditionalizing the call makes better sense.
> There are
> other optional syscalls already being checked for in newlib. I have
> put together a patch which I attached to this note. Let me know what
> you think.
This would work for me, too...but IIUC the reent.h part of the
patch I posted would still be be needed.
brgds, H-P