getopt.in.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Declarations for getopt.
  2. Copyright (C) 1989-2017 Free Software Foundation, Inc.
  3. This file is part of gnulib.
  4. Unlike most of the getopt implementation, it is NOT shared
  5. with the GNU C Library, which supplies a different version of
  6. this file.
  7. gnulib is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as
  9. published by the Free Software Foundation; either version 3 of
  10. the License, or (at your option) any later version.
  11. gnulib is distributed in the hope that it will be useful, but
  12. WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. General Public License for more details.
  15. You should have received a copy of the GNU General Public
  16. License along with gnulib; if not, see <http://www.gnu.org/licenses/>. */
  17. #ifndef _@GUARD_PREFIX@_GETOPT_H
  18. #if __GNUC__ >= 3
  19. @PRAGMA_SYSTEM_HEADER@
  20. #endif
  21. @PRAGMA_COLUMNS@
  22. /* The include_next requires a split double-inclusion guard. We must
  23. also inform the replacement unistd.h to not recursively use
  24. <getopt.h>; our definitions will be present soon enough. */
  25. #if @HAVE_GETOPT_H@
  26. # define _GL_SYSTEM_GETOPT
  27. # @INCLUDE_NEXT@ @NEXT_GETOPT_H@
  28. # undef _GL_SYSTEM_GETOPT
  29. #endif
  30. #define _@GUARD_PREFIX@_GETOPT_H 1
  31. /* Standalone applications should #define __GETOPT_PREFIX to an
  32. identifier that prefixes the external functions and variables
  33. defined in getopt-core.h and getopt-ext.h. When this happens,
  34. include the headers that might declare getopt so that they will not
  35. cause confusion if included after this file (if the system had
  36. <getopt.h>, we have already included it). */
  37. #if defined __GETOPT_PREFIX
  38. # if !@HAVE_GETOPT_H@
  39. # define __need_system_stdlib_h
  40. # include <stdlib.h>
  41. # undef __need_system_stdlib_h
  42. # include <stdio.h>
  43. # include <unistd.h>
  44. # endif
  45. #endif
  46. /* The definition of _GL_ARG_NONNULL is copied here. */
  47. #include <getopt-cdefs.h>
  48. #include <getopt-pfx-core.h>
  49. #include <getopt-pfx-ext.h>
  50. #endif /* _@GUARD_PREFIX@_GETOPT_H */