Back to index

glibc  2.9
gnu-versions.h
Go to the documentation of this file.
00001 /* Header with interface version macros for library pieces copied elsewhere.
00002    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _GNU_VERSIONS_H
00021 #define       _GNU_VERSIONS_H      1
00022 
00023 /* This file exists to define these few macros.  Each specifies a version
00024    number associated with the library interface of a piece of the C library
00025    which is also distributed with other GNU packages.  These pieces are
00026    both part of the GNU C library and also distributed with other GNU
00027    packages so those packages may use their facilities on systems lacking
00028    the GNU C library.  The source files for each piece surround all their
00029    code with `#ifndef ELIDE_CODE' after defining it with this:
00030 
00031    #define OBSTACK_INTERFACE_VERSION 1
00032    #if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
00033    #include <gnu-versions.h>
00034    #if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
00035    #define ELIDE_CODE
00036    #endif
00037    #endif
00038 
00039    This allows those one to avoid compiling those files when part of a GNU
00040    package not libc, on a system using a GNU C library that supports the
00041    same interface.
00042 
00043    Please preserve the format of the comments after each macro.  And
00044    remember, if any of these versions change, the libc.so major version
00045    number must change too (so avoid it)!  */
00046 
00047 #define _GNU_OBSTACK_INTERFACE_VERSION    1 /* vs malloc/obstack.c */
00048 #define _GNU_REGEX_INTERFACE_VERSION      1 /* vs posix/regex.c */
00049 #define _GNU_GLOB_INTERFACE_VERSION       1 /* vs posix/glob.c */
00050 #define _GNU_GETOPT_INTERFACE_VERSION     2 /* vs posix/getopt.c and
00051                                         posix/getopt1.c */
00052 
00053 #endif /* gnu-versions.h */