mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
b236e99d90
Tue Aug 27 17:45:21 1996 Ulrich Drepper <drepper@cygnus.com> * Makerules: Add some test for correct version of GNU Make. * io/fcntl.h: Undo change from Mon Aug 26 22:22:17 1996. * sysdeps/unix/sysv/linux/fcntlbits.h: Place macros here instead. * sysdeps/generic/dl-sysdep.c: Initialize break address to avoid overwriting last page (OK, Roland). Tue Aug 27 16:20:37 1996 Ulrich Drepper <drepper@cygnus.com> * resolv/resolv.h: Update from BIND-4.9.5-T3A. * resolv/arpa/nameser.h: Likewise. * resolv/res_init.c: Likewise. * resolv/res_debug.c: Likewise. * resolv/res_mkquery.c: Likewise. Tue Aug 27 15:47:04 1996 Ulrich Drepper <drepper@cygnus.com> * elf/dl-error.c (catch): Define errstring element not as const. (_dl_catch_error): ERRSTRING argument is not const pointer. Initialize *ERRSTRING and *OBJNAME separately. * elf/link.h: Change prototype for `_dl_catch_error'. * elf/dl-load.c (_dl_map_object): Use separate variable for copied NAME to avoid `const' warning. * elf/dlerror.c: Make `last_errstring' variable not const pointer. * elf/rtld.c: Implement reading of /etc/ld.so.preload. This provides preloading even for SUID binaries. Add some more casts to avoid signed<->unsigned warnings. Tue Aug 27 15:40:28 1996 NIIBE Yutaka <gniibe@mri.co.jp> * posix/sys/types.h: Define loff_t. * sysdeps/unix/sysv/linux/gnu/types.h: Define __loff_t. Mon Aug 26 16:31:33 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/mach/hurd/setitimer.c (setitimer_locked): Tolerate NEW being null; in that case don't touch the timer at all (but do return something in OLD if necessary). Mon Aug 26 13:35:16 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * sysdeps/mach/hurd/i386/init-first.c (__libc_multiple_libcs): New variable. * sysdeps/i386/init-first.c: Likewise. * sysdeps/stub/init-first.c: Likewise.
50 lines
1.5 KiB
C
50 lines
1.5 KiB
C
/* Define and initialize `__progname'.
|
|
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
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
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with the GNU C Library; see the file COPYING.LIB. If
|
|
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
|
Cambridge, MA 02139, USA. */
|
|
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
|
|
char *__progname_full = (char *) "";
|
|
char *__progname = (char *) "";
|
|
weak_alias (__progname_full, program_invocation_name)
|
|
weak_alias (__progname, program_invocation_short_name)
|
|
|
|
|
|
static void __init_misc (int argc, char **argv, char **envp)
|
|
__attribute__ ((unused));
|
|
|
|
|
|
static void
|
|
__init_misc (int argc, char **argv, char **envp)
|
|
{
|
|
if (argv && argv[0])
|
|
{
|
|
char *p = strrchr (argv[0], '/');
|
|
if (p == NULL)
|
|
__progname = argv[0];
|
|
else
|
|
__progname = p + 1;
|
|
__progname_full = argv[0];
|
|
}
|
|
}
|
|
|
|
#ifdef HAVE_GNU_LD
|
|
text_set_element (__libc_subinit, __init_misc);
|
|
#endif
|