228 229 // Checking for finiteness 230 231 inline int g_isfinite(jfloat f) { return finite(f); } 232 inline int g_isfinite(jdouble f) { return finite(f); } 233 234 235 // Wide characters 236 237 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); } 238 239 // Formatting. 240 #ifdef _LP64 241 #define FORMAT64_MODIFIER "l" 242 #else // !_LP64 243 #define FORMAT64_MODIFIER "ll" 244 #endif // _LP64 245 246 #define offset_of(klass,field) offsetof(klass,field) 247 248 #ifndef USE_LIBRARY_BASED_TLS_ONLY 249 #define THREAD_LOCAL_DECL __thread 250 #endif 251 252 // Inlining support 253 #define NOINLINE 254 #define ALWAYSINLINE inline __attribute__((always_inline)) 255 256 // Alignment 257 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x))) 258 259 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_SOLSTUDIO_HPP | 228 229 // Checking for finiteness 230 231 inline int g_isfinite(jfloat f) { return finite(f); } 232 inline int g_isfinite(jdouble f) { return finite(f); } 233 234 235 // Wide characters 236 237 inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); } 238 239 // Formatting. 240 #ifdef _LP64 241 #define FORMAT64_MODIFIER "l" 242 #else // !_LP64 243 #define FORMAT64_MODIFIER "ll" 244 #endif // _LP64 245 246 #define offset_of(klass,field) offsetof(klass,field) 247 248 #if __cplusplus < 201103L 249 #define thread_local __thread 250 #endif 251 252 // Inlining support 253 #define NOINLINE 254 #define ALWAYSINLINE inline __attribute__((always_inline)) 255 256 // Alignment 257 #define ATTRIBUTE_ALIGNED(x) __attribute__((aligned(x))) 258 259 #endif // SHARE_UTILITIES_GLOBALDEFINITIONS_SOLSTUDIO_HPP |