2 #define RUBY_MISSING_H 1
12 #include "ruby/internal/config.h"
18 #if defined(__cplusplus)
24 #ifdef RUBY_ALTERNATIVE_MALLOC_HEADER
25 # include RUBY_ALTERNATIVE_MALLOC_HEADER
28 #if defined(HAVE_TIME_H)
32 #if defined(HAVE_SYS_TIME_H)
33 # include <sys/time.h>
36 #ifdef HAVE_SYS_STAT_H
37 # include <sys/stat.h>
56 # define M_PI 3.14159265358979323846
59 # define M_PI_2 (M_PI/2)
62 #if !defined(HAVE_STRUCT_TIMEVAL)
69 #if !defined(HAVE_STRUCT_TIMESPEC)
80 #if !defined(HAVE_STRUCT_TIMEZONE)
96 RUBY_EXTERN char *crypt(
const char *,
const char *);
130 #ifndef HAVE_LGAMMA_R
138 #if !defined(INFINITY) || !defined(NAN)
140 unsigned char bytesequence[4];
148 # define INFINITY (rb_infinity.float_value)
149 # define USE_RB_INFINITY 1
155 # define NAN (rb_nan.float_value)
156 # define USE_RB_NAN 1
160 # define HUGE_VAL ((double)INFINITY)
164 # define HAVE_FINITE 1
165 # define finite(x) isfinite(x)
172 #ifndef HAVE_NEXTAFTER
183 RUBY_EXTERN void *memmove(
void *,
const void *,
size_t);
197 #ifndef HAVE_STRERROR
202 RUBY_EXTERN char *strstr(
const char *,
const char *);
206 RUBY_EXTERN size_t strlcpy(
char *,
const char*,
size_t);
210 RUBY_EXTERN size_t strlcat(
char *,
const char*,
size_t);
218 # include <sys/types.h>
219 # include <sys/socket.h>
220 RUBY_EXTERN int ruby_getpeername(
int,
struct sockaddr *, socklen_t *);
221 RUBY_EXTERN int ruby_getsockname(
int,
struct sockaddr *, socklen_t *);
226 #ifndef HAVE_SETPROCTITLE
228 RUBY_EXTERN void setproctitle(const
char *fmt, ...);
231 #ifdef HAVE_EXPLICIT_BZERO
233 #elif defined(SecureZeroMemory)
234 # define explicit_bzero(b, len) SecureZeroMemory(b, len)
243 #ifndef HAVE_POSIX_MADVISE
244 RUBY_EXTERN int posix_madvise(
void *,
size_t,
int);
263 #ifndef HAVE_GETLOGIN
280 RUBY_EXTERN int chown(
const char *, rb_uid_t, rb_gid_t);
308 RUBY_EXTERN int execl(
const char *,
const char *, ...);
312 RUBY_EXTERN int execle(
const char *,
const char *, ...);
316 RUBY_EXTERN int execv(
const char *,
char *
const []);
320 RUBY_EXTERN int execve(
const char *,
char *
const [],
char *
const []);
323 #ifndef HAVE_SHUTDOWN
336 # define HAVE_WAITPID 1
337 RUBY_EXTERN rb_pid_t waitpid(rb_pid_t,
int *,
int);
Tweaking visibility of C variables/functions.
#define RUBY_EXTERN
Declaration of externally visible global variables.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
int len
Length of the buffer.