Mercurial > hg > octave-nkf > gnulib-hg
changeset 8831:d3f907c33d15
Work around broken snprintf function on BeOS.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 18 May 2007 17:45:52 +0000 |
parents | abc2bcb16721 |
children | 1466c973f476 |
files | ChangeLog lib/vasnprintf.c |
diffstat | 2 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-05-18 Bruno Haible <bruno@clisp.org> + + * lib/vasnprintf.c (USE_SNPRINTF): Define to 0 on BeOS. + 2007-05-18 Bruno Haible <bruno@clisp.org> * lib/vasnprintf.m4 (VASNPRINTF) [WIN32]: Use %I64d instead of %lld
--- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -111,7 +111,14 @@ # define DIRECTIVE char_directive # define DIRECTIVES char_directives # define PRINTF_PARSE printf_parse -# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) +# /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. + But don't use it on BeOS, since BeOS snprintf produces no output if the + size argument is >= 0x3000000. */ +# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ +# define USE_SNPRINTF 1 +# else +# define USE_SNPRINTF 0 +# endif # if HAVE_DECL__SNPRINTF /* Windows. */ # define SNPRINTF _snprintf