This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, 2002-11-04 at 22:12, Max Bowsher wrote: > Here are revised patches, incorporating the use of "using namespace std;" as > suggested. > > Also, here is a ChangeLog (with additional comments on lines prefixed #). > > Comments welcomed, > > Max. > > > ##################### ChangeLog ######################### > 2002-11-03 Max Bowsher <maxb@ukf.net> > > # fix-CFLAGS+=-Wno-deprecated.patch > * Makefile.am: Add -Wno-deprecated to CFLAGS. > # strstreams are deprecated in gcc3. Since we are using -Werror, we need > to turn off the warning to allow the build to succeed. What is the replacement for strstreams? > # fix-algorithm.patch > * archive_tar_file.cc: Include <algorithm>. > Change min(a,b) to std::min(a,b) > * compress_bz.cc: Ditto. > * compress_gz.cc: Ditto. > # I deliberately did not use "using namespace std;" here, so that people > new to the setup code can see that these are not macros. mmm. I'm a bit undecided on this. using namespace std; is easier to read than std::. And for code newbies macros vs templates are pretty much irrelevant. > # fix-bzlib-windows.h-clash.patch > compress_bz.cc: #undef small before including bzlib.h > compress_bz.h: Ditto. > # If we are going to hide the fact that we are _WIN32 from bzlib, > then we need to #undef small for it as well (bad windows.h clash). Why doesn't this impact gcc 2.95? > # fix-cygwin-mode.patch > * io_stream.h: Protect a typedef of ssize_t that is not needed when > compiling for Cygwin. Ditto. > * mkdir.cc: Don't try to compile pseudocode when compiling for Cygwin!. Ditto. > # fix-gcc3-dodgy-NULL-streambuf.patch > * LogSingleton.cc (LogSingleton::LogSingleton): Initialize the parent > ostream with a NULL streambuf pointer. Legal? I don't know, but I think > it used to be done implicitly, but libstdc++-v3 no longer allows that. Someone (for now, not I), needs to read the ostream g++-3 template to see what is done with the streambuf pointer before I'll accept this. > # fix-gcc3-just-using-namespace-std.patch > * IniDBBuilderPackage.cc: Add 'using namespace std;'. > * IniParseFindVisitor.cc: Ditto. > * LogFile.cc: Ditto. > * LogSingleton.cc: Ditto. > * PickView.cc: Ditto. > * String++.cc: Ditto. > * choose.cc: Ditto. > * download.cc: Ditto. > * find.cc: Ditto. > * install.cc: Ditto. > * io_stream.cc: Ditto. > * io_stream_file.cc: Ditto. > * package_db.cc: Ditto. > * root.cc: Ditto. > * site.cc: Ditto. Ok. > # fix-gcc3-main.patch > * Exception.h (Exception::what): Add throw() specification, > to agree with libstdc++-v3. > * Exception.cc (Exception::what): Ditto. > * IniDBBuilderPackage.h: Add 'std::' where needed. > * LogFile.h: Ditto. > * LogSingleton.h: Ditto. > * PickCategoryLine.h: Ditto. > * String++.h: Ditto. > * category.h: Ditto. > * package_db.h: Ditto. > * package_meta.h: Ditto. > * package_source.h: Ditto. > * package_version.h: Ditto. > * site.h: Ditto. > * win32.h: Define NOMINMAX before including <windows.h>. > * package_meta.cc: Add 'using namespace std;'. > (packagemeta::set_requirements): Remove default parameter values > from definition (gcc3 likes them only in declaration). > * package_version.cc: Add 'using namespace std;'. > (packageversion::set_requirements): Remove default parameter > values from definition (gcc3 likes them only in declaration). Ok. I'll review in more detail when everything else is sorted. > # fix-proppage.h-no-include-windows.h-directly.patch > * proppage.h: Include <windows.h> via "win32.h" not directly. > # This allows any anti-pollution defines to be gathered in win32.h, > not repeated everywhere <windows.h> is included. > > # fix-res.rc-bad-comment.patch > * res.rc: Change a #-comment (invalid) to a //-comment. Why doesn't this impact gcc 2.95? > # fix-gcc2-setup-and-libgetopt++.patch > * Makefile.am (%.o: %.rc): Make windres use $(CC) not hardcoded gcc. > (inilint_LDADD): Remove -lstd++. > (setup_LDADD): Ditto. > * libgetopt++/Makefile.am (libgetopt___la_LDFLAGS): Ditto. I presume gcc3 adds -lstd++ itself? We need a gcc 2.95 compatible version of this patch - both need to work. > # fix-gcc3-libgetopt++.patch > * libgetopt++/include/getopt++/BoolOption.h: Add 'std::' where > needed. > * libgetopt++/include/getopt++/Option.h: Ditto. > * libgetopt++/include/getopt++/OptionSet.h: Ditto. > * libgetopt++/include/getopt++/StringOption.h: Ditto. > * libgetopt++/src/BoolOption.cc: Add 'using namespace std;'. > * libgetopt++/src/OptionSet.cc: Ditto. > * libgetopt++/src/StringOption.cc: Ditto. Again, are these both 2.95 and 3.0 compatible? Rob -- --- GPG key available at: http://users.bigpond.net.au/robertc/keys.txt. ---
Attachment:
signature.asc
Description: This is a digitally signed message part
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |