/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
Copyright (C) 1995-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C 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.1 of the License, or (at your option) any later version.
The GNU C 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 the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#ifndef _LIBC_SYMBOLS_H
#define _LIBC_SYMBOLS_H 1
/* This file is included implicitly in the compilation of every source file,
using -include. It includes config.h. */
/* Enable declarations of GNU extensions, since we are compiling them. */
#define _GNU_SOURCE 1
#ifdef MODULE_NAME
/* Use `#if IS_IN (module)` to detect what component is being compiled. */
#define PASTE_NAME1(a,b) a##b
#define PASTE_NAME(a,b) PASTE_NAME1 (a,b)
#define IN_MODULE PASTE_NAME (MODULE_, MODULE_NAME)
#define IS_IN(lib) (IN_MODULE == MODULE_##lib)
/* True if the current module is a versioned library. Versioned
library names culled from shlib-versions files are assigned a
MODULE_* value greater than MODULE_LIBS_BEGIN. */
#define IS_IN_LIB (IN_MODULE > MODULE_LIBS_BEGIN)
/* The testsuite, and some other ancillary code, should be compiled against
as close an approximation to the installed headers as possible.
Defining this symbol disables most internal-use-only declarations
provided by this header, and all those provided by other internal
wrapper headers. */
#if IS_IN (testsuite) || defined IS_IN_build || defined __cplusplus
# define _ISOMAC 1
#endif
#else
/* The generation process for a few files created very early in the
build (notably libc-modules.h itself) involves preprocessing this
header without defining MODULE_NAME. Under these conditions,
internal declarations (especially from config.h) must be visible,
but IS_IN should always evaluate as false. */
# define IS_IN(lib) 0
# define IS_IN_LIB 0
# define IN_MODULE (-1)
#endif
#ifndef _ISOMAC
/* This is defined for the compilation of all C library code. features.h
tests this to avoid inclusion of stubs.h wh