Files
glibc/csu/version.c
T

80 lines
2.4 KiB
C
Raw Normal View History

2006-01-01 19:15:56 +00:00
/* Copyright (C) 1992-2002, 2003, 2004, 2006 Free Software Foundation, Inc.
1997-01-06 22:07:28 +00:00
This file is part of the GNU C Library.
1995-02-18 01:27:10 +00:00
1997-01-06 22:07:28 +00:00
The GNU C Library is free software; you can redistribute it and/or
2001-07-06 04:58:11 +00:00
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
1995-02-18 01:27:10 +00:00
1997-01-06 22:07:28 +00:00
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2001-07-06 04:58:11 +00:00
Lesser General Public License for more details.
1995-02-18 01:27:10 +00:00
2001-07-06 04:58:11 +00:00
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
1995-02-18 01:27:10 +00:00
#include "version.h"
2002-02-09 01:29:45 +00:00
#include <tls.h>
1998-02-13 17:54:15 +00:00
#include <gnu/libc-version.h>
static const char __libc_release[] = RELEASE;
static const char __libc_version[] = VERSION;
1995-02-18 01:27:10 +00:00
static const char banner[] =
"GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\
2006-01-01 19:15:56 +00:00
Copyright (C) 2006 Free Software Foundation, Inc.\n\
1995-02-18 01:27:10 +00:00
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
PARTICULAR PURPOSE.\n\
Compiled by GNU CC version "__VERSION__".\n"
1996-09-07 23:56:19 +00:00
#include "version-info.h"
2000-12-01 23:15:18 +00:00
#ifdef GLIBC_OLDEST_ABI
"The oldest ABI supported: " GLIBC_OLDEST_ABI ".\n"
#endif
2002-02-09 01:29:45 +00:00
#ifdef USE_TLS
"Thread-local storage support included.\n"
#endif
2004-05-17 18:59:35 +00:00
"For bug reporting instructions, please see:\n\
<http://www.gnu.org/software/libc/bugs.html>.\n";
#include <unistd.h>
2000-11-20 09:16:41 +00:00
extern void __libc_print_version (void);
void
__libc_print_version (void)
{
__write (STDOUT_FILENO, banner, sizeof banner - 1);
1995-02-18 01:27:10 +00:00
}
2001-03-21 21:43:52 +00:00
extern const char *__gnu_get_libc_release (void);
1998-02-13 17:54:15 +00:00
const char *
__gnu_get_libc_release (void)
{
return __libc_release;
}
weak_alias (__gnu_get_libc_release, gnu_get_libc_release)
2001-03-21 21:43:52 +00:00
extern const char *__gnu_get_libc_version (void);
1998-02-13 17:54:15 +00:00
const char *
__gnu_get_libc_version (void)
{
return __libc_version;
}
weak_alias (__gnu_get_libc_version, gnu_get_libc_version)
#ifdef HAVE_ELF
/* This function is the entry point for the shared object.
Running the library as a program will get here. */
2000-11-20 09:16:41 +00:00
extern void __libc_main (void) __attribute__ ((noreturn));
void
__libc_main (void)
{
__libc_print_version ();
_exit (0);
}
#endif