1 diff -ru gettext-original/gettext-runtime/intl/libgnuintl.h.in gettext/gettext-runtime/intl/libgnuintl.h.in
2 --- gettext-original/gettext-runtime/intl/libgnuintl.h.in Sun Nov 16 16:27:58 2003
3 +++ gettext/gettext-runtime/intl/libgnuintl.h.in Fri Aug 20 12:34:40 2004
5 or gettext() but for which the format string could be the return value
6 of _() or gettext() need to add this #include. Oh well. */
8 -#if !@HAVE_POSIX_PRINTF@
9 +#if !@HAVE_POSIX_PRINTF@ && !defined(__BEOS__)
13 diff -ru gettext-original/gettext-runtime/intl/printf.c gettext/gettext-runtime/intl/printf.c
14 --- gettext-original/gettext-runtime/intl/printf.c Wed Sep 17 18:09:12 2003
15 +++ gettext/gettext-runtime/intl/printf.c Fri Aug 20 12:34:40 2004
20 -#if !HAVE_POSIX_PRINTF
21 +#if !HAVE_POSIX_PRINTF && !defined(__BEOS__)
25 diff -ru gettext-original/gettext-runtime/libasprintf/autosprintf.cc gettext/gettext-runtime/libasprintf/autosprintf.cc
26 --- gettext-original/gettext-runtime/libasprintf/autosprintf.cc Mon Oct 28 20:44:32 2002
27 +++ gettext/gettext-runtime/libasprintf/autosprintf.cc Fri Aug 20 13:09:56 2004
30 #include "lib-asprintf.h"
33 +/* vasprintf emulation (borrowed from VLC) */
34 +#define vasprintf beossux_vasprintf
35 +int beossux_vasprintf(char **strp, const char *fmt, va_list ap)
37 + /* Guess we need no more than 100 bytes. */
39 + char *p = (char *) malloc( i_size );
50 + /* Try to print in the allocated space. */
51 + n = vsnprintf( p, i_size, fmt, ap );
53 + /* If that worked, return the string. */
54 + if (n > -1 && n < i_size)
59 + /* Else try again with more space. */
60 + if (n > -1) /* glibc 2.1 */
62 + i_size = n+1; /* precisely what is needed */
64 + else /* glibc 2.0 */
66 + i_size *= 2; /* twice the old size */
68 + if( (p = (char *) realloc( p, i_size ) ) == NULL)
80 diff -ru gettext-original/gettext-runtime/libasprintf/lib-asprintf.c gettext/gettext-runtime/libasprintf/lib-asprintf.c
81 --- gettext-original/gettext-runtime/libasprintf/lib-asprintf.c Fri Jun 20 14:52:05 2003
82 +++ gettext/gettext-runtime/libasprintf/lib-asprintf.c Fri Aug 20 12:34:40 2004
87 -#if !(HAVE_VASPRINTF && HAVE_POSIX_PRINTF)
88 +#if !(HAVE_VASPRINTF && HAVE_POSIX_PRINTF) && !defined(__BEOS__)
92 diff -ru gettext-original/gettext-runtime/libasprintf/lib-asprintf.h gettext/gettext-runtime/libasprintf/lib-asprintf.h
93 --- gettext-original/gettext-runtime/libasprintf/lib-asprintf.h Fri Jun 20 14:56:51 2003
94 +++ gettext/gettext-runtime/libasprintf/lib-asprintf.h Fri Aug 20 12:34:40 2004
99 -#if HAVE_VASPRINTF && HAVE_POSIX_PRINTF
100 +#if ( HAVE_VASPRINTF && HAVE_POSIX_PRINTF ) || defined(__BEOS__)
102 /* Get asprintf(), vasprintf() declarations. */