diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-08-02 08:26:10 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2008-08-02 08:26:10 +0000 |
commit | 2fb513c60061821c7e5e7fb6014d2afd0308b7e9 (patch) | |
tree | c7d9546bed03277ec2921a1b2cbda1f78620450b /sysdeps/unix/sysv/linux/dl-origin.c | |
parent | c7045198ca8f4ff5b97205340d51127f8503c2bd (diff) |
Updated to fedora-glibc-20080802T0809cvs/fedora-glibc-2_8_90-11
Diffstat (limited to 'sysdeps/unix/sysv/linux/dl-origin.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-origin.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-origin.c b/sysdeps/unix/sysv/linux/dl-origin.c index fdb6372f09..64e865b92a 100644 --- a/sysdeps/unix/sysv/linux/dl-origin.c +++ b/sysdeps/unix/sysv/linux/dl-origin.c @@ -35,16 +35,13 @@ const char * _dl_get_origin (void) { -#ifndef __ASSUME_AT_EXECFN char linkval[PATH_MAX]; -#endif const char *str; char *result = (char *) -1l; int len; str = GLRO(dl_execfn); -#ifndef __ASSUME_AT_EXECFN - if (str == NULL) + if (str == NULL || str[0] != '/') { INTERNAL_SYSCALL_DECL (err); @@ -53,12 +50,12 @@ _dl_get_origin (void) if (! INTERNAL_SYSCALL_ERROR_P (len, err) && len > 0 && linkval[0] != '[') str = linkval; + else + str = NULL; } else -#endif len = strlen (str); -#ifndef __ASSUME_AT_EXECFN if (str == NULL) { /* We use the environment variable LD_ORIGIN_PATH. If it is set make @@ -79,7 +76,6 @@ _dl_get_origin (void) } } else -#endif { /* We can use this value. */ assert (str[0] == '/'); |