00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef RUBY_MISSING_H
00012 #define RUBY_MISSING_H 1
00013
00014 #if defined(__cplusplus)
00015 extern "C" {
00016 #if 0
00017 }
00018 #endif
00019 #endif
00020
00021 #include "ruby/config.h"
00022 #include <stddef.h>
00023 #include <math.h>
00024 #ifdef RUBY_EXTCONF_H
00025 #include RUBY_EXTCONF_H
00026 #endif
00027
00028 #if !defined(HAVE_STRUCT_TIMEVAL) || !defined(HAVE_STRUCT_TIMESPEC)
00029 #if defined(HAVE_TIME_H)
00030 # include <time.h>
00031 #endif
00032 #if defined(HAVE_SYS_TIME_H)
00033 # include <sys/time.h>
00034 #endif
00035 #endif
00036
00037 #ifndef RUBY_SYMBOL_EXPORT_BEGIN
00038 # define RUBY_SYMBOL_EXPORT_BEGIN
00039 # define RUBY_SYMBOL_EXPORT_END
00040 #endif
00041
00042 #if !defined(HAVE_STRUCT_TIMEVAL)
00043 struct timeval {
00044 time_t tv_sec;
00045 long tv_usec;
00046 };
00047 #endif
00048
00049 #if !defined(HAVE_STRUCT_TIMESPEC)
00050 struct timespec {
00051 time_t tv_sec;
00052 long tv_nsec;
00053 };
00054 #endif
00055
00056 #if !defined(HAVE_STRUCT_TIMEZONE)
00057 struct timezone {
00058 int tz_minuteswest;
00059 int tz_dsttime;
00060 };
00061 #endif
00062
00063 #ifdef RUBY_EXPORT
00064 #undef RUBY_EXTERN
00065 #endif
00066 #ifndef RUBY_EXTERN
00067 #define RUBY_EXTERN extern
00068 #endif
00069
00070 RUBY_SYMBOL_EXPORT_BEGIN
00071
00072 #ifndef HAVE_ACOSH
00073 RUBY_EXTERN double acosh(double);
00074 RUBY_EXTERN double asinh(double);
00075 RUBY_EXTERN double atanh(double);
00076 #endif
00077
00078 #ifndef HAVE_CRYPT
00079 RUBY_EXTERN char *crypt(const char *, const char *);
00080 #endif
00081
00082 #ifndef HAVE_DUP2
00083 RUBY_EXTERN int dup2(int, int);
00084 #endif
00085
00086 #ifndef HAVE_EACCESS
00087 RUBY_EXTERN int eaccess(const char*, int);
00088 #endif
00089
00090 #ifndef HAVE_ROUND
00091 RUBY_EXTERN double round(double);
00092 #endif
00093
00094 #ifndef HAVE_FINITE
00095 RUBY_EXTERN int finite(double);
00096 #endif
00097
00098 #ifndef HAVE_FLOCK
00099 RUBY_EXTERN int flock(int, int);
00100 #endif
00101
00102
00103
00104
00105
00106
00107
00108 #ifndef HAVE_HYPOT
00109 RUBY_EXTERN double hypot(double, double);
00110 #endif
00111
00112 #ifndef HAVE_ERF
00113 RUBY_EXTERN double erf(double);
00114 RUBY_EXTERN double erfc(double);
00115 #endif
00116
00117 #ifndef HAVE_TGAMMA
00118 RUBY_EXTERN double tgamma(double);
00119 #endif
00120
00121 #ifndef HAVE_LGAMMA_R
00122 RUBY_EXTERN double lgamma_r(double, int *);
00123 #endif
00124
00125 #ifndef HAVE_CBRT
00126 RUBY_EXTERN double cbrt(double);
00127 #endif
00128
00129 #if !defined(INFINITY) || !defined(NAN)
00130 union bytesequence4_or_float {
00131 unsigned char bytesequence[4];
00132 float float_value;
00133 };
00134 #endif
00135
00136 #ifdef INFINITY
00137 # define HAVE_INFINITY
00138 #else
00139
00140 RUBY_EXTERN const union bytesequence4_or_float rb_infinity;
00141 # define INFINITY (rb_infinity.float_value)
00142 #endif
00143
00144 #ifdef NAN
00145 # define HAVE_NAN
00146 #else
00147
00148 RUBY_EXTERN const union bytesequence4_or_float rb_nan;
00149 # define NAN (rb_nan.float_value)
00150 #endif
00151
00152 #ifndef isinf
00153 # ifndef HAVE_ISINF
00154 # if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
00155 # ifdef HAVE_IEEEFP_H
00156 # include <ieeefp.h>
00157 # endif
00158 # define isinf(x) (!finite(x) && !isnan(x))
00159 # else
00160 RUBY_EXTERN int isinf(double);
00161 # endif
00162 # endif
00163 #endif
00164
00165 #ifndef isnan
00166 # ifndef HAVE_ISNAN
00167 RUBY_EXTERN int isnan(double);
00168 # endif
00169 #endif
00170
00171
00172
00173
00174
00175
00176
00177 #ifndef HAVE_MEMMOVE
00178 RUBY_EXTERN void *memmove(void *, const void *, size_t);
00179 #endif
00180
00181
00182
00183
00184
00185
00186
00187 #ifndef HAVE_STRCHR
00188 RUBY_EXTERN char *strchr(const char *, int);
00189 RUBY_EXTERN char *strrchr(const char *, int);
00190 #endif
00191
00192 #ifndef HAVE_STRERROR
00193 RUBY_EXTERN char *strerror(int);
00194 #endif
00195
00196 #ifndef HAVE_STRSTR
00197 RUBY_EXTERN char *strstr(const char *, const char *);
00198 #endif
00199
00200
00201
00202
00203
00204
00205
00206 #ifndef HAVE_STRLCPY
00207 RUBY_EXTERN size_t strlcpy(char *, const char*, size_t);
00208 #endif
00209
00210 #ifndef HAVE_STRLCAT
00211 RUBY_EXTERN size_t strlcat(char *, const char*, size_t);
00212 #endif
00213
00214 #ifndef HAVE_SIGNBIT
00215 RUBY_EXTERN int signbit(double x);
00216 #endif
00217
00218 #ifndef HAVE_FFS
00219 RUBY_EXTERN int ffs(int);
00220 #endif
00221
00222 #ifdef BROKEN_CLOSE
00223 #include <sys/types.h>
00224 #include <sys/socket.h>
00225 RUBY_EXTERN int ruby_getpeername(int, struct sockaddr *, socklen_t *);
00226 RUBY_EXTERN int ruby_getsockname(int, struct sockaddr *, socklen_t *);
00227 RUBY_EXTERN int ruby_shutdown(int, int);
00228 RUBY_EXTERN int ruby_close(int);
00229 #endif
00230
00231 #ifndef HAVE_SETPROCTITLE
00232 RUBY_EXTERN void setproctitle(const char *fmt, ...);
00233 #endif
00234
00235 RUBY_SYMBOL_EXPORT_END
00236
00237 #if defined(__cplusplus)
00238 #if 0
00239 {
00240 #endif
00241 }
00242 #endif
00243
00244 #endif
00245