I agree that we shouldn't use non-reserved identifiers, because it's
necessary to be standards conformant. However, using a _HELENOS prefix seems
too paranoid. The worst that could happen is that upon a compiler upgrade we
could get a conflict, but this is rather unprobable. No libc I know of does
this.

Solaris libc, GNU libc, libmusl all use header guard _STDIO_H for stdio.h

I really wouldn't worry so much. Using _HELENOS prefix everywhere is just 
too ugly and has very little benefit.

> Any nonstandard identifiers defined in
> standard headers must be guarded by '#ifdef _HELENOS_SOURCE', as
> modeled after existing similar conventions, notably _GNU_SOURCE,
> _POSIX_SOURCE, _XOPEN_SOURCE, etc.
Is there a lot of these? I think these should be rather scarce...

Regards,
Jiri

---------- Původní e-mail ----------
Od: Jiří Zárevúcky <zarevucky.j...@gmail.com>
Komu: HelenOS development mailing list <helenos-devel@lists.modry.cz>
Datum: 13. 1. 2018 3:27:26
Předmět: [HelenOS-devel] Reserved identifiers in libc
"Hello everyone.

Since standard headers shouldn't define any non-standard, non-reserved
identifiers, I hereby declare that identifiers starting with either
'_HELENOS' or '__helenos' are reserved for use by our libraries.

Any identifiers defined by our libraries that start with either two
underscores or an underscore and a capital letter, should from now on
use one of these prefixes, with exceptions only considered where prior
art sets a strong convention. Any nonstandard identifiers defined in
standard headers must be guarded by '#ifdef _HELENOS_SOURCE', as
modeled after existing similar conventions, notably _GNU_SOURCE,
_POSIX_SOURCE, _XOPEN_SOURCE, etc.

I'll be working on aligning our headers to these requirements in coming 
days.

Anyone who disagrees with this course of action is expected to propose
a better alternative. ;-)

-- jzr

_______________________________________________
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel
"
_______________________________________________
HelenOS-devel mailing list
HelenOS-devel@lists.modry.cz
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to