175fd0b74Schristos /* version.c -- binutils version information
2*e992f068Schristos Copyright (C) 1991-2022 Free Software Foundation, Inc.
375fd0b74Schristos
475fd0b74Schristos This file is part of GNU Binutils.
575fd0b74Schristos
675fd0b74Schristos This program is free software; you can redistribute it and/or modify
775fd0b74Schristos it under the terms of the GNU General Public License as published by
875fd0b74Schristos the Free Software Foundation; either version 3, or (at your option)
975fd0b74Schristos any later version.
1075fd0b74Schristos
1175fd0b74Schristos This program is distributed in the hope that it will be useful,
1275fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of
1375fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1475fd0b74Schristos GNU General Public License for more details.
1575fd0b74Schristos
1675fd0b74Schristos You should have received a copy of the GNU General Public License
1775fd0b74Schristos along with this program; if not, write to the Free Software
1875fd0b74Schristos Foundation, 51 Franklin Street - Fifth Floor, Boston,
1975fd0b74Schristos MA 02110-1301, USA. */
2075fd0b74Schristos
2175fd0b74Schristos #include "sysdep.h"
2275fd0b74Schristos #include "bfd.h"
2375fd0b74Schristos #include "bucomm.h"
2475fd0b74Schristos
2575fd0b74Schristos /* Print the version number and copyright information, and exit.
2675fd0b74Schristos This implements the --version option for the various programs. */
2775fd0b74Schristos
2875fd0b74Schristos void
print_version(const char * name)2975fd0b74Schristos print_version (const char *name)
3075fd0b74Schristos {
3175fd0b74Schristos /* This output is intended to follow the GNU standards document. */
3275fd0b74Schristos /* xgettext:c-format */
3375fd0b74Schristos printf ("GNU %s %s\n", name, BFD_VERSION_STRING);
34*e992f068Schristos printf (_("Copyright (C) 2022 Free Software Foundation, Inc.\n"));
3575fd0b74Schristos printf (_("\
3675fd0b74Schristos This program is free software; you may redistribute it under the terms of\n\
3775fd0b74Schristos the GNU General Public License version 3 or (at your option) any later version.\n\
3875fd0b74Schristos This program has absolutely no warranty.\n"));
3975fd0b74Schristos exit (0);
4075fd0b74Schristos }
41