/usr/include/GTLCore/Macros.h is in opengtl-dev 0.9.16-0ubuntu2.
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 | /*
* Copyright (c) 2008 Cyrille Berger <cberger@cberger.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* either version 2, or (at your option) any later version of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _GTLCORE_MACROS_H_
#define _GTLCORE_MACROS_H_
#define __GTL_HAVE_GCC_VISIBILITY
/**
* @def GTL_NO_EXPORT
* @ingroup GTLCore
*
* The GTL_NO_EXPORT macro marks the symbol of the given variable
* to be hidden. A hidden symbol is stripped during the linking step,
* so it can't be used from outside the resulting library, which is similar
* to static. However, static limits the visibility to the current
* compilation unit. Hidden symbols can still be used in multiple compilation
* units.
*
* \code
* int GTL_NO_EXPORT foo;
* int GTL_EXPORT bar;
* \endcode
*
* @sa GTL_EXPORT
*/
/**
* @def GTL_EXPORT
* @ingroup GTLCore
*
* The GTL_EXPORT macro marks the symbol of the given variable
* to be visible, so it can be used from outside the resulting library.
*
* \code
* int GTL_NO_EXPORT foo;
* int GTL_EXPORT bar;
* \endcode
*
* @sa GTL_NO_EXPORT
*/
/**
* @def GTL_IMPORT
* @ingroup GTLCore
*/
#ifdef __GTL_HAVE_GCC_VISIBILITY
#define GTL_NO_EXPORT __attribute__ ((visibility("hidden")))
#define GTL_EXPORT __attribute__ ((visibility("default")))
#define GTL_IMPORT __attribute__ ((visibility("default")))
#elif defined(_WIN32) || defined(_WIN64)
#define GTL_NO_EXPORT
#define GTL_EXPORT __declspec(dllexport)
#define GTL_IMPORT __declspec(dllimport)
#else
#define GTL_NO_EXPORT
#define GTL_EXPORT
#define GTL_IMPORT
#endif
/**
* The GTL_DEPRECATED macro can be used to trigger compile-time warnings when a deprecated
* functions are used.
*
* For non-inline functions, the macro has to be inserted at the end of the declaration like in :
* @code
* DeprecatedConstructor() GTL_DEPRECATED;
* void deprecatedFunction() const GTL_DEPRECATED;
* @endcode
*
* For inline functions, the macro has to be inserted before the declartion but after virtual or
* static keywoard, like in :
* @code
* GTL_DEPRECATED void deprecatedInline() { ... }
* virtual GTL_DEPRECATED int depreactedInline() { ... }
* static GTL_DEPRECATED char* deprecatedInline() { ... }
* @endcode
*
* You can declare a class or struct to be deprecated :
* @code
* class GTL_DEPRECATED deprecatedClass { };
* struct GTL_DEPRECATED deprecatedStruct { };
* @endcode
*
* @ingroup GTLCore
*/
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))
# define GTL_DEPRECATED __attribute__ ((__deprecated__))
#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
# define GTL_DEPRECATED __declspec(deprecated)
#else
# define GTL_DEPRECATED
#endif
/**
* Disable the copy constructor and operator==
*/
#define GTL_NO_COPY(name) \
private: \
name(const name&); \
name& operator=(const name&);
#endif
|