[RFA:] add _mkdir_r, fixing fallout from "add mkstemps, mkdtemp"

Jeff Johnston jjohnstn@redhat.com
Wed Aug 12 22:32:00 GMT 2009


Hans-Peter Nilsson wrote:
>> 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?
>
>   
There is no need for libnosys changes.  This is in line with fcntl and 
rename support which have HAVE_XXX checks in newlib and no libnosys 
functions.
>>  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.
>
>   
Yes, that's correct.   I have checked in your newlib pieces with my 
patch added to mktemp.c.  There is no libnosys part required so that is 
left out.  Let me know if I missed anything.

-- Jeff J.
> brgds, H-P
>   



More information about the Newlib mailing list