* cygwin.din: Export program_invocation_name and
	program_invocation_short_name.
	* dcrt0.cc: Set program_invocation*name to correct values, based on
	argv[0].
	* globals.cc (program_invocation_name): Define.
	(program_invocation_short_name): Ditto
newlib:
	* libc/include/sys/errno.h (program_invocation_name): Declare.
	(program_invocation_short_name): Ditto.
This commit is contained in:
Christopher Faylor 2010-12-26 21:11:38 +00:00
parent d64bda8409
commit 589e430baa
6 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-12-26 Christopher Faylor <me+cygwin@cgf.cx>
* libc/include/sys/errno.h (program_invocation_name): Declare.
(program_invocation_short_name): Ditto.
2010-12-16 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 1.19.0 info.

View File

@ -22,6 +22,8 @@ extern __IMPORT int _sys_nerr;
#ifdef __CYGWIN__
extern __IMPORT const char * const sys_errlist[];
extern __IMPORT int sys_nerr;
extern __IMPORT char *program_invocation_name;
extern __IMPORT char *program_invocation_short_name;
#endif
#define __errno_r(ptr) ((ptr)->_errno)

View File

@ -1,3 +1,11 @@
2010-12-26 Christopher Faylor <me+cygwin@cgf.cx>
* cygwin.din: Export program_invocation_name and program_invocation_short_name.
* dcrt0.cc: Set program_invocation*name to correct values, based on
argv[0].
* globals.cc (program_invocation_name): Define.
(program_invocation_short_name): Ditto.
2010-12-16 Corinna Vinschen <corinna@vinschen.de>
* security.cc (alloc_sd): Really fix erroneous inheritence entry

View File

@ -1161,6 +1161,8 @@ powf NOSIGFE
_powf = powf NOSIGFE
pread SIGFE
printf SIGFE
program_invocation_name DATA
program_invocation_short_name DATA
_printf = printf SIGFE
pselect SIGFE
pthread_atfork SIGFE

View File

@ -915,6 +915,8 @@ dll_crt0_1 (void *)
++__progname;
else
__progname = __argv[0];
program_invocation_name = __argv[0];
program_invocation_short_name = __progname;
if (__progname)
{
char *cp = strchr (__progname, '\0') - 4;

View File

@ -138,6 +138,8 @@ extern "C"
char ***main_environ = &__cygwin_environ;
/* __progname used in getopt error message */
char *__progname;
char *program_invocation_name;
char *program_invocation_short_name;
static MTinterface _mtinterf;
struct per_process __cygwin_user_data =
{/* initial_sp */ 0, /* magic_biscuit */ 0,