Re: [PATCH] Add compat/vsnprintf.c for systems that returns -1 on maxsize reached
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Mar 10, 2008, 09:28 UTC
- Message-ID
- <47D4FF55.8020909@viscovery.net>
- In-Reply-To
- <200803100959.43611.michal.rokos@nextsoft.cz>
Michal Rokos schrieb:
Show 10 quoted lines
> 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...
-- Hannes