os/ossrv/stdcpp/tsrc/Stdcpp_test/stdcxx/include/testdefs.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/stdcpp/tsrc/Stdcpp_test/stdcxx/include/testdefs.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,118 @@
     1.4 +/************************************************************************
     1.5 + *
     1.6 + * testdefs.h - common testsuite definitions
     1.7 + *
     1.8 + * $Id: testdefs.h 290599 2005-09-21 01:56:45Z sebor $
     1.9 + *
    1.10 + ***************************************************************************
    1.11 + *
    1.12 + * Copyright (c) 1994-2005 Quovadx,  Inc., acting through its  Rogue Wave
    1.13 + * Software division. Licensed under the Apache License, Version 2.0 (the
    1.14 + * "License");  you may  not use this file except  in compliance with the
    1.15 + * License.    You    may   obtain   a   copy   of    the   License    at
    1.16 + * http://www.apache.org/licenses/LICENSE-2.0.    Unless   required    by
    1.17 + * applicable law  or agreed to  in writing,  software  distributed under
    1.18 + * the License is distributed on an "AS IS" BASIS,  WITHOUT WARRANTIES OR
    1.19 + * CONDITIONS OF  ANY KIND, either  express or implied.  See  the License
    1.20 + * for the specific language governing permissions  and limitations under
    1.21 + * the License.
    1.22 + * 
    1.23 + **************************************************************************/
    1.24 +
    1.25 +#ifndef RW_TESTDEFS_H_INCLUDED
    1.26 +#define RW_TESTDEFS_H_INCLUDED
    1.27 +
    1.28 +
    1.29 +#include <rw/_defs.h>
    1.30 +
    1.31 +
    1.32 +
    1.33 +#if    (defined (_WIN32) || defined (_WIN64)) \
    1.34 +    && (defined (RWDLL) || defined (_RWSHARED))
    1.35 +#  ifndef _RWSTD_TEST_SRC
    1.36 +     // using a shared lib, import names
    1.37 +#    define _TEST_EXPORT   __declspec (dllimport)
    1.38 +#  else
    1.39 +     // building a shared (test) lib, export names
    1.40 +#    define _TEST_EXPORT   __declspec (dllexport)
    1.41 +#  endif   // _RWSTD_LIB_SRC
    1.42 +#else
    1.43 +# ifdef __SYMBIAN32__
    1.44 +#include <e32def.h>
    1.45 +#  ifdef STDCXX_TEST_ENGINE
    1.46 +#    define _TEST_EXPORT   EXPORT_C
    1.47 +#  else
    1.48 +#    define _TEST_EXPORT   IMPORT_C//__declspec(dllimport)
    1.49 +#  endif
    1.50 +# else 
    1.51 +#    define _TEST_EXPORT
    1.52 +#endif
    1.53 +#endif   // archive/shared library
    1.54 +
    1.55 +
    1.56 +#if defined (_RWSTD_NO_TYPENAME) && !defined (typename)
    1.57 +#  define typename /* ignore */
    1.58 +#endif   // _RWSTD_NO_TYPENAME && !typename
    1.59 +
    1.60 +
    1.61 +#ifndef _RWSTD_NO_FOR_INIT_SCOPE
    1.62 +#  if defined (__GNUG__) && __GNUG__ < 3
    1.63 +#    define _RWSTD_NO_FOR_INIT_SCOPE
    1.64 +#  endif   // gcc < 3.0
    1.65 +#  if defined (_MSC_VER) && _MSC_VER < 1300
    1.66 +#    define _RWSTD_NO_FOR_INIT_SCOPE
    1.67 +#  endif   // MSVC < 7.0
    1.68 +#endif   // _RWSTD_NO_FOR_INIT_SCOPE
    1.69 +
    1.70 +#ifdef _RWSTD_NO_FOR_INIT_SCOPE
    1.71 +#  define for   if (0) ; else for
    1.72 +#endif   // _RWSTD_NO_FOR_INIT_SCOPE
    1.73 +
    1.74 +
    1.75 +// _RWSTD_PRI{d,i,o,u,x}MAX: macros corresponding to those described
    1.76 +// in 7.8.1 of C99; each of them expands to a character string literal
    1.77 +// containing a conversion specifier, possibly modified by a length 
    1.78 +// modifier, suitable for use within the format argument of a formatted
    1.79 +// input/output function when converting the corresponding integer type
    1.80 +#if _RWSTD_LONG_SIZE < _RWSTD_LLONG_SIZE
    1.81 +   // using LLONG_SIZE instead of ULLONG_MAX in the preprocessor
    1.82 +   // conditional above to work around a gcc 3.2 bug (PR #28595)
    1.83 +#  define _RWSTD_PRIdMAX   _RWSTD_LLONG_PRINTF_PREFIX "d"
    1.84 +#  define _RWSTD_PRIiMAX   _RWSTD_LLONG_PRINTF_PREFIX "i"
    1.85 +#  define _RWSTD_PRIoMAX   _RWSTD_LLONG_PRINTF_PREFIX "o"
    1.86 +#  define _RWSTD_PRIuMAX   _RWSTD_LLONG_PRINTF_PREFIX "u"
    1.87 +#  define _RWSTD_PRIxMAX   _RWSTD_LLONG_PRINTF_PREFIX "x"
    1.88 +#elif _RWSTD_INT_SIZE < _RWSTD_LONG_SIZE
    1.89 +#  define _RWSTD_PRIdMAX   "ld"
    1.90 +#  define _RWSTD_PRIiMAX   "li"
    1.91 +#  define _RWSTD_PRIoMAX   "lo"
    1.92 +#  define _RWSTD_PRIuMAX   "lu"
    1.93 +#  define _RWSTD_PRIxMAX   "lx"
    1.94 +#else
    1.95 +#  define _RWSTD_PRIdMAX   "d"
    1.96 +#  define _RWSTD_PRIiMAX   "i"
    1.97 +#  define _RWSTD_PRIoMAX   "o"
    1.98 +#  define _RWSTD_PRIuMAX   "u"
    1.99 +#  define _RWSTD_PRIxMAX   "x"
   1.100 +#endif
   1.101 +
   1.102 +#ifndef __SYMBIAN32__
   1.103 +// _RWSTD_PRIz: expands to a conversion specifier corresponding
   1.104 +// to "%z" (i.e., C99 size_t specifier)
   1.105 +#if _RWSTD_SIZE_MAX == _RWSTD_UINT_MAX
   1.106 +   // sizeof (size_t) == sizeof (unsigned int)
   1.107 +#  define _RWSTD_PRIz   ""
   1.108 +#elif _RWSTD_SIZE_MAX == _RWSTD_ULONG_MAX
   1.109 +   // sizeof (size_t) == sizeof (unsigned long)
   1.110 +#  define _RWSTD_PRIz   "l"
   1.111 +#elif _RWSTD_SIZE_MAX == _RWSTD_ULLONG_MAX
   1.112 +   // sizeof (size_t) == sizeof (unsigned long long)
   1.113 +#  define _RWSTD_PRIz   _RWSTD_LLONG_PRINTF_PREFIX ""
   1.114 +#else
   1.115 +  // assume sizeof (size_t) == sizeof (unsigned)
   1.116 +#  define _RWSTD_PRIz   ""
   1.117 +#endif
   1.118 +
   1.119 +#endif
   1.120 +
   1.121 +#endif   // RW_TESTDEFS_H_INCLUDED