git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Trying to get GIT running on SCO OpenServer

From
Aidan Van Dyk <aidan@highrise.ca>
Date
Jan 23, 2008, 21:26 UTC
Message-ID
<20080123212613.GN2230@yugib.highrise.ca>

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.
Next: Johannes Schindelin
Message 1 of 10 in “Trying to get GIT running on SCO OpenServer”
  1. Aidan Van DykJan 23, 2008
  2. Johannes SchindelinJan 23, 2008
  3. Jakub NarebskiJan 24, 2008
  4. Junio C HamanoJan 24, 2008
  5. H. Peter AnvinJan 24, 2008
  6. Junio C HamanoJan 24, 2008
  7. Linus TorvaldsJan 24, 2008
  8. Luke LuJan 24, 2008
  9. Linus TorvaldsJan 24, 2008
  10. Aidan Van DykJan 24, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.