getopt_long.h 697 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Portions Copyright (c) 1987, 1993, 1994
  3. * The Regents of the University of California. All rights reserved.
  4. *
  5. * Portions Copyright (c) 2003-2022, PostgreSQL Global Development Group
  6. *
  7. * src/include/getopt_long.h
  8. */
  9. #ifndef GETOPT_LONG_H
  10. #define GETOPT_LONG_H
  11. #include "pg_getopt.h"
  12. #ifndef HAVE_STRUCT_OPTION
  13. struct option
  14. {
  15. const char *name;
  16. int has_arg;
  17. int *flag;
  18. int val;
  19. };
  20. #define no_argument 0
  21. #define required_argument 1
  22. #define optional_argument 2
  23. #endif
  24. #ifndef HAVE_GETOPT_LONG
  25. extern int getopt_long(int argc, char *const argv[],
  26. const char *optstring,
  27. const struct option *longopts, int *longindex);
  28. #endif
  29. #endif /* GETOPT_LONG_H */