This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: [setup and gcc3] Revised patches - now with ChangeLog!
- From: "Max Bowsher" <maxb at ukf dot net>
- To: "Robert Collins" <robertc at squid-cache dot org>,<cygwin-apps at cygwin dot com>
- Date: Mon, 4 Nov 2002 17:29:08 -0000
- Subject: Re: [setup and gcc3] Revised patches - now with ChangeLog!
- References: <00b501c283f3$0d6cf050$78d96f83@pomello> <1036409401.15491.78.camel@lifelesswks>
Robert Collins <robertc@squid-cache.org> wrote:
> On Mon, 2002-11-04 at 22:12, Max Bowsher wrote:
>> ##################### 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?
stringstreams
>> # 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.
It would have helped me to know this immediately when producing these
patches. I like it this way, but ultimately, you have the final say.
>> # 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?
Change in order of interdependent includes, I guess.
>> # fix-cygwin-mode.patch
>> * io_stream.h: Protect a typedef of ssize_t that is not needed when
>> compiling for Cygwin.
>
> Ditto.
It does impact gcc 2.95, as well as gcc 3.
>> * mkdir.cc: Don't try to compile pseudocode when compiling for
>> Cygwin!.
>
> Ditto.
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.
Well, maybe when you "*very* soon review / parallel implement a gcc 3 update
to setup" you can do this :-)
Seriously, I don't have the experience with templates to go wading around in
the libstdc++ internals.
In the meantime, can it be used as an interim kludge to allow the rest of my
updates to be reviewed?
>> # 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?
proppage.h: libstdc++-v2.95 doesn't die horribly if min & max macros are
defined.
res.rc: gcc 2.95's preprocessor seems less picky.
>> # 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.
This patchset allows a clean compile in all 4 configurations
{-mno-cygwin,Cygwin-linked}/{gcc2-2.95.3-10,gcc-3.2-1 and
gcc-mingw-3.2-20020817-1}.
>> # 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?
Ditto.
Max.