Re: patch: compile fixes

From: Simon Hausmann <hausmann.a.t.kde.org>
Date: Sun Jun 23 2002 - 16:24:51 EDT

On Sun, Jun 23, 2002 at 02:14:23PM -0600, spiralman@softhome.net wrote:
> open() and close() are in std, because they are open and close for the unix
> socket interface, without the std::, it tries to call this->open() and
> this->close(), since QWidget has both open() and close() functions...

open(2) and close(2) are C functions, provided by libc. C has no
namespaces, hence these methods are not part of the std:: namespace.
The reason why it worked for you is because you are using gcc 2.x,
which is broken with regard to the std:: namespace (it simpliy
ignores it by default, unless you use -fhonor-std-namespace or
something) .

The right fix for the 'name clash' is to prefix the function names
with :: , moving them into the global namespace. That is exactly
what my patch did.

Simon
Received on Sun Jun 23 20:24:56 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:50:08 EDT