Re: Trying to get GIT running on SCO OpenServer

5 messages, 4 authors, 2016-06-15 · open the first message on its own page

Re: Trying to get GIT running on SCO OpenServer

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:08

Johannes Schindelin [off-list ref] writes:
FWIW we had the same problem in MinGW, and Hannes Sixt solved it:

http://repo.or.cz/w/git/mingw/j6t.git?a=commitdiff;h=b8e84a68f01a2386b2071e1bdc8e24de809a3f6d

That might give you an idea how to solve the issue.  Maybe you even make a 
git patch out of it?  With a Makefile variable BROKEN_SNPRINTF=YesPlease, 
maybe?
Hmmm.  Looking at that change makes me wonder if that solution
is Kosher.  The value of the va_list you pass to vsnprintf() is
unspecified after the call.

It may be Ok as mingw-only "compatibility wrapper", but I think
you have to be a bit careful.  It is not a general solution for
any BROKEN_SNPRINTF.

Re: Trying to get GIT running on SCO OpenServer

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:44:08

Junio C Hamano wrote:
Johannes Schindelin [off-list ref] writes:
quoted
FWIW we had the same problem in MinGW, and Hannes Sixt solved it:

http://repo.or.cz/w/git/mingw/j6t.git?a=commitdiff;h=b8e84a68f01a2386b2071e1bdc8e24de809a3f6d

That might give you an idea how to solve the issue.  Maybe you even make a 
git patch out of it?  With a Makefile variable BROKEN_SNPRINTF=YesPlease, 
maybe?
Hmmm.  Looking at that change makes me wonder if that solution
is Kosher.  The value of the va_list you pass to vsnprintf() is
unspecified after the call.

It may be Ok as mingw-only "compatibility wrapper", but I think
you have to be a bit careful.  It is not a general solution for
any BROKEN_SNPRINTF.
That's what va_copy() is for.

	-hpa

Re: Trying to get GIT running on SCO OpenServer

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:08


On Wed, 23 Jan 2008, H. Peter Anvin wrote:
That's what va_copy() is for.
Well, anybody who has such an old setup that they have a broken vsnprintf, 
I'd expect they don't have va_copy() either. It's C99, I think (although 
there were obviously implementations of it before that).

			Linus

Re: Trying to get GIT running on SCO OpenServer

From: Luke Lu <hidden>
Date: 2016-06-15 22:44:08

On Jan 23, 2008, at 6:50 PM, Linus Torvalds wrote:
On Wed, 23 Jan 2008, H. Peter Anvin wrote:
quoted
That's what va_copy() is for.
Well, anybody who has such an old setup that they have a broken  
vsnprintf,
I'd expect they don't have va_copy() either. It's C99, I think  
(although
there were obviously implementations of it before that).
I wonder what's the downside of just using a native format  
implementation like the one in Vstr[1] or bstring[2]?

strbuf_addf would be faster and immune to the buggy/outdated host  
*sprintf implementations.

__Luke

[1]: http://www.and.org/vstr/
[2]: http://bstring.sourceforge.net/

Re: Trying to get GIT running on SCO OpenServer

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:44:08


On Wed, 23 Jan 2008, Luke Lu wrote:
I wonder what's the downside of just using a native format implementation like
the one in Vstr[1] or bstring[2]?
I'd suggest taking the kernel vsnprintf() instead. It has the standard 
interface (no support for FP, but we don't care) so it should be pretty 
easy to just plug in, and it doesn't reaquire much of the environment 
(just a 64-bit divide&modulus-by-100000).

			Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help