/usr/include/cppunit/Portability.h is in libcppunit-dev 1.14.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | #ifndef CPPUNIT_PORTABILITY_H
#define CPPUNIT_PORTABILITY_H
#if defined(_WIN32) && !defined(WIN32)
# define WIN32 1
#endif
/* include platform specific config */
#if defined(__BORLANDC__)
# include <cppunit/config/config-bcb5.h>
#elif defined (_MSC_VER)
# if _MSC_VER == 1200 && defined(_WIN32_WCE) //evc4
# include <cppunit/config/config-evc4.h>
# else
# include <cppunit/config/config-msvc6.h>
# endif
#else
# include <cppunit/config-auto.h>
#endif
// Version number of package
#ifndef CPPUNIT_VERSION
#define CPPUNIT_VERSION "1.14.0"
#endif
#include <cppunit/config/CppUnitApi.h> // define CPPUNIT_API & CPPUNIT_NEED_DLL_DECL
#include <cppunit/config/SelectDllLoader.h>
/* Options that the library user may switch on or off.
* If the user has not done so, we chose default values.
*/
/* Define to 1 if you wish to have the old-style macros
assert(), assertEqual(), assertDoublesEqual(), and assertLongsEqual() */
#if !defined(CPPUNIT_ENABLE_NAKED_ASSERT)
# define CPPUNIT_ENABLE_NAKED_ASSERT 0
#endif
/* Define to 1 if you wish to have the old-style CU_TEST family
of macros. */
#if !defined(CPPUNIT_ENABLE_CU_TEST_MACROS)
# define CPPUNIT_ENABLE_CU_TEST_MACROS 0
#endif
/* Define to 1 if the preprocessor expands (#foo) to "foo" (quotes incl.)
I don't think there is any C preprocess that does NOT support this! */
#if !defined(CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION)
# define CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION 1
#endif
/* Assumes that STL and CppUnit are in global space if the compiler does not
support namespace. */
#if !defined(CPPUNIT_HAVE_NAMESPACES)
# if !defined(CPPUNIT_NO_NAMESPACE)
# define CPPUNIT_NO_NAMESPACE 1
# endif // !defined(CPPUNIT_NO_NAMESPACE)
# if !defined(CPPUNIT_NO_STD_NAMESPACE)
# define CPPUNIT_NO_STD_NAMESPACE 1
# endif // !defined(CPPUNIT_NO_STD_NAMESPACE)
#endif // !defined(CPPUNIT_HAVE_NAMESPACES)
// Compiler error location format for CompilerOutputter
// If not define, assumes that it's gcc
// See class CompilerOutputter for format.
#if !defined(CPPUNIT_COMPILER_LOCATION_FORMAT)
#if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) )
// gcc/Xcode integration on Mac OS X
# define CPPUNIT_COMPILER_LOCATION_FORMAT "%p:%l: "
#else
# define CPPUNIT_COMPILER_LOCATION_FORMAT "%f:%l:"
#endif
#endif
// If CPPUNIT_HAVE_CPP_CAST is defined, then c++ style cast will be used,
// otherwise, C style cast are used.
#if defined( CPPUNIT_HAVE_CPP_CAST )
# define CPPUNIT_CONST_CAST( TargetType, pointer ) \
const_cast<TargetType>( pointer )
# define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
static_cast<TargetType>( pointer )
#else // defined( CPPUNIT_HAVE_CPP_CAST )
# define CPPUNIT_CONST_CAST( TargetType, pointer ) \
((TargetType)( pointer ))
# define CPPUNIT_STATIC_CAST( TargetType, pointer ) \
((TargetType)( pointer ))
#endif // defined( CPPUNIT_HAVE_CPP_CAST )
// If CPPUNIT_NO_STD_NAMESPACE is defined then STL are in the global space.
// => Define macro 'std' to nothing
#if defined(CPPUNIT_NO_STD_NAMESPACE)
# undef std
# define std
#endif // defined(CPPUNIT_NO_STD_NAMESPACE)
// If CPPUNIT_NO_NAMESPACE is defined, then put CppUnit classes in the
// global namespace: the compiler does not support namespace.
#if defined(CPPUNIT_NO_NAMESPACE)
# define CPPUNIT_NS_BEGIN
# define CPPUNIT_NS_END
# define CPPUNIT_NS
#else // defined(CPPUNIT_NO_NAMESPACE)
# define CPPUNIT_NS_BEGIN namespace CppUnit {
# define CPPUNIT_NS_END }
# define CPPUNIT_NS CppUnit
#endif // defined(CPPUNIT_NO_NAMESPACE)
/*! Stringize a symbol.
*
* Use this macro to convert a preprocessor symbol to a string.
*
* Example of usage:
* \code
* #define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTestPlugIn
* const char *name = CPPUNIT_STRINGIZE( CPPUNIT_PLUGIN_EXPORTED_NAME );
* \endcode
*/
#define CPPUNIT_STRINGIZE( symbol ) _CPPUNIT_DO_STRINGIZE( symbol )
/// \internal
#define _CPPUNIT_DO_STRINGIZE( symbol ) #symbol
/*! Joins to symbol after expanding them into string.
*
* Use this macro to join two symbols. Example of usage:
*
* \code
* #define MAKE_UNIQUE_NAME(prefix) CPPUNIT_JOIN( prefix, __LINE__ )
* \endcode
*
* The macro defined in the example concatenate a given prefix with the line number
* to obtain a 'unique' identifier.
*
* \internal From boost documentation:
* The following piece of macro magic joins the two
* arguments together, even when one of the arguments is
* itself a macro (see 16.3.1 in C++ standard). The key
* is that macro expansion of macro arguments does not
* occur in CPPUNIT_JOIN2 but does in CPPUNIT_JOIN.
*/
#define CPPUNIT_JOIN( symbol1, symbol2 ) _CPPUNIT_DO_JOIN( symbol1, symbol2 )
/// \internal
#define _CPPUNIT_DO_JOIN( symbol1, symbol2 ) _CPPUNIT_DO_JOIN2( symbol1, symbol2 )
/// \internal
#define _CPPUNIT_DO_JOIN2( symbol1, symbol2 ) symbol1##symbol2
/// \internal Unique suffix for variable name. Can be overridden in platform specific
/// config-*.h. Default to line number.
#ifndef CPPUNIT_UNIQUE_COUNTER
# define CPPUNIT_UNIQUE_COUNTER __LINE__
#endif
/*! Adds the line number to the specified string to create a unique identifier.
* \param prefix Prefix added to the line number to create a unique identifier.
* \see CPPUNIT_TEST_SUITE_REGISTRATION for an example of usage.
*/
#define CPPUNIT_MAKE_UNIQUE_NAME( prefix ) CPPUNIT_JOIN( prefix, CPPUNIT_UNIQUE_COUNTER )
/*! Defines wrap colunm for %CppUnit. Used by CompilerOuputter.
*/
#if !defined(CPPUNIT_WRAP_COLUMN)
# define CPPUNIT_WRAP_COLUMN 79
#endif
#endif // CPPUNIT_PORTABILITY_H
|