This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Patch] Document __secure_getenv
On 7/11/2012 9:56 AM, Florian Weimer wrote:
> On 07/11/2012 03:43 PM, Roland McGrath wrote:
>
>> No function starting with __ is intended for general public use and
>> is thus appropriate for the manual. If there is interest in making
>> this a public interface, then we should export it with a public
>> name (and document it).
>
> It is exported and already documented in <stdlib.h>. There are
> precedents for documenting __ symbols in the manual, such as
> __freading.
>
> __secure_getenv has been available basically since forever. I hope
> it's not going away. In application code, an alternative name would
> need a configure check or libc version check, plus an out-of-line
> copy or fallback to __secure_getenv. Perhaps this is avoidable.
The __ namespace is reserved for the implementation, unless you are part
of the implementation you should not rely on anything there.
If the community wants to export __secure_getenv, then as Roland says,
we should export it with a public name and document the behaviour.
Your next steps:
- Work up a patch that gives __secure_getenv a public interface.
- Fixup the documentation to use the new interface name.
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@mentor.com
carlos@codesourcery.com
+1 (613) 963 1026