threads / discuss / 19723

mkstemps compat issue

Subject: mkstemps compat issue

## tl;dr

3 messages between Jun 7, 2009 and Jun 8, 2009.

replies: 2people: 2as markdown or json

Andreas Färber· Jun 7, 2009, 12:32 UTC · lore
Hello,

The merge commit b11cf09043f18b368ec0d988f064ea21247c843d introduced a git_mkstemps function in path.c, using mkstemps for the implementation. Unlike mkstemp that function is not part of POSIX, so we seem to need a NO_MKSTEMPS option and corresponding alternative code path.

Any suggestions how to best replace mkstemps?

Thanks, Andreas

[Please keep me cc'ed.]
Andreas Färber· Jun 7, 2009, 12:49 UTC · re: Andreas Färber · lore

Re: mkstemps compat issue

Am 07.06.2009 um 14:32 schrieb Andreas Färber:
Show 7 quoted lines
> The merge commit b11cf09043f18b368ec0d988f064ea21247c843d introduced  
> a git_mkstemps function in path.c, using mkstemps for the  
> implementation. Unlike mkstemp that function is not part of POSIX,  
> so we seem to need a NO_MKSTEMPS option and corresponding  
> alternative code path.
>
> Any suggestions how to best replace mkstemps?

Sorry for the noise... NO_MKSTEMPS=YesPlease does work correctly if typed correctly. (Thanks for the hint!)

It was a little confusing seeing mkstemps being used unconditionally in path.c, but it's being #defined in git-compat-util.h, so everything is fine.

Regards,
Andreas
David Aguilar· Jun 8, 2009, 01:13 UTC · re: Andreas Färber · lore

Re: mkstemps compat issue

On Sun, Jun 07, 2009 at 02:49:16PM +0200, Andreas Färber wrote:
Show 13 quoted lines
>
> Am 07.06.2009 um 14:32 schrieb Andreas Färber:
>
>> The merge commit b11cf09043f18b368ec0d988f064ea21247c843d introduced a 
>> git_mkstemps function in path.c, using mkstemps for the  
>> implementation. Unlike mkstemp that function is not part of POSIX, so 
>> we seem to need a NO_MKSTEMPS option and corresponding alternative code 
>> path.
>>
>> Any suggestions how to best replace mkstemps?
>
> Sorry for the noise... NO_MKSTEMPS=YesPlease does work correctly if  
> typed correctly. (Thanks for the hint!)
Thanks for keeping an eye on it.

I'm still keeping my eye on the patch that introduced the basename() compat function to see if we missed any Makefile settings for the non-linux platforms. We support a lot of platforms! =)

-- 
	David

← back to recent threads