From: Andreas Schwab Date: Tue, 15 Jan 2013 13:36:09 +0000 (+0100) Subject: Hide reference to mktemp in libpthread X-Git-Tag: upstream/2.30~9621 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cfa8054fbb6212e64d54a3d4926972a6a20e3498;p=external%2Fglibc.git Hide reference to mktemp in libpthread --- diff --git a/ChangeLog b/ChangeLog index 78ab4ab..248e8df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-01-16 Andreas Schwab + + [BZ #14327] + * include/stdlib.h (__mktemp): Add declaration. + * misc/mktemp.c (__mktemp): Renamed from mktemp, add weak alias. + * misc/Versions (GLIBC_PRIVATE): Add __mktemp. + 2013-01-16 Siddhesh Poyarekar * sysdeps/ieee754/dbl-64/atnat.h: Remove constant value diff --git a/NEWS b/NEWS index 1cdc37a..55f65fd 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,8 @@ Version 2.18 * The following bugs are resolved with this release: - 13951, 14200, 14317, 14964, 14981, 14982, 14985, 14994, 14996, 15003. + 13951, 14200, 14317, 14327, 14964, 14981, 14982, 14985, 14994, 14996, + 15003. Version 2.17 diff --git a/include/stdlib.h b/include/stdlib.h index d45b2f0..2e53664 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -77,6 +77,7 @@ extern struct drand48_data __libc_drand48_data attribute_hidden; extern int __setenv (const char *__name, const char *__value, int __replace); extern int __unsetenv (const char *__name); extern int __clearenv (void); +extern char *__mktemp (char *__template) __THROW __nonnull ((1)); extern char *__canonicalize_file_name (const char *__name); extern char *__realpath (const char *__name, char *__resolved); extern int __ptsname_r (int __fd, char *__buf, size_t __buflen); diff --git a/misc/Versions b/misc/Versions index 64632f0..ec5aea7 100644 --- a/misc/Versions +++ b/misc/Versions @@ -151,6 +151,7 @@ libc { } GLIBC_PRIVATE { __madvise; + __mktemp; __libc_ifunc_impl_list; } } diff --git a/misc/mktemp.c b/misc/mktemp.c index 9886c5d..55421fd 100644 --- a/misc/mktemp.c +++ b/misc/mktemp.c @@ -22,7 +22,7 @@ The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. */ char * -mktemp (template) +__mktemp (template) char *template; { if (__gen_tempname (template, 0, 0, __GT_NOCREATE) < 0) @@ -31,5 +31,6 @@ mktemp (template) return template; } +weak_alias (__mktemp, mktemp) link_warning (mktemp, "the use of `mktemp' is dangerous, better use `mkstemp'") diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 4aacc17..c4f6c63 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2013-01-16 Andreas Schwab + + [BZ #14327] + * sem_open.c (sem_open): Use __mktemp instead of mktemp. + 2013-01-11 Carlos O'Donell * allocatestack.c (allocate_stack): Add comment. Remove assert diff --git a/nptl/sem_open.c b/nptl/sem_open.c index 5bc56c5..83b2fdf 100644 --- a/nptl/sem_open.c +++ b/nptl/sem_open.c @@ -329,7 +329,7 @@ sem_open (const char *name, int oflag, ...) since the file must be opened with a specific mode. The mode cannot later be set since then we cannot apply the file create mask. */ - if (mktemp (tmpfname) == NULL) + if (__mktemp (tmpfname) == NULL) return SEM_FAILED; /* Open the file. Make sure we do not overwrite anything. */