Bruno Haible via Gnulib discussion list <[email protected]> writes: > Arsen Arsenović wrote: >> Gnulib is distributed as part of the application, pulled in by the >> application developer, tested as part of the application, and built by >> the application build system (*using* the implementation). >> >> It is *not* distributed as part of the implementation, pulled in by the >> implementation, tested as part of the implementation or built by the >> implementation build system. >> >> It is therefore part of the application. > > I don't think the way Gnulib is distributed, or whether it contains some > code from glibc, matters for this topic. > > We have a dilemma — no room between the implementation and the application —, > and I'm merely looking for a way to solve this dilemma with the least > likelihood of trouble on either side.
Perhaps at least part of what Arsen is getting at is that Gnulib breaking builds, when it occurs, causes a bit more pain for downstream maintainers than those of typical packages, since they have to be fixed wherever Gnulib is imported. At least I had that consideration when reading his emails. It is a concern that I have, but one that is outweighed by the benefits brought by Gnulib for projects. When I have seen Gnulib break builds, we have always responded fairly quickly with some ideas for a patch. It feels like a comfortable balance to me. >> GCC is right to define _T_ to whatever it wants. > > GCC does not use the identifier _T_. The identifiers in libstdc++ start > with an underscore but don't end with an underscore; so there is no > conflict with Gnulib here. > >> It would be valid for >> GCC N+1 to define it as the lyrics of L'Internationale; that's its >> prerogative, but it'd break Gnulib. > > And what about the identifier '_'? Would you advocate for GCC to break > all programs that do > #define _ gettext > ? Or another one that everyone violates, "*_t". The only place I have seen respect for that namespace is Vim, which uses names like this: typedef struct image_S image_T; It looks too wonky to me, and I suspect that is why it hasn't caught on in other places. I don't know enough about C++ to comment much on this case, though. I suspect trailing underscores are quite uncommon, though. Collin
