~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to include/ruby/defines.h

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
  defines.h -
4
4
 
5
 
  $Author: naruse $
 
5
  $Author: usa $
6
6
  created at: Wed May 18 00:21:44 JST 1994
7
7
 
8
8
************************************************/
17
17
#endif
18
18
#endif
19
19
 
 
20
#include "ruby/config.h"
 
21
#ifdef RUBY_EXTCONF_H
 
22
#include RUBY_EXTCONF_H
 
23
#endif
 
24
 
20
25
#define RUBY
21
26
 
22
 
#include <stdlib.h>
 
27
# include <stddef.h>
 
28
#ifdef HAVE_STDLIB_H
 
29
# include <stdlib.h>
 
30
#endif
23
31
#ifdef __cplusplus
24
32
# ifndef  HAVE_PROTOTYPES
25
33
#  define HAVE_PROTOTYPES 1
49
57
#define ANYARGS
50
58
#endif
51
59
 
 
60
#if defined __GNUC__ && __GNUC__ >= 4
 
61
#pragma GCC visibility push(default)
 
62
#endif
 
63
 
52
64
#define xmalloc ruby_xmalloc
53
65
#define xmalloc2 ruby_xmalloc2
54
66
#define xcalloc ruby_xcalloc
82
94
# define SIZEOF_BDIGITS SIZEOF_INT
83
95
# define BDIGIT_DBL unsigned LONG_LONG
84
96
# define BDIGIT_DBL_SIGNED LONG_LONG
 
97
# define PRI_BDIGIT_PREFIX ""
 
98
# define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
85
99
#elif SIZEOF_INT*2 <= SIZEOF_LONG
86
100
# define BDIGIT unsigned int
87
101
# define SIZEOF_BDIGITS SIZEOF_INT
88
102
# define BDIGIT_DBL unsigned long
89
103
# define BDIGIT_DBL_SIGNED long
 
104
# define PRI_BDIGIT_PREFIX ""
 
105
# define PRI_BDIGIT_DBL_PREFIX "l"
90
106
#elif SIZEOF_SHORT*2 <= SIZEOF_LONG
91
107
# define BDIGIT unsigned short
92
108
# define SIZEOF_BDIGITS SIZEOF_SHORT
93
109
# define BDIGIT_DBL unsigned long
94
110
# define BDIGIT_DBL_SIGNED long
 
111
# define PRI_BDIGIT_PREFIX "h"
 
112
# define PRI_BDIGIT_DBL_PREFIX "l"
95
113
#else
96
114
# define BDIGIT unsigned short
97
115
# define SIZEOF_BDIGITS (SIZEOF_LONG/2)
98
116
# define BDIGIT_DBL unsigned long
99
117
# define BDIGIT_DBL_SIGNED long
100
 
#endif
101
 
 
102
 
#ifdef INFINITY
103
 
# define HAVE_INFINITY
104
 
#else
105
 
/** @internal */
106
 
extern const unsigned char rb_infinity[];
107
 
# define INFINITY (*(float *)rb_infinity)
108
 
#endif
109
 
 
110
 
#ifdef NAN
111
 
# define HAVE_NAN
112
 
#else
113
 
/** @internal */
114
 
extern const unsigned char rb_nan[];
115
 
# define NAN (*(float *)rb_nan)
116
 
#endif
 
118
# define PRI_BDIGIT_PREFIX "h"
 
119
# define PRI_BDIGIT_DBL_PREFIX "l"
 
120
#endif
 
121
 
 
122
#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
 
123
#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
 
124
#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
 
125
#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
 
126
#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
 
127
#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
 
128
 
 
129
#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
 
130
#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
 
131
#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
 
132
#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
 
133
#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
 
134
#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
117
135
 
118
136
#ifdef __CYGWIN__
119
137
#undef _WIN32
232
250
 
233
251
#endif
234
252
 
 
253
#ifndef RUBY_FUNC_EXPORTED
 
254
#define RUBY_FUNC_EXPORTED
 
255
#endif
 
256
 
235
257
#ifndef RUBY_EXTERN
236
258
#define RUBY_EXTERN extern
237
259
#endif
311
333
    RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
312
334
#endif
313
335
 
 
336
#if defined __GNUC__ && __GNUC__ >= 4
 
337
#pragma GCC visibility pop
 
338
#endif
 
339
 
314
340
#if defined(__cplusplus)
315
341
#if 0
316
342
{ /* satisfy cc-mode */