blob: 21b8fea1856dd531fe7c6023d9995a297f2b5857 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/*
** mrbconf.h - mruby core configuration
**
** See Copyright Notice in mruby.h
*/
#ifndef MRUBYCONF_H
#define MRUBYCONF_H
#include <stdint.h>
/* configuration options: */
/* add -DMRB_USE_FLOAT to use float instead of double for floating point numbers */
#undef MRB_USE_FLOAT
/* -DDISABLE_XXXX to change to drop the feature */
#define DISABLE_REGEXP /* regular expression classes */
#undef DISABLE_KERNEL_SPRINTF /* Kernel.sprintf method */
#undef DISABLE_MATH /* Math functions */
#undef DISABLE_TIME /* Time class */
#undef DISABLE_STRUCT /* Struct class */
#undef HAVE_UNISTD_H /* WINDOWS */
#define HAVE_UNISTD_H /* LINUX */
/* end of configuration */
#ifdef MRB_USE_FLOAT
typedef float mrb_float;
#else
typedef double mrb_float;
#endif
#define readfloat(p) (mrb_float)strtod((p),NULL)
typedef int mrb_int;
typedef intptr_t mrb_sym;
/* define ENABLE_XXXX from DISABLE_XXX */
#ifndef DISABLE_REGEXP
#define ENABLE_REGEXP
#endif
#ifndef DISABLE_KERNEL_SPRINTF
#define ENABLE_KERNEL_SPRINTF
#endif
#ifndef DISABLE_MATH
#define ENABLE_MATH
#endif
#ifndef DISABLE_TIME
#define ENABLE_TIME
#endif
#ifndef DISABLE_STRUCT
#define ENABLE_STRUCT
#endif
#ifndef FALSE
# define FALSE 0
#endif
#ifndef TRUE
# define TRUE 1
#endif
#ifdef _MSC_VER
# define inline __inline
# define snprintf _snprintf
# define isnan _isnan
# define isinf(n) (!_finite(n) && !_isnan(n))
#endif
#endif /* MRUBYCONF_H */
|