diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-22 15:22:36 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-05-22 15:22:36 +0000 |
commit | 4bdd854347bd9f8fad73f5af4978059fafabcdf6 (patch) | |
tree | 0903aff6deb5edb3c19200bed15fa8d097a60880 | |
parent | 5220b19b3e4160dceeee4d2cdd4b0824c635b85b (diff) |
* missing/vsnprintf.c (errno): [BUG] fixes a compilation
error on SIZEOF_LONG > SIZEOF_INT.
(BSD_vfprintf): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | missing/vsnprintf.c | 6 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Fri May 22 23:22:53 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp> + + * missing/vsnprintf.c (errno): [BUG] fixes a compilation + error on SIZEOF_LONG > SIZEOF_INT. + (BSD_vfprintf): ditto. + Fri May 22 23:20:48 2009 Yuki Sonoda (Yugui) <yugui@yugui.jp> * spec/default.mspec: follows runruby.rb's move at r23542. diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c index 840346c325..5718362fed 100644 --- a/missing/vsnprintf.c +++ b/missing/vsnprintf.c @@ -123,6 +123,10 @@ #define NULL 0 #endif +#if SIZEOF_LONG > SIZEOF_INT +# include <errno.h> +#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; \ |