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  <[EMAIL PROTECTED]>

# 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.

# 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.

# 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).

# fix-cygwin-mode.patch
 * io_stream.h: Protect a typedef of ssize_t that is not needed when
 compiling for Cygwin.
 * mkdir.cc: Don't try to compile pseudocode when compiling for Cygwin!.

# 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.

# 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.

# 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).

# 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.

# 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.

# 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.

####################### END ############################

Attachment: fix-gcc3-just-using-namespace-std.patch
Description: Binary data

Attachment: fix-gcc3-libgetopt++.patch
Description: Binary data

Attachment: fix-gcc3-main.patch
Description: Binary data

Attachment: fix-proppage.h-no-include-windows.h-directly.patch
Description: Binary data

Attachment: fix-res.rc-bad-comment.patch
Description: Binary data

Attachment: fix-algorithm.patch
Description: Binary data

Attachment: fix-bzlib-windows.h-clash.patch
Description: Binary data

Attachment: fix-CFLAGS+=-Wno-deprecated.patch
Description: Binary data

Attachment: fix-cygwin-mode.patch
Description: Binary data

Attachment: fix-gcc2-setup-and-libgetopt++.patch
Description: Binary data

Attachment: fix-gcc3-dodgy-NULL-streambuf.patch
Description: Binary data

Attachment: ChangeLog
Description: Binary data

Reply via email to