mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-16 18:10:11 +00:00
37de950b40
2002-03-03 Andreas Jaeger <aj@suse.de> * elf/nodlopenmod2.c: Provide prototype to avoid warning. * elf/tst-tlsmod1.c: Likewise. * posix/regcomp.c: Get regex.h from include dir for internal prototypes. * sysdeps/unix/sysv/linux/init-first.c: Move __init_misc prototype to libc-internal.h and include it. * include/libc-internal.h: Add __init_misc. * misc/init-misc.c: Include libc-internal.h for prototypes. * sysdeps/wordsize-32/divdi3.c: Add prototypes to avoid warnings. * misc/error.c [_LIBC]: Include libioP.h for prototype of _IO_putc_internal.
42 lines
1.4 KiB
C
42 lines
1.4 KiB
C
/* Define and initialize `__progname' et. al.
|
|
Copyright (C) 1994,1995,1996,1997,1998,2002 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 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.
|
|
|
|
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
|
|
Lesser General Public License for more details.
|
|
|
|
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. */
|
|
|
|
#include <string.h>
|
|
#include <libc-internal.h>
|
|
|
|
char *__progname_full = (char *) "";
|
|
char *__progname = (char *) "";
|
|
weak_alias (__progname_full, program_invocation_name)
|
|
weak_alias (__progname, program_invocation_short_name)
|
|
|
|
|
|
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];
|
|
}
|
|
}
|