On 15 January 2018 at 14:03, Jiri Svoboda <jirik.svob...@seznam.cz> wrote: > 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. >
I was under the impression that both you and JJ are concerned about this possibility of conflict. Hence the defensive prefix. If that impression was incorrect, then I completely agree with you. :) >> 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... > Some. Not a lot. Of course, there's the question of whether it's better to mask declarations, or just put them in a separate header. My rationale is that masking them behind _HELENOS_SOURCE is much simpler and faster, and if the separate header approach is preferred, then we can later simply search for the macro. -- jzr _______________________________________________ HelenOS-devel mailing list HelenOS-devel@lists.modry.cz http://lists.modry.cz/listinfo/helenos-devel