argp_common.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* grub-setup.c - make GRUB usable */
  2. /*
  3. * GRUB -- GRand Unified Bootloader
  4. * Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 Free Software Foundation, Inc.
  5. *
  6. * GRUB is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * GRUB is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #include <config-util.h>
  20. #include <config.h>
  21. #pragma GCC diagnostic ignored "-Wmissing-prototypes"
  22. #pragma GCC diagnostic ignored "-Wmissing-declarations"
  23. #define _GNU_SOURCE 1
  24. #include <stdlib.h>
  25. #include <unistd.h>
  26. #include <progname.h>
  27. #include <argp.h>
  28. /* Print the version information. */
  29. static void
  30. print_version (FILE *stream, struct argp_state *state)
  31. {
  32. fprintf (stream, "%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION);
  33. }
  34. void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
  35. /* Set the bug report address */
  36. const char *argp_program_bug_address = "<"PACKAGE_BUGREPORT">";