summaryrefslogtreecommitdiffhomepage
path: root/include/mrbconf.h
blob: 3744c1827218d32404891bdb48474bf4a66cc28b (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
/*
** mrbconf.h - mruby core configuration
**
** See Copyright Notice in mruby.h
*/

#ifndef MRUBYCONF_H
#define MRUBYCONF_H

#include <stdint.h>
#undef MRB_USE_FLOAT

#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 PARSER_DUMP        /* print out parser state */
#undef  PARSER_DUMP        /* do not print out parser state */

//#define INCLUDE_ENCODING   /* use UTF-8 encoding classes */
#undef  INCLUDE_ENCODING   /* not use encoding classes (ascii only) */

//#define INCLUDE_REGEXP     /* use regular expression classes */
#undef  INCLUDE_REGEXP     /* not use regular expression classes */

#ifdef  INCLUDE_REGEXP
# define INCLUDE_ENCODING  /* Regexp depends Encoding */
#endif

#define INCLUDE_KERNEL_SPRINTF     /* not use Kernel.sprintf method */
//#undef INCLUDE_KERNEL_SPRINTF     /* not use Kernel.sprintf method */

#define INCLUDE_MATH	/* use (non ISO) Math module */
//#undef INCLUDE_MATH     /* not use (non ISO) Math module */

#ifdef  MRUBY_DEBUG_BUILD
# define PARSER_DUMP
#endif

#undef  HAVE_UNISTD_H /* WINDOWS */
#define HAVE_UNISTD_H /* LINUX */

#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 */