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

Re: [PATCH] Add compat/vsnprintf.c for systems that returns -1 on maxsize reached

From
MRMichal Rokos <michal.rokos@nextsoft.cz>
Date
Mar 10, 2008, 09:47 UTC
Message-ID
<200803101047.47044.michal.rokos@nextsoft.cz>
In-Reply-To
<47D4FF55.8020909@viscovery.net>
On Monday 10 March 2008 10:28:53 Johannes Sixt wrote:
Show 14 quoted lines
> Michal Rokos schrieb:
> > Hello,
> >
> > I've managed to run testcase on
> > Tru64 OSF1 <hostname> V5.1 2650 alpha
> > and it returns
> > case1: 0
> > case2: 4
> > case3: 5
> > case4: 5
> > which is sad since our vsnprintf() cannot detect this ill behaviour.
>
> Ugh! We'd need to run the loop until we get a return value that is not
> negative and less than the size specified...

Hmm, I'm afraid we have to grow our buffer size until 2 successive runs return the same value and that value is not -1.

But - do we want to fix it now, when we don't even know that else would be needed for Tru64 port? There's even no Tru64 paragraph in Makefile yet.

Michal
PS: I have no ambition to port git to Tru64 since that test machine is 
accessible via friend of my friend - so I have to IM him the code and he 
returns value :)
-- 
Michal Rokos

NextSoft s.r.o.
Vyskočilova 1/1410
140 21 Praha 4
phone:  +420 267 224 311
fax:    +420 267 224 307
mobile: +420 736 646 591
e-mail: michal.rokos@nextsoft.cz
Previous: Johannes SixtNext: Johannes Sixt
Message 25 of 26 in “Add compat/vsnprintf.c for systems that returns -1 on maxsize reached”
  1. Add compat/vsnprintf.c for systems that returns -1 on maxsize reachedMichal Rokos, Mar 4, 2008
  2. Johannes SchindelinMar 4, 2008
  3. Finn Arne GangstadMar 4, 2008
  4. Johannes SixtMar 4, 2008
  5. Morten WelinderMar 4, 2008
  6. Johannes SixtMar 4, 2008
  7. Wayne DavisonMar 4, 2008
  8. Michal RokosMar 5, 2008
  9. Jeff KingMar 5, 2008
  10. Johannes SixtMar 5, 2008
  11. Michal RokosMar 5, 2008
  12. Johannes SixtMar 5, 2008
  13. Michal RokosMar 5, 2008
  14. Johannes SixtMar 5, 2008
  15. Michal RokosMar 5, 2008
  16. Wayne DavisonMar 5, 2008
  17. Johannes SixtMar 5, 2008
  18. Wayne DavisonMar 5, 2008
  19. Junio C HamanoMar 5, 2008
  20. Mike RalphsonMar 5, 2008
  21. Robert HainesMar 5, 2008
  22. Michal RokosMar 5, 2008
  23. Michal RokosMar 10, 2008
  24. Johannes SixtMar 10, 2008
  25. Michal RokosMar 10, 2008
  26. Johannes SixtMar 10, 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.