/************************************************
missing.h - prototype for *.c in ./missing, and
for missing timeval struct
created at: Sat May 11 23:46:03 JST 2002
************************************************/
#include <math.h> /* for INFINITY and NAN */
#ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
# include RUBY_ALTERNATIVE_MALLOC_HEADER
#if !defined(HAVE_STRUCT_TIMEVAL) || !defined(HAVE_STRUCT_TIMESPEC)
#if defined(HAVE_SYS_TIME_H)
# define M_PI 3.14159265358979323846
#ifndef RUBY_SYMBOL_EXPORT_BEGIN
# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
# define RUBY_SYMBOL_EXPORT_END /* end */
#if !defined(HAVE_STRUCT_TIMEVAL)
time_t tv_sec; /* seconds */
long tv_usec; /* microseconds */
#endif /* HAVE_STRUCT_TIMEVAL */
#if !defined(HAVE_STRUCT_TIMESPEC)
time_t tv_sec; /* seconds */
long tv_nsec; /* nanoseconds */
#if !defined(HAVE_STRUCT_TIMEZONE)
#define RUBY_EXTERN extern
RUBY_EXTERN double acosh(double);
RUBY_EXTERN double asinh(double);
RUBY_EXTERN double atanh(double);
RUBY_EXTERN char *crypt(const char *, const char *);
RUBY_EXTERN int dup2(int, int);
RUBY_EXTERN int eaccess(const char*, int);
RUBY_EXTERN double round(double); /* numeric.c */
RUBY_EXTERN int finite(double);
RUBY_EXTERN int flock(int, int);
RUBY_EXTERN double frexp(double, int *);
RUBY_EXTERN double hypot(double, double);
RUBY_EXTERN double erf(double);
RUBY_EXTERN double erfc(double);
RUBY_EXTERN double tgamma(double);
RUBY_EXTERN double lgamma_r(double, int *);
RUBY_EXTERN double cbrt(double);
#if !defined(INFINITY) || !defined(NAN)
union bytesequence4_or_float {
unsigned char bytesequence[4];
RUBY_EXTERN const union bytesequence4_or_float rb_infinity;
# define INFINITY (rb_infinity.float_value)
# define USE_RB_INFINITY 1
RUBY_EXTERN const union bytesequence4_or_float rb_nan;
# define NAN (rb_nan.float_value)
# define HUGE_VAL ((double)INFINITY)
# if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
# define isinf(x) (!finite(x) && !isnan(x))
# elif defined(__cplusplus) && __cplusplus >= 201103L
# include <cmath> // it must include constexpr bool isinf(double);
RUBY_EXTERN int isinf(double);
# if defined(__cplusplus) && __cplusplus >= 201103L
# include <cmath> // it must include constexpr bool isnan(double);
RUBY_EXTERN int isnan(double);
# define isfinite(x) finite(x)
RUBY_EXTERN double nan(const char *);
RUBY_EXTERN double nextafter(double x, double y);
RUBY_EXTERN int memcmp(const void *, const void *, size_t);
RUBY_EXTERN void *memmove(void *, const void *, size_t);
RUBY_EXTERN double modf(double, double *);
RUBY_EXTERN char *strchr(const char *, int);
RUBY_EXTERN char *strrchr(const char *, int);
RUBY_EXTERN char *strerror(int);
RUBY_EXTERN char *strstr(const char *, const char *);
RUBY_EXTERN size_t strlcpy(char *, const char*, size_t);
RUBY_EXTERN size_t strlcat(char *, const char*, size_t);
RUBY_EXTERN int signbit(double x);
RUBY_EXTERN int ffs(int);
RUBY_EXTERN int ruby_getpeername(int, struct sockaddr *, socklen_t *);
RUBY_EXTERN int ruby_getsockname(int, struct sockaddr *, socklen_t *);
RUBY_EXTERN int ruby_shutdown(int, int);
RUBY_EXTERN int ruby_close(int);
#ifndef HAVE_SETPROCTITLE
RUBY_EXTERN void setproctitle(const char *fmt, ...);
#ifndef HAVE_EXPLICIT_BZERO
RUBY_EXTERN void explicit_bzero(void *b, size_t len);
# if defined SecureZeroMemory
# define explicit_bzero(b, len) SecureZeroMemory(b, len)
#endif /* RUBY_MISSING_H */