@@ -12,7 +12,9 @@ namespace helpers {
1212 typedef struct {char a[2 ];} CTYPE_SHORT;
1313 typedef struct {char a[3 ];} CTYPE_INT;
1414 typedef struct {char a[4 ];} CTYPE_LONG;
15+ #ifdef RCPP_HAS_LONG_LONG_TYPES
1516 typedef struct {char a[5 ];} CTYPE_LONG_LONG;
17+ #endif
1618 typedef struct {char a[6 ];} CTYPE_FLOAT;
1719 typedef struct {char a[7 ];} CTYPE_DOUBLE;
1820 typedef struct {char a[8 ];} CTYPE_LONG_DOUBLE;
@@ -21,7 +23,9 @@ namespace helpers {
2123 typedef struct {char a[11 ];} CTYPE_UNSIGNED_SHORT;
2224 typedef struct {char a[12 ];} CTYPE_UNSIGNED_INT;
2325 typedef struct {char a[13 ];} CTYPE_UNSIGNED_LONG;
26+ #ifdef RCPP_HAS_LONG_LONG_TYPES
2427 typedef struct {char a[14 ];} CTYPE_UNSIGNED_LONG_LONG;
28+ #endif
2529 typedef struct {char a[128 ];} CTYPE_UNKNOWN;
2630
2731 template < std::size_t I >
@@ -39,8 +43,10 @@ namespace helpers {
3943 template <>
4044 struct ctype_helper < sizeof (CTYPE_LONG) > { typedef long type; static const bool value = true ; };
4145
46+ #ifdef RCPP_HAS_LONG_LONG_TYPES
4247 template <>
4348 struct ctype_helper < sizeof (CTYPE_LONG_LONG) > { typedef long long type; static const bool value = true ; };
49+ #endif
4450
4551 template <>
4652 struct ctype_helper < sizeof (CTYPE_FLOAT) > { typedef float type; static const bool value = true ; };
@@ -66,8 +72,10 @@ namespace helpers {
6672 template <>
6773 struct ctype_helper < sizeof (CTYPE_UNSIGNED_LONG) > { typedef unsigned long type; static const bool value = true ; };
6874
75+ #ifdef RCPP_HAS_LONG_LONG_TYPES
6976 template <>
7077 struct ctype_helper < sizeof (CTYPE_UNSIGNED_LONG_LONG) > { typedef unsigned long long type; static const bool value = true ; };
78+ #endif
7179
7280
7381 template < typename T >
@@ -77,7 +85,9 @@ namespace helpers {
7785 static CTYPE_SHORT test (const short &);
7886 static CTYPE_INT test (const int &);
7987 static CTYPE_LONG test (const long &);
88+ #ifdef RCPP_HAS_LONG_LONG_TYPES
8089 static CTYPE_LONG_LONG test (const long long &);
90+ #endif
8191 static CTYPE_FLOAT test (const float &);
8292 static CTYPE_DOUBLE test (const double &);
8393 static CTYPE_LONG_DOUBLE test (const long double &);
@@ -86,7 +96,9 @@ namespace helpers {
8696 static CTYPE_UNSIGNED_SHORT test (const unsigned short &);
8797 static CTYPE_UNSIGNED_INT test (const unsigned int &);
8898 static CTYPE_UNSIGNED_LONG test (const unsigned long &);
99+ #ifdef RCPP_HAS_LONG_LONG_TYPES
89100 static CTYPE_UNSIGNED_LONG_LONG test (const unsigned long long &);
101+ #endif
90102 static CTYPE_UNKNOWN test (...);
91103
92104 static T make ();
@@ -101,7 +113,9 @@ namespace helpers {
101113 static CTYPE_SHORT test (const short &);
102114 static CTYPE_INT test (const int &);
103115 static CTYPE_LONG test (const long &);
116+ #ifdef RCPP_HAS_LONG_LONG_TYPES
104117 static CTYPE_LONG_LONG test (const long long &);
118+ #endif
105119 static CTYPE_FLOAT test (const float &);
106120 static CTYPE_DOUBLE test (const double &);
107121 static CTYPE_LONG_DOUBLE test (const long double &);
@@ -110,7 +124,9 @@ namespace helpers {
110124 static CTYPE_UNSIGNED_SHORT test (const unsigned short &);
111125 static CTYPE_UNSIGNED_INT test (const unsigned int &);
112126 static CTYPE_UNSIGNED_LONG test (const unsigned long &);
127+ #ifdef RCPP_HAS_LONG_LONG_TYPES
113128 static CTYPE_UNSIGNED_LONG_LONG test (const unsigned long long &);
129+ #endif
114130 static CTYPE_UNKNOWN test (...);
115131
116132 static T make ();
0 commit comments