From 3afe82becf948b9b076ac513f3b3cb3524f73886 Mon Sep 17 00:00:00 2001 From: yugui Date: Fri, 22 May 2009 15:22:36 +0000 Subject: * missing/vsnprintf.c (errno): [BUG] fixes a compilation error on SIZEOF_LONG > SIZEOF_INT. (BSD_vfprintf): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/vsnprintf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'missing') diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c index 840346c32..5718362fe 100644 --- a/missing/vsnprintf.c +++ b/missing/vsnprintf.c @@ -123,6 +123,10 @@ #define NULL 0 #endif +#if SIZEOF_LONG > SIZEOF_INT +# include +#endif + /* * NB: to fit things in six character monocase externals, the stdio * code uses the prefix `__s' for stdio objects, typically followed @@ -598,7 +602,7 @@ BSD_vfprintf(FILE *fp, const char *fmt0, va_list ap) #if SIZEOF_LONG > SIZEOF_INT /* abandon if too larger padding */ #define PAD_L(howmany, with) { \ - ln = (howmany); + ln = (howmany); \ if ((long)((int)ln) != ln) { \ errno = ENOMEM; \ goto error; \ -- cgit