summaryrefslogtreecommitdiffstats
path: root/missing/vsnprintf.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-22 15:22:36 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-22 15:22:36 +0000
commit3afe82becf948b9b076ac513f3b3cb3524f73886 (patch)
tree0903aff6deb5edb3c19200bed15fa8d097a60880 /missing/vsnprintf.c
parent3d73102bbe1b0b7736c59c3f6bbf6d1e04344937 (diff)
downloadruby-3afe82becf948b9b076ac513f3b3cb3524f73886.tar.gz
ruby-3afe82becf948b9b076ac513f3b3cb3524f73886.tar.xz
ruby-3afe82becf948b9b076ac513f3b3cb3524f73886.zip
* 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
Diffstat (limited to 'missing/vsnprintf.c')
-rw-r--r--missing/vsnprintf.c6
1 files changed, 5 insertions, 1 deletions
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 <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; \
OSZAR »