xref: /dflybsd-src/contrib/binutils-2.27/binutils/version.c (revision e656dc90e3d65d744d534af2f5ea88cf8101ebcf)
1*a9fa9459Szrj /* version.c -- binutils version information
2*a9fa9459Szrj    Copyright (C) 1991-2016 Free Software Foundation, Inc.
3*a9fa9459Szrj 
4*a9fa9459Szrj    This file is part of GNU Binutils.
5*a9fa9459Szrj 
6*a9fa9459Szrj    This program is free software; you can redistribute it and/or modify
7*a9fa9459Szrj    it under the terms of the GNU General Public License as published by
8*a9fa9459Szrj    the Free Software Foundation; either version 3, or (at your option)
9*a9fa9459Szrj    any later version.
10*a9fa9459Szrj 
11*a9fa9459Szrj    This program is distributed in the hope that it will be useful,
12*a9fa9459Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*a9fa9459Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*a9fa9459Szrj    GNU General Public License for more details.
15*a9fa9459Szrj 
16*a9fa9459Szrj    You should have received a copy of the GNU General Public License
17*a9fa9459Szrj    along with this program; if not, write to the Free Software
18*a9fa9459Szrj    Foundation, 51 Franklin Street - Fifth Floor, Boston,
19*a9fa9459Szrj    MA 02110-1301, USA.  */
20*a9fa9459Szrj 
21*a9fa9459Szrj #include "sysdep.h"
22*a9fa9459Szrj #include "bfd.h"
23*a9fa9459Szrj #include "bucomm.h"
24*a9fa9459Szrj 
25*a9fa9459Szrj /* Print the version number and copyright information, and exit.
26*a9fa9459Szrj    This implements the --version option for the various programs.  */
27*a9fa9459Szrj 
28*a9fa9459Szrj void
print_version(const char * name)29*a9fa9459Szrj print_version (const char *name)
30*a9fa9459Szrj {
31*a9fa9459Szrj   /* This output is intended to follow the GNU standards document.  */
32*a9fa9459Szrj   /* xgettext:c-format */
33*a9fa9459Szrj   printf ("GNU %s %s\n", name, BFD_VERSION_STRING);
34*a9fa9459Szrj   printf (_("Copyright (C) 2016 Free Software Foundation, Inc.\n"));
35*a9fa9459Szrj   printf (_("\
36*a9fa9459Szrj This program is free software; you may redistribute it under the terms of\n\
37*a9fa9459Szrj the GNU General Public License version 3 or (at your option) any later version.\n\
38*a9fa9459Szrj This program has absolutely no warranty.\n"));
39*a9fa9459Szrj   exit (0);
40*a9fa9459Szrj }
41