summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-08-27 03:55:54 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-08-27 03:55:54 +0000
commit707a0a946d55df772012b282c594df790371ec23 (patch)
tree84dec9dacaafa14ca3507be443a228137fea9a03 /missing
parent39ac1d7c22072f2d520738098692bdbce2f380df (diff)
1.1c3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/snprintf.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/missing/snprintf.c b/missing/snprintf.c
index 804fb1bd8b..68951c3d87 100644
--- a/missing/snprintf.c
+++ b/missing/snprintf.c
@@ -64,6 +64,9 @@
#if defined(__STDC__)
# define __P(x) x
# include <stdarg.h>
+# if !defined(__P)
+# define __P(x) x
+# endif
#else
# undef __P
# define __P(x) ()
@@ -74,6 +77,10 @@
#define _BSD_VA_LIST_ va_list
#endif
+#if defined(__hpux) && !defined(__GNUC__)
+#define const
+#endif
+
#if defined(sgi)
#undef __const
#define __const
@@ -96,7 +103,9 @@
* boundaries. THIS IS A CROCK, but for now there is no way around it.
*/
#if !defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI__)
+#if !defined(__hpux)
typedef off_t fpos_t;
+#endif
#else
typedef struct __sfpos {
char _pos[8];
@@ -241,9 +250,9 @@ static __inline int __sputc(int _c, FILE *_p) {
#endif /* lint */
-
-
+#if defined(__hpux) && !defined(__GNUC__)
#include <string.h>
+#endif
/*
* I/O descriptors for __sfvwrite().
@@ -277,8 +286,9 @@ static BSD__sfvwrite(fp, uio)
if ((len = uio->uio_resid) == 0)
return (0);
-
+#ifndef __hpux
#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
#define COPY(n) (void)memcpy((void *)fp->_p, (void *)p, (size_t)(n))
iov = uio->uio_iov;
@@ -349,11 +359,12 @@ err:
#define u_short unsigned short
#define u_int unsigned int
-#include <limits.h>
-#if !defined(__CYGWIN32__)
+#if !defined(__CYGWIN32__) && (defined(__hpux) && !defined(__GNUC__))
#include <stdlib.h>
#endif
+#if defined(__hpux) && !defined(__GNUC__)
#include <string.h>
+#endif
#if defined(__STDC__)
# include <stdarg.h>