mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
snprintf.c
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
707a0a946d
commit
b15d33e108
1 changed files with 18 additions and 15 deletions
|
@ -59,24 +59,36 @@
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
|
||||||
#undef __P
|
#undef __P
|
||||||
#if defined(__STDC__)
|
#if defined(__STDC__)
|
||||||
# define __P(x) x
|
|
||||||
# include <stdarg.h>
|
# include <stdarg.h>
|
||||||
# if !defined(__P)
|
# if !defined(__P)
|
||||||
# define __P(x) x
|
# define __P(x) x
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# undef __P
|
|
||||||
# define __P(x) ()
|
# define __P(x) ()
|
||||||
|
# if !defined(const)
|
||||||
# define const
|
# define const
|
||||||
|
# endif
|
||||||
# include <varargs.h>
|
# include <varargs.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef _BSD_VA_LIST_
|
#ifndef _BSD_VA_LIST_
|
||||||
#define _BSD_VA_LIST_ va_list
|
#define _BSD_VA_LIST_ va_list
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __STDC__
|
||||||
|
# include <limits.h>
|
||||||
|
#else
|
||||||
|
# ifndef LONG_MAX
|
||||||
|
# ifdef HAVE_LIMITS_H
|
||||||
|
# include <limits.h>
|
||||||
|
# else
|
||||||
|
/* assuming 32bit(2's compliment) long */
|
||||||
|
# define LONG_MAX 2147483647
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__hpux) && !defined(__GNUC__)
|
#if defined(__hpux) && !defined(__GNUC__)
|
||||||
#define const
|
#define const
|
||||||
#endif
|
#endif
|
||||||
|
@ -359,22 +371,13 @@ err:
|
||||||
#define u_short unsigned short
|
#define u_short unsigned short
|
||||||
#define u_int unsigned int
|
#define u_int unsigned int
|
||||||
|
|
||||||
#if !defined(__CYGWIN32__) && (defined(__hpux) && !defined(__GNUC__))
|
#if !defined(__CYGWIN32__) && defined(__hpux) && !defined(__GNUC__)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(__hpux) && !defined(__GNUC__)
|
#if defined(__hpux) && !defined(__GNUC__)
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__STDC__)
|
|
||||||
# include <stdarg.h>
|
|
||||||
#else
|
|
||||||
# include <varargs.h>
|
|
||||||
# undef __P
|
|
||||||
# define __P(x) ()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flush out all the vectors defined by the given uio,
|
* Flush out all the vectors defined by the given uio,
|
||||||
* then reset it so that it can be reused.
|
* then reset it so that it can be reused.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue