This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/3] libstdc++-v3: ::tmpnam depends on uClibc SUSV4_LEGACY
- From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- To: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- Cc: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>, libstdc++ at gcc dot gnu dot org, paolo dot carlini at oracle dot com
- Date: Thu, 11 Apr 2013 14:04:02 +0200
- Subject: Re: [PATCH 2/3] libstdc++-v3: ::tmpnam depends on uClibc SUSV4_LEGACY
- References: <1365105210-16552-1-git-send-email-rep dot dot dot nop at gmail dot com> <1365105210-16552-3-git-send-email-rep dot dot dot nop at gmail dot com> <CAAiZkiBiUc8=dx54kWKVjDE6sCjzyTgKUZiC65=NdVi_Mg=5rg at mail dot gmail dot com> <ydd1uapic5b dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <CAAiZkiAqeHNOhkZ1FgWg1eSz4mF+9fvF1k9sLaO3hxab-X2WRg at mail dot gmail dot com> <yddwqshgx0s dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <CAAiZkiDp07LpKYHZTuQ1pW0niLpZm+3qWN4J0m0=KUNKuTGa7g at mail dot gmail dot com> <CAC1BbcQQJ-W078_+ag4H2voeSCnCut9LXyG6_kBd1+nvBQX30g at mail dot gmail dot com>
On 5 April 2013 11:48, Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> wrote:
> On 5 April 2013 11:23, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
>> On Fri, Apr 5, 2013 at 4:13 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>> Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
>>>
>>>> On Fri, Apr 5, 2013 at 4:01 AM, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>>>>> Gabriel Dos Reis <gdr@integrable-solutions.net> writes:
>>>>>
>>>>>>> diff --git a/libstdc++-v3/include/c_global/cstdio
>>>>>>> b/libstdc++-v3/include/c_global/cstdio
>>>>>>> index fcbec0c..037a668 100644
>>>>>>> --- a/libstdc++-v3/include/c_global/cstdio
>>>>>>> +++ b/libstdc++-v3/include/c_global/cstdio
>>>>>>> @@ -131,7 +131,9 @@ namespace std
>>>>>>> using ::sprintf;
>>>>>>> using ::sscanf;
>>>>>>> using ::tmpfile;
>>>>>>> +#if !defined __UCLIBC__ || defined __UCLIBC_SUSV4_LEGACY__
>>>>>>> using ::tmpnam;
>>>>>>> +#endif
>>>>>>> using ::ungetc;
>>>>>>> using ::vfprintf;
>>>>>>> using ::vprintf;
>>>>>>> --
>>>>>>> 1.7.10.4
>>> b>>>>
>>>>>>
>>>>>> Sounds good to me.
>>>>>
>>>>> Do we really want to use target-specific macros directly instead of
>>>>> defining something more abstract either via a configure test or a define
>>>>> in config/os/uclibc?
>>>>>
>>>>> Rainer
>>>>
>>>> What would your suggestion for defineingsomething more abstract that reliably
>>>> says whether the feature is deprecated or absent?
>>>
>>> It seems _GLIBCXX_USE_TMPNAM would be in line with the other macros I
>>> see. Than either configure could test if tmpnam() is available without
>>> special additional macros or config/os/uclibc/os_config.h could define
>>> it to 0, with a default of 1 (best decided by the libstdc++
>>> maintainers).
>>>
>>> The configure route seems cleaner to me, especially given that
>>> Bernhard's rationale for uClibc no longer providing it by default
>>> suggests that other systems might follow in the foreseeable future.
>
>> sounds reasonable; Bernhard, would you mind amending your patch in
>> that direction?
>
> I'll have a look.
Done with the configure check, looks prettier indeed, will followup once tested.
I would have expected that somebody would tell me that omitting
::tmpnam violates 27.9.2 <cstdio> from the spec but noone yelled at me
yet?
> Thanks,