Blame csu/version.c

Packit 6c4009
/* Copyright (C) 1992-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#include "version.h"
Packit 6c4009
#include <tls.h>
Packit 6c4009
#include <libc-abis.h>
Packit 6c4009
#include <gnu/libc-version.h>
Packit 6c4009
Packit 6c4009
static const char __libc_release[] = RELEASE;
Packit 6c4009
static const char __libc_version[] = VERSION;
Packit 6c4009
Packit 6c4009
static const char banner[] =
Packit 6c4009
"GNU C Library "PKGVERSION RELEASE" release version "VERSION".\n\
Packit 6c4009
Copyright (C) 2018 Free Software Foundation, Inc.\n\
Packit 6c4009
This is free software; see the source for copying conditions.\n\
Packit 6c4009
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
Packit 6c4009
PARTICULAR PURPOSE.\n\
Packit 6c4009
Compiled by GNU CC version "__VERSION__".\n"
Packit 6c4009
#ifdef LIBC_ABIS_STRING
Packit 6c4009
LIBC_ABIS_STRING
Packit 6c4009
#endif
Packit 6c4009
"For bug reporting instructions, please see:\n\
Packit 6c4009
"REPORT_BUGS_TO".\n";
Packit 6c4009
Packit 6c4009
#include <unistd.h>
Packit 6c4009
Packit 6c4009
extern void __libc_print_version (void) attribute_hidden;
Packit 6c4009
void
Packit 6c4009
__libc_print_version (void)
Packit 6c4009
{
Packit 6c4009
  __write (STDOUT_FILENO, banner, sizeof banner - 1);
Packit 6c4009
}
Packit 6c4009
Packit 6c4009
extern const char *__gnu_get_libc_release (void);
Packit 6c4009
const char *
Packit 6c4009
__gnu_get_libc_release (void)
Packit 6c4009
{
Packit 6c4009
  return __libc_release;
Packit 6c4009
}
Packit 6c4009
weak_alias (__gnu_get_libc_release, gnu_get_libc_release)
Packit 6c4009
Packit 6c4009
extern const char *__gnu_get_libc_version (void);
Packit 6c4009
const char *
Packit 6c4009
__gnu_get_libc_version (void)
Packit 6c4009
{
Packit 6c4009
  return __libc_version;
Packit 6c4009
}
Packit 6c4009
weak_alias (__gnu_get_libc_version, gnu_get_libc_version)
Packit 6c4009
Packit 6c4009
/* This function is the entry point for the shared object.
Packit 6c4009
   Running the library as a program will get here.  */
Packit 6c4009
Packit 6c4009
extern void __libc_main (void) __attribute__ ((noreturn));
Packit 6c4009
void
Packit 6c4009
__libc_main (void)
Packit 6c4009
{
Packit 6c4009
  __libc_print_version ();
Packit 6c4009
  _exit (0);
Packit 6c4009
}