gnu-versions.h 2.4 KB

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