The R Project SVN R

Rev

Rev 51838 | Rev 52104 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 51838 Rev 52035
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1998--2008  The R Development Core Team.
4
 *  Copyright (C) 1998--2010  The R Development Core Team.
5
 *
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
9
 *  (at your option) any later version.
Line 165... Line 165...
165
# define F77_QSYMBOL(x) #x
165
# define F77_QSYMBOL(x) #x
166
#endif
166
#endif
167
 
167
 
168
/*  Heap and Pointer Protection Stack Sizes.  */
168
/*  Heap and Pointer Protection Stack Sizes.  */
169
 
169
 
170
/* These are for future protection: will need to be different on Win64 */
170
/* These are all required by C99 */
171
typedef unsigned long R_ulong_t;
-
 
172
typedef long R_long_t;
-
 
173
 
-
 
174
#ifdef HAVE_INTTYPES_H
171
#ifdef HAVE_INTTYPES_H
175
# include <inttypes.h>
172
# include <inttypes.h>
176
#endif
173
#endif
177
/* According to POSIX inttypes.h should include stdint.h, but let's be
174
/* According to POSIX inttypes.h should include stdint.h,
178
   sure. */
175
   but let's be sure. */
179
#ifdef HAVE_STDINT_H
176
#ifdef HAVE_STDINT_H
180
# include <stdint.h>
177
# include <stdint.h>
181
#endif
178
#endif
182
#ifdef HAVE_LIMITS_H
179
#ifdef HAVE_LIMITS_H
183
# include <limits.h>
180
# include <limits.h>
184
#endif
181
#endif
185
 
182
 
186
/* NB: will need a 64-bit type, ULONG64 or size_t, for Win64 */
-
 
187
#if defined HAVE_DECL_SIZE_MAX && HAVE_DECL_SIZE_MAX
183
#if defined HAVE_DECL_SIZE_MAX && HAVE_DECL_SIZE_MAX
188
  typedef size_t R_size_t;
184
  typedef size_t R_size_t;
189
/* final precaution in case we don't have the right headers */
-
 
190
# ifdef SIZE_MAX
-
 
191
#  define R_SIZE_T_MAX SIZE_MAX
185
# define R_SIZE_T_MAX SIZE_MAX
192
# else
-
 
193
#  define R_SIZE_T_MAX ULONG_MAX
-
 
194
# endif
-
 
195
#else
186
#else
196
  typedef unsigned long R_size_t;
-
 
197
# define R_SIZE_T_MAX ULONG_MAX
187
# error SIZE_MAX is required for C99
198
#endif
-
 
199
#define R_SIZE_T_DEFINED 1
-
 
200
 
-
 
201
/* These are optional C99 types */
-
 
202
#if !defined(HAVE_INTPTR_T) && !defined(intptr_t)
-
 
203
 typedef long intptr_t;
-
 
204
#endif
-
 
205
#if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t)
-
 
206
 typedef unsigned long uintptr_t;
-
 
207
#endif
188
#endif
208
 
189
 
209
 
190
 
210
#define Mega 1048576. /* 1 Mega Byte := 2^20 (= 1048576) Bytes */
191
#define Mega 1048576. /* 1 Mega Byte := 2^20 (= 1048576) Bytes */
211
#define Giga 1073741824. /* 1 Giga Byte := 2^30 Bytes */
192
#define Giga 1073741824. /* 1 Giga Byte := 2^30 Bytes */