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