bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Module with preprocessor utilities


From: Marc Nieper-Wißkirchen
Subject: Module with preprocessor utilities
Date: Sun, 19 Jul 2020 14:57:09 +0200

Besides modules to improve system compatibility, Gnulib contains a
number of modules that provide "missing" functionality of the C
standard library (like the gl_list module).

What would be the chances to include a module with sophisticated
preprocessor macros like P99 ([1]) or the Boost Preprocessing library
([2])?

It would be a header-only module and its functionality could grow over
time. To allow for the latter in a backward compatible way, it would
make sense to prefix all exported macros with GL_. The internal macros
could be prefixed with _GL_. While this is strictly a violation of
what identifiers are allowed in ISO C, Gnulib already does it this
way.

Such a module would have zero footprint in the library and could be
used by other modules that  currently make use of ad-hoc definitions,
for example the verify module, which defines _GL_CONCAT and
_GL_COUNTER ([3]).

Marc

--

[1] https://gustedt.gitlabpages.inria.fr/p99/p99-html/

[2] https://www.boost.org/doc/libs/1_73_0/libs/preprocessor/doc/index.html

[3] http://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/verify.h#n159



reply via email to

[Prev in Thread] Current Thread [Next in Thread]