]>
Commit | Line | Data |
---|---|---|
487253ea | 1 | /* Header with interface version macros for library pieces copied elsewhere. |
2b778ceb | 2 | Copyright (C) 1995-2021 Free Software Foundation, Inc. |
54d79e99 | 3 | This file is part of the GNU C Library. |
487253ea | 4 | |
54d79e99 | 5 | The GNU C Library is free software; you can redistribute it and/or |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
487253ea | 9 | |
54d79e99 UD |
10 | The GNU C Library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
487253ea | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 | 16 | License along with the GNU C Library; if not, see |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
487253ea RM |
18 | |
19 | #ifndef _GNU_VERSIONS_H | |
20 | #define _GNU_VERSIONS_H 1 | |
21 | ||
22 | /* This file exists to define these few macros. Each specifies a version | |
23 | number associated with the library interface of a piece of the C library | |
24 | which is also distributed with other GNU packages. These pieces are | |
25 | both part of the GNU C library and also distributed with other GNU | |
26 | packages so those packages may use their facilities on systems lacking | |
27 | the GNU C library. The source files for each piece surround all their | |
28 | code with `#ifndef ELIDE_CODE' after defining it with this: | |
29 | ||
30 | #define OBSTACK_INTERFACE_VERSION 1 | |
31 | #if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 | |
32 | #include <gnu-versions.h> | |
33 | #if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION | |
34 | #define ELIDE_CODE | |
35 | #endif | |
36 | #endif | |
37 | ||
38 | This allows those one to avoid compiling those files when part of a GNU | |
39 | package not libc, on a system using a GNU C library that supports the | |
40 | same interface. | |
41 | ||
42 | Please preserve the format of the comments after each macro. And | |
43 | remember, if any of these versions change, the libc.so major version | |
44 | number must change too (so avoid it)! */ | |
45 | ||
907a1bac | 46 | #define _GNU_OBSTACK_INTERFACE_VERSION 1 /* vs malloc/obstack.c */ |
487253ea | 47 | #define _GNU_REGEX_INTERFACE_VERSION 1 /* vs posix/regex.c */ |
ccf970c7 | 48 | #define _GNU_GLOB_INTERFACE_VERSION 2 /* vs posix/glob.c */ |
8d57beea | 49 | #define _GNU_GETOPT_INTERFACE_VERSION 2 /* vs posix/getopt.c and |
d38cd08c | 50 | posix/getopt1.c */ |
487253ea RM |
51 | |
52 | #endif /* gnu-versions.h */ |