sl@0: /************************************************************************ sl@0: * sl@0: * testdefs.h - common testsuite definitions sl@0: * sl@0: * $Id: testdefs.h 290599 2005-09-21 01:56:45Z sebor $ sl@0: * sl@0: *************************************************************************** sl@0: * sl@0: * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave sl@0: * Software division. Licensed under the Apache License, Version 2.0 (the sl@0: * "License"); you may not use this file except in compliance with the sl@0: * License. You may obtain a copy of the License at sl@0: * http://www.apache.org/licenses/LICENSE-2.0. Unless required by sl@0: * applicable law or agreed to in writing, software distributed under sl@0: * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR sl@0: * CONDITIONS OF ANY KIND, either express or implied. See the License sl@0: * for the specific language governing permissions and limitations under sl@0: * the License. sl@0: * sl@0: **************************************************************************/ sl@0: sl@0: #ifndef RW_TESTDEFS_H_INCLUDED sl@0: #define RW_TESTDEFS_H_INCLUDED sl@0: sl@0: sl@0: #include sl@0: sl@0: sl@0: sl@0: #if (defined (_WIN32) || defined (_WIN64)) \ sl@0: && (defined (RWDLL) || defined (_RWSHARED)) sl@0: # ifndef _RWSTD_TEST_SRC sl@0: // using a shared lib, import names sl@0: # define _TEST_EXPORT __declspec (dllimport) sl@0: # else sl@0: // building a shared (test) lib, export names sl@0: # define _TEST_EXPORT __declspec (dllexport) sl@0: # endif // _RWSTD_LIB_SRC sl@0: #else sl@0: # ifdef __SYMBIAN32__ sl@0: #include sl@0: # ifdef STDCXX_TEST_ENGINE sl@0: # define _TEST_EXPORT EXPORT_C sl@0: # else sl@0: # define _TEST_EXPORT IMPORT_C//__declspec(dllimport) sl@0: # endif sl@0: # else sl@0: # define _TEST_EXPORT sl@0: #endif sl@0: #endif // archive/shared library sl@0: sl@0: sl@0: #if defined (_RWSTD_NO_TYPENAME) && !defined (typename) sl@0: # define typename /* ignore */ sl@0: #endif // _RWSTD_NO_TYPENAME && !typename sl@0: sl@0: sl@0: #ifndef _RWSTD_NO_FOR_INIT_SCOPE sl@0: # if defined (__GNUG__) && __GNUG__ < 3 sl@0: # define _RWSTD_NO_FOR_INIT_SCOPE sl@0: # endif // gcc < 3.0 sl@0: # if defined (_MSC_VER) && _MSC_VER < 1300 sl@0: # define _RWSTD_NO_FOR_INIT_SCOPE sl@0: # endif // MSVC < 7.0 sl@0: #endif // _RWSTD_NO_FOR_INIT_SCOPE sl@0: sl@0: #ifdef _RWSTD_NO_FOR_INIT_SCOPE sl@0: # define for if (0) ; else for sl@0: #endif // _RWSTD_NO_FOR_INIT_SCOPE sl@0: sl@0: sl@0: // _RWSTD_PRI{d,i,o,u,x}MAX: macros corresponding to those described sl@0: // in 7.8.1 of C99; each of them expands to a character string literal sl@0: // containing a conversion specifier, possibly modified by a length sl@0: // modifier, suitable for use within the format argument of a formatted sl@0: // input/output function when converting the corresponding integer type sl@0: #if _RWSTD_LONG_SIZE < _RWSTD_LLONG_SIZE sl@0: // using LLONG_SIZE instead of ULLONG_MAX in the preprocessor sl@0: // conditional above to work around a gcc 3.2 bug (PR #28595) sl@0: # define _RWSTD_PRIdMAX _RWSTD_LLONG_PRINTF_PREFIX "d" sl@0: # define _RWSTD_PRIiMAX _RWSTD_LLONG_PRINTF_PREFIX "i" sl@0: # define _RWSTD_PRIoMAX _RWSTD_LLONG_PRINTF_PREFIX "o" sl@0: # define _RWSTD_PRIuMAX _RWSTD_LLONG_PRINTF_PREFIX "u" sl@0: # define _RWSTD_PRIxMAX _RWSTD_LLONG_PRINTF_PREFIX "x" sl@0: #elif _RWSTD_INT_SIZE < _RWSTD_LONG_SIZE sl@0: # define _RWSTD_PRIdMAX "ld" sl@0: # define _RWSTD_PRIiMAX "li" sl@0: # define _RWSTD_PRIoMAX "lo" sl@0: # define _RWSTD_PRIuMAX "lu" sl@0: # define _RWSTD_PRIxMAX "lx" sl@0: #else sl@0: # define _RWSTD_PRIdMAX "d" sl@0: # define _RWSTD_PRIiMAX "i" sl@0: # define _RWSTD_PRIoMAX "o" sl@0: # define _RWSTD_PRIuMAX "u" sl@0: # define _RWSTD_PRIxMAX "x" sl@0: #endif sl@0: sl@0: #ifndef __SYMBIAN32__ sl@0: // _RWSTD_PRIz: expands to a conversion specifier corresponding sl@0: // to "%z" (i.e., C99 size_t specifier) sl@0: #if _RWSTD_SIZE_MAX == _RWSTD_UINT_MAX sl@0: // sizeof (size_t) == sizeof (unsigned int) sl@0: # define _RWSTD_PRIz "" sl@0: #elif _RWSTD_SIZE_MAX == _RWSTD_ULONG_MAX sl@0: // sizeof (size_t) == sizeof (unsigned long) sl@0: # define _RWSTD_PRIz "l" sl@0: #elif _RWSTD_SIZE_MAX == _RWSTD_ULLONG_MAX sl@0: // sizeof (size_t) == sizeof (unsigned long long) sl@0: # define _RWSTD_PRIz _RWSTD_LLONG_PRINTF_PREFIX "" sl@0: #else sl@0: // assume sizeof (size_t) == sizeof (unsigned) sl@0: # define _RWSTD_PRIz "" sl@0: #endif sl@0: sl@0: #endif sl@0: sl@0: #endif // RW_TESTDEFS_H_INCLUDED