From 707a0a946d55df772012b282c594df790371ec23 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 27 Aug 1998 03:55:54 +0000 Subject: 1.1c3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/snprintf.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'missing/snprintf.c') 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 +# 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 +#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 -#if !defined(__CYGWIN32__) +#if !defined(__CYGWIN32__) && (defined(__hpux) && !defined(__GNUC__)) #include #endif +#if defined(__hpux) && !defined(__GNUC__) #include +#endif #if defined(__STDC__) # include -- cgit v1.2.3