Git development
 help / color / mirror / Atom feed
* Trying to get GIT running on SCO OpenServer
@ 2008-01-23 21:26 Aidan Van Dyk
  2008-01-23 23:48 ` Johannes Schindelin
  2008-01-24 16:23 ` Aidan Van Dyk
  0 siblings, 2 replies; 10+ messages in thread
From: Aidan Van Dyk @ 2008-01-23 21:26 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1770 bytes --]


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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-01-24 16:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-23 21:26 Trying to get GIT running on SCO OpenServer Aidan Van Dyk
2008-01-23 23:48 ` Johannes Schindelin
2008-01-24  0:17   ` Jakub Narebski
2008-01-24  0:25   ` Junio C Hamano
2008-01-24  2:33     ` H. Peter Anvin
2008-01-24  2:48       ` Junio C Hamano
2008-01-24  2:50       ` Linus Torvalds
2008-01-24  3:01         ` Luke Lu
2008-01-24  3:19           ` Linus Torvalds
2008-01-24 16:23 ` Aidan Van Dyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox