From 38114e1c7d89a6d8a79845bbea41b898b55ce3f7 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> Date: Tue, 26 Jan 1999 10:08:18 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'v1_3_1_990126'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_3_1_990126@379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- missing/vsnprintf.c | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) (limited to 'missing/vsnprintf.c') diff --git a/missing/vsnprintf.c b/missing/vsnprintf.c index f0e9e8c672..22feac5f15 100644 --- a/missing/vsnprintf.c +++ b/missing/vsnprintf.c @@ -58,9 +58,6 @@ */ #include -#ifdef NT -typedef unsigned int size_t; -#endif #define u_long unsigned long #define u_short unsigned short #define u_int unsigned int @@ -104,6 +101,9 @@ typedef unsigned int size_t; #define __const #endif /* People who don't like const sys_error */ +#ifdef NT +typedef long size_t; +#endif #ifndef NULL #define NULL 0 @@ -179,32 +179,6 @@ typedef struct __sFILE { #define EOF (-1) -/* - * The __sfoo macros are here so that we can - * define function versions in the C library. - */ -#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) -#if defined(__GNUC__) && defined(__STDC__) -static __inline int __sputc(int _c, FILE *_p) { - if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) - return (*_p->_p++ = _c); - else - return (__swbuf(_c, _p)); -} -#else -/* - * This has been tuned to generate reasonable code on the vax using pcc. - */ -#define __sputc(c, p) \ - (--(p)->_w < 0 ? \ - (p)->_w >= (p)->_lbfsize ? \ - (*(p)->_p = (c)), *(p)->_p != '\n' ? \ - (int)*(p)->_p++ : \ - __swbuf('\n', p) : \ - __swbuf((int)(c), p) : \ - (*(p)->_p = (c), (int)*(p)->_p++)) -#endif - #define __sfeof(p) (((p)->_flags & __SEOF) != 0) #define __sferror(p) (((p)->_flags & __SERR) != 0) #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) @@ -218,11 +192,6 @@ static __inline int __sputc(int _c, FILE *_p) { #define fileno(p) __sfileno(p) #endif -#ifndef lint -#define getc(fp) __sgetc(fp) -#define putc(x, fp) __sputc(x, fp) -#endif /* lint */ - #if defined(__hpux) && !defined(__GNUC__) #include -- cgit v1.2.3