On 03/15/16 12:00, Bartosz Gołaszewski wrote:
2016-03-14 21:09 GMT+01:00 Rich Felker<[email protected]>:
>On Mon, Mar 14, 2016 at 10:27:19AM -0400, Mike Frysinger wrote:
>>On 14 Mar 2016 11:07, Bartosz Golaszewski wrote:
>> >+#ifndef __BB_NAMESPACE_H
>> >+#define __BB_NAMESPACE_H
>>
>>use a naming style like other busybox headers
>
>And in particular, don't use leading underscores, ever. They're not
>available for use by applications.
>
I'll fix it in v5. May I ask what the issue is with leading
underscores? A lot of applications use them to distinguish routines
that are visible outside of their .c files, but are not part of any
API and shouldn't be called directly. Is this approach wrong?
Cfr. ISO C11 standard [1] page 182 section 7.1.3 Reserved ddentifiers:
All identifiers that begin with an underscore and either an uppercase letter or
another underscore are always reserved for any use.
See also a stackoverflow answer [2] and a coding guideline [3].
Regards,
Arnout
[1] http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1570.pdf
[2]
http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier
[3]
https://www.securecoding.cert.org/confluence/display/c/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier
--
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com
Senior Embedded Software Architect . . . . . . +32-478-010353 (mobile)
Essensium, Mind division . . . . . . . . . . . . . . http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium . . . . . BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox