paludis Version 3.0.2
The one true package mangler
attributes.hh
Go to the documentation of this file.
1/* vim: set sw=4 sts=4 et foldmethod=syntax : */
2
3/*
4 * Copyright (c) 2005, 2006, 2007, 2008 Ciaran McCreesh
5 *
6 * This file is part of the Paludis package manager. Paludis is free software;
7 * you can redistribute it and/or modify it under the terms of the GNU General
8 * Public License version 2, as published by the Free Software Foundation.
9 *
10 * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17 * Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef PALUDIS_GUARD_PALUDIS_ATTRIBUTES_HH
21#define PALUDIS_GUARD_PALUDIS_ATTRIBUTES_HH 1
22
23/** \file
24 * Declare the PALUDIS_ATTRIBUTE macros.
25 *
26 * \ingroup g_utils
27 *
28 * \section Examples
29 *
30 * - None at this time.
31 */
32
33/** \def PALUDIS_ATTRIBUTE
34 * If we're using a GNU compatible compiler, expands to __attribute__, otherwise
35 * discards its arguments.
36 *
37 * \ingroup g_utils
38 */
39
40/** \def PALUDIS_VISIBLE
41 * Marker used to represent 'make visible', if visibility is enabled.
42 *
43 * \ingroup g_utils
44 */
45
46/** \def PALUDIS_HIDDEN
47 * Marker used to represent 'make hidden', if visibility is enabled.
48 *
49 * \ingroup g_utils
50 */
51
52#if defined(DOXYGEN)
53# define PALUDIS_ATTRIBUTE(x)
54#else
55# define PALUDIS_ATTRIBUTE(x) __attribute__(x)
56#endif
57
58#if defined(DOXYGEN)
59# define PALUDIS_VISIBLE
60# define PALUDIS_HIDDEN
61#else
62# define PALUDIS_VISIBLE PALUDIS_ATTRIBUTE((visibility("default")))
63# define PALUDIS_HIDDEN PALUDIS_ATTRIBUTE((visibility("hidden")))
64#endif
65
66#endif