This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Overloading vs. string functions, etc.


>>>>> "scott" == scott snyder <snyder@fnal.gov> writes:

    scott> Mark Mitchell <mark@codesourcery.com> writes:
    >> How about `#define strcpy __glibcpp_strcpy' in std_cstring.h
    >> before including /usr/includ/string.h?  I think that would do
    >> the trick.  Thoughts?

    scott> Will that work if someone includes <string.h> directly,
    scott> before <cstring>?

No -- but I am not trying to solve all the problems.  I don't want to
restart the discussion of how to do all of this correctly; it's too
complicated.

However, the particular case I noticed was used in multiple places in
the G++ testsuite, the V3 testsuite, and in the libsupc++ source base
-- so it's common.  The case you mentioned didn't show up in any of
those places, so I'm less concerned.

And, at least there is a workaround for your case: don't do that.  If
`#include <cstring>' by itself causes problems, you're stuck.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]