getopt.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Declarations for getopt.
  2. Copyright (C) 1989-2020 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. Unlike the bulk of the getopt implementation, this file is NOT part
  5. of gnulib; gnulib also has a getopt.h but it is different.
  6. The GNU C Library is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU Lesser General Public
  8. License as published by the Free Software Foundation; either
  9. version 2.1 of the License, or (at your option) any later version.
  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
  13. Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public
  15. License along with the GNU C Library; if not, see
  16. <https://www.gnu.org/licenses/>. */
  17. #ifndef _GETOPT_H
  18. #define _GETOPT_H 1
  19. #include <features.h>
  20. /* The type of the 'argv' argument to getopt_long and getopt_long_only
  21. is properly 'char **', since both functions may write to the array
  22. (in order to move all the options to the beginning). However, for
  23. compatibility with old versions of LSB, glibc has to use 'char *const *'
  24. instead. */
  25. #ifndef __getopt_argv_const
  26. # define __getopt_argv_const const
  27. #endif
  28. #include <bits/getopt_core.h>
  29. #include <bits/getopt_ext.h>
  30. #endif /* getopt.h */