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

Corinna Vinschen vinschen@redhat.com
Mon Aug 17 00:18:00 GMT 2009


On Aug 12 18:32, Jeff Johnston wrote:
> Corinna Vinschen wrote:
>> As is, the patch breaks (not only) Cygwin because HAVE_MKDIR is nowhere
>> configured.  As a result, the code path for all targets will be the one
>> setting ptr->_errno to ENOSYS.  How do we add a check for HAVE_MKDIR
>> for cross builds?
>>
>>   
> A previous note in the discussion about this problem noted that Cygwin  
> was overriding the function that exercised the _mkdir_r call which is  
> why Cygwin wasn't getting a link exception since _mkdir_r wasn't wrapped  
> yet.

Never mind.  I was obviously tired yesterday evening and forgot completely
that Cygwin has its own mkdtemp implementation.

>> There's also a typo in the file in the name of the function mkdtemp:
>>
>> Index: libc/stdio/mktemp.c
>> ===================================================================
>> RCS file: /cvs/src/src/newlib/libc/stdio/mktemp.c,v
>> retrieving revision 1.12
>> diff -u -p -r1.12 mktemp.c
>> --- libc/stdio/mktemp.c	12 Aug 2009 18:22:38 -0000	1.12
>> +++ libc/stdio/mktemp.c	12 Aug 2009 22:06:21 -0000
>> @@ -301,7 +301,7 @@ _DEFUN(mkstemp, (path),
>>   # if !defined _ELIX_LEVEL || _ELIX_LEVEL >= 4
>>  char *
>> -_DEFUN(mkdemp, (path),
>> +_DEFUN(mkdtemp, (path),
>>         char *path)
>>  {
>>    return (_gettemp (_REENT, path, (int *) NULL, 1, 0) ? path : NULL);
>>
>>
>>   
> Feel free to check that in if you add HAVE_MKDIR to configure.host or  
> I'll do it if it turns out there isn't an issue.

Done.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat



More information about the Newlib mailing list