login
Header Space

 
 

Trying to get GIT running on SCO OpenServer

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Wednesday, January 23, 2008 - 5:26 pm

I know - openserver, yuch, bla bla bla... Not my choice, but sometimes
we have to do things we don't like...

But, I've come across this in strbuf.c:
        va_start(ap, fmt);
        len = vsnprintf(sb->buf + sb->len, sb->alloc - sb->len, fmt, ap);
        va_end(ap);
        if (len < 0)
                die("your vsnprintf is broken");

Now, that would seem to be the interpretation of vsnprintf I'm familiar
with too, but I read this in the SCO vsnprintf man page:

   snprintf (vsnprintf) behaves like sprintf (vsprintf), except that no
   more than maxsize characters are placed into the array, including the
   terminating null character. If more than maxsize characters were
   requested, the output array will contain exactly maxsize characters,
   with a null character being the last (when maxsize is nonzero); a
   negative value is returned.

   [...] 

   vfprintf(S-osr5), vprintf(S-osr5), and vsprintf(S-osr5) are conformant
   with :

   X/Open Portability Guide, Issue 3, 1989 ;
   and ANSI X3.159-1989 Programming Language -- C .

I guess this means that git is designed to not work on on systems such
as SCO that have what we (myself included) consider "broken" vsnprintf.

Is there any interest in trying to get strbuf to work with such broken
vsnprintf implementations?

I've got a couple of other small patches to make it "compile" on
OpenServer, but if this is too brain-dead to be worth supporting, there
is no point in cluttering things up more for compatibility which can't
really be used anyways.

a.



-- 
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Trying to get GIT running on SCO OpenServer, Aidan Van Dyk, (Wed Jan 23, 5:26 pm)
Re: Trying to get GIT running on SCO OpenServer, Aidan Van Dyk, (Thu Jan 24, 12:23 pm)
Re: Trying to get GIT running on SCO OpenServer, Johannes Schindelin, (Wed Jan 23, 7:48 pm)
Re: Trying to get GIT running on SCO OpenServer, Junio C Hamano, (Wed Jan 23, 8:25 pm)
Re: Trying to get GIT running on SCO OpenServer, H. Peter Anvin, (Wed Jan 23, 10:33 pm)
Re: Trying to get GIT running on SCO OpenServer, Linus Torvalds, (Wed Jan 23, 10:50 pm)
Re: Trying to get GIT running on SCO OpenServer, Luke Lu, (Wed Jan 23, 11:01 pm)
Re: Trying to get GIT running on SCO OpenServer, Linus Torvalds, (Wed Jan 23, 11:19 pm)
Re: Trying to get GIT running on SCO OpenServer, Junio C Hamano, (Wed Jan 23, 10:48 pm)
Re: Trying to get GIT running on SCO OpenServer, Jakub Narebski, (Wed Jan 23, 8:17 pm)
speck-geostationary