chiark / gitweb /
install: enable timesyncd by default
[elogind.git] / src / compat-libs / linkwarning.h
1 /***
2   This file is part of systemd, but is heavily based on
3   glibc's libc-symbols.h.
4
5   Copyright (C) 1995-1998,2000-2006,2008,2009 Free Software Foundation, Inc
6
7   systemd is free software; you can redistribute it and/or modify it
8   under the terms of the GNU Lesser General Public License as published by
9   the Free Software Foundation; either version 2.1 of the License, or
10   (at your option) any later version.
11
12   systemd is distributed in the hope that it will be useful, but
13   WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   Lesser General Public License for more details.
16
17   You should have received a copy of the GNU Lesser General Public License
18   along with systemd; If not, see <http://www.gnu.org/licenses/>.
19 ***/
20
21 #define __make_section_unallocated(section_string)      \
22   asm (".section " section_string "\n\t.previous");
23
24 #define __sec_comment "\n#APP\n\t#"
25
26 #define link_warning(symbol, msg) \
27   __make_section_unallocated (".gnu.warning." #symbol)  \
28   static const char __evoke_link_warning_##symbol[]     \
29     __attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) \
30     = msg
31
32 #define obsolete_lib(name, lib)                         \
33   link_warning(name, #name " was moved to libsystemd. Do not use " #lib ".")