Hi, On Sunday 23 March 2008, Csaba Halász wrote: > On Sun, Mar 23, 2008 at 4:48 PM, Volker Lukas <[EMAIL PROTECTED]> wrote: > > The following is a list of source files and the headers which have to be > > included additionally in that source file because the file uses > > functions like strlen, atoi, memcmp... declared in one of the headers: > > > > Simgear: > > simgear/io/sg_file.cxx - <string.h> > > simgear/io/sg_serial.cxx - <stdlib.h> <string.h> > > simgear/misc/strutils.cxx - <string.h> > > simgear/misc/tabbed_values.cxx - <stdlib.h> > > simgear/screen/RenderTexture.cpp - <string.h> > > simgear/screen/shader.cpp - <stdlib.h> <string.h> > > simgear/screen/TestRenderTexture.cpp - <stdlib.h> > > > > Flightgear: > > src/Airports/dynamicloader.cxx - <stdlib.h> > > src/Airports/runwayprefloader.cxx - <stdlib.h> <string.h> > > src/Airports/runways.cxx - <stdlib.h> > > src/FDM/JSBSim/input_output/FGfdmSocket.cpp - <string.h> > > src/FDM/YASim/yasim-test.cpp - <stdlib.h> <string.h> > > src/Main/util.cxx - <stdlib.h> > > Since these are C++ files, I recommend using cstdlib/cstring unless > there is some problem with doing that. I agree and would favour your approach. I want to make just one comment: The headers of the form <cname> are not required to place all names in the global namespace. So if for example <cstring> is used as opposed to <string.h>, you have to also qualify names with the namespace "std", i.e. using "std::strlen" as opposed to just "strlen". At least if you want to be as portable as possible. As far as I can see, there are some places in Flightgear where functions like strlen are not properly qualified or brought in scope via other means. However, I do not know a real C++ implementation where the mentioned practice is actually required, so this comment does not mean I oppose your recommendation. I just wanted to make clear why I have chosen to suggest the <name.h> forms of the headers.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel