This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The libpthread init function calls uname and getrlimit, which means they are called just by being linked against it, even if the program does not use any of the libpthread functions, thus may use the function names for its own purpose. Andreas. 2010-04-08 Andreas Schwab <schwab@redhat.com> * sysdeps/unix/sysv/linux/i386/Versions: Export __uname under GLIBC_PRIVATE. * nptl/Versions: Export __getrlimit under GLIBC_PRIVATE. * sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname. * nptl/nptl-init.c: Call __getrlimit instead of getrlimit. --- nptl/Versions | 1 + nptl/nptl-init.c | 2 +- nptl/sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++ nptl/sysdeps/unix/sysv/linux/i386/smp.h | 2 +- 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 nptl/sysdeps/unix/sysv/linux/i386/Versions diff --git a/nptl/Versions b/nptl/Versions index 1f2de79..13ca357 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -29,6 +29,7 @@ libc { GLIBC_PRIVATE { # Internal libc interface to libpthread __libc_dl_error_tsd; + __getrlimit; } } diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c index 851bab2..c663f21 100644 --- a/nptl/nptl-init.c +++ b/nptl/nptl-init.c @@ -396,7 +396,7 @@ __pthread_initialize_minimal_internal (void) /* Determine the default allowed stack size. This is the size used in case the user does not specify one. */ struct rlimit limit; - if (getrlimit (RLIMIT_STACK, &limit) != 0 + if (__getrlimit (RLIMIT_STACK, &limit) != 0 || limit.rlim_cur == RLIM_INFINITY) /* The system limit is not usable. Use an architecture-specific default. */ diff --git a/nptl/sysdeps/unix/sysv/linux/i386/Versions b/nptl/sysdeps/unix/sysv/linux/i386/Versions new file mode 100644 index 0000000..9d53804 --- /dev/null +++ b/nptl/sysdeps/unix/sysv/linux/i386/Versions @@ -0,0 +1,6 @@ +libc { + GLIBC_PRIVATE { + # Internal libc interface to libpthread + __uname; + } +} diff --git a/nptl/sysdeps/unix/sysv/linux/i386/smp.h b/nptl/sysdeps/unix/sysv/linux/i386/smp.h index f68a0c0..bdff665 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/smp.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/smp.h @@ -37,7 +37,7 @@ is_smp_system (void) char *cp; /* Try reading the number using `sysctl' first. */ - if (uname (&u.uts) == 0) + if (__uname (&u.uts) == 0) cp = u.uts.version; else { -- 1.7.0.1 -- Andreas Schwab, schwab@redhat.com GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E "And now for something completely different."
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |