John W. Eaton wrote: > How can one easily find all the places where the GNULIB_NAMESPACE tag > is needed? Is there some way we can get the compiler to help with > this job?
Good point. I'm adding a macro _GL_CXXALIASWARN, so that a warning will be emitted: foo.cc: In function ‘int main()’: foo.cc:21: warning: call to ‘open’ declared with attribute warning: The symbol ::open refers to the system function. Use gnulib::open instead. > Is there some reason to not add using directives in the gnulib > headers for each system function that is placed in the gnulib:: > namespace? > Oh, now I remember that doing this requires placing the system headers > inside a namespace, and I guess that could cause some trouble. But > would you be interested in trying it? I could do the testing and help > with making the required changes. You can try it. But I doubt that you will get to a portable solution this way, because of differences between various C++ compilers. Bruno