Merge from mainline
[official-gcc.git] / libgcc-math / include / libc-symbols.h
blob6d616143456e40fd999e8623ba4d5e510ffb9e60
1 /* Definitions for symbol handling done by flt-32 and dbl-64 sources.
2 Copyright (C) 2006 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 2, or (at your option) any later
9 version.
11 In addition to the permissions in the GNU General Public License, the
12 Free Software Foundation gives you unlimited permission to link the
13 compiled version of this file into combinations with other programs,
14 and to distribute those combinations without any restriction coming
15 from the use of this file. (The General Public License restrictions
16 do apply in other respects; for example, they cover modification of
17 the file, and distribution when not linked into a combine
18 executable.)
20 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
21 WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 for more details.
25 You should have received a copy of the GNU General Public License
26 along with GCC; see the file COPYING. If not, write to the Free
27 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
28 02110-1301, USA. */
31 /* Define ALIASNAME as a strong alias for NAME. */
32 # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
33 # define _strong_alias(name, aliasname) \
34 extern __typeof (name) aliasname __attribute__ ((alias (#name)));
36 /* This comes between the return type and function name in
37 a function definition to make that definition weak. */
38 # define weak_function __attribute__ ((weak))
39 # define weak_const_function __attribute__ ((weak, __const__))
41 /* Define ALIASNAME as a weak alias for NAME.
42 If weak aliases are not available, this defines a strong alias. */
43 # define weak_alias(name, aliasname) _weak_alias (name, aliasname)
44 # define _weak_alias(name, aliasname) \
45 extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
47 /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
48 # define weak_extern(symbol) _weak_extern (weak symbol)
49 # define _weak_extern(expr) _Pragma (#expr)