From: Johannes Sixt <j.sixt@viscovery•net>
To: Michal Rokos <michal.rokos@nextsoft•cz>
Cc: GIT <git@vger•kernel.org>
Subject: Re: [PATCH] Add compat/vsnprintf.c for systems that returns -1 on maxsize reached
Date: Wed, 05 Mar 2008 10:18:10 +0100 [thread overview]
Message-ID: <47CE6552.60308@viscovery.net> (raw)
In-Reply-To: <200803050937.40345.michal.rokos@nextsoft.cz>
Michal Rokos schrieb:
> HP-UX B.11.11 9000/800
> case1: -1
> case2: -1
> case3: 5
> case4: 5
>
> HP-UX B.11.23 ia64
> case1: -1
> case2: -1
> case3: 5
> case4: 5
>
> So HPUX impl is the same as a Windows one. So we can share the replacement.
> Please note that there's no va_copy() on HPUX.
It's not the same on Windows, which returns:
case1: -1
case2: 5
case3: 5
case4: 5
IOW, HPUX et.al. take the *size* of the buffer, whereas Windows takes the
maximal number of characters to write excluding NUL.
Which means that we need another configuration variable on Windows:
-DSNPRINTF_SIZE_CORR=1
and
#ifndef SNPRINTF_SIZE_CORR
#define SNPRINTF_SIZE_CORR 0
#endif
in the replacement implementation. But I can do this myself in the course
of the MinGW port.
BTW, this is not only an issue of vsnprintf, but also of snprintf!
-- Hannes
next prev parent reply other threads:[~2008-03-05 9:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-04 13:59 [PATCH] Add compat/vsnprintf.c for systems that returns -1 on maxsize reached Michal Rokos
2008-03-04 14:09 ` Johannes Schindelin
2008-03-04 14:09 ` Finn Arne Gangstad
2008-03-04 16:19 ` Johannes Sixt
2008-03-04 14:12 ` Morten Welinder
2008-03-04 16:28 ` Johannes Sixt
2008-03-04 23:51 ` Wayne Davison
2008-03-05 8:37 ` Michal Rokos
2008-03-05 8:44 ` Jeff King
2008-03-05 9:18 ` Johannes Sixt [this message]
2008-03-05 13:55 ` Michal Rokos
2008-03-05 14:28 ` Johannes Sixt
2008-03-05 15:00 ` Michal Rokos
2008-03-05 15:22 ` Johannes Sixt
2008-03-05 15:48 ` Michal Rokos
2008-03-05 15:54 ` Wayne Davison
2008-03-05 16:04 ` Johannes Sixt
2008-03-05 22:33 ` Wayne Davison
2008-03-05 21:05 ` Junio C Hamano
2008-03-05 9:22 ` Mike Ralphson
2008-03-05 10:35 ` Robert Haines
2008-03-05 13:58 ` Michal Rokos
2008-03-10 8:59 ` Michal Rokos
2008-03-10 9:28 ` Johannes Sixt
2008-03-10 9:47 ` Michal Rokos
2008-03-10 10:05 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47CE6552.60308@viscovery.net \
--to=j.sixt@viscovery$(echo .)net \
--cc=git@vger$(echo .)kernel.org \
--cc=michal.rokos@nextsoft$(echo .)cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox