summaryrefslogtreecommitdiffstats
path: root/missing/vsnprintf.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 05:11:18 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-23 05:11:18 +0000
commitbe0dff43dcc58f4f251460eb43d9d5b784e0c633 (patch)
tree53c2e4dfd9eaf8490faaa12d75793d30cf513722 /missing/vsnprintf.c
parentfe6e1c3ce8e4d48f8c177fd1fe4f1b07db770329 (diff)
downloadruby-be0dff43dcc58f4f251460eb43d9d5b784e0c633.tar.gz
ruby-be0dff43dcc58f4f251460eb43d9d5b784e0c633.tar.xz
ruby-be0dff43dcc58f4f251460eb43d9d5b784e0c633.zip
* re.c (KR_REHASH): should cast to unsigned for 64bit CPU.
[ruby-core:06721] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing/vsnprintf.c')
-rw-r--r--missing/vsnprintf.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c
index 3a922b721..11f4de350 100644
--- a/missing/vsnprintf.c
+++ b/missing/vsnprintf.c
@@ -111,6 +111,13 @@
#endif /* People who don't like const sys_error */
#include <stddef.h>
+#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
+#include <string.h>
+#endif
+
+#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
+#include <stdlib.h>
+#endif
#ifndef NULL
#define NULL 0
@@ -194,6 +201,9 @@ typedef struct __sFILE {
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
#define __sfileno(p) ((p)->_file)
+#undef feof
+#undef ferror
+#undef clearerr
#define feof(p) __sfeof(p)
#define ferror(p) __sferror(p)
#define clearerr(p) __sclearerr(p)
@@ -203,10 +213,6 @@ typedef struct __sFILE {
#endif
-#if defined(__hpux) && !defined(__GNUC__) || defined(__DECC)
-#include <string.h>
-#endif
-
/*
* I/O descriptors for __sfvwrite().
*/
@@ -303,10 +309,6 @@ static int BSD__sfvwrite(fp, uio)
* This code is large and complicated...
*/
-#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
-#include <stdlib.h>
-#endif
-
/*
* Flush out all the vectors defined by the given uio,
* then reset it so that it can be reused.