public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Help compiling gnu commonc++2
@ 2004-03-04  0:33 Jason.Majors
  2004-03-04  1:44 ` Claudio Bley
  0 siblings, 1 reply; 2+ messages in thread
From: Jason.Majors @ 2004-03-04  0:33 UTC (permalink / raw)
  To: gcc-help

I'm trying to compile commonc++2-1.1.0 on AIX 4.3.2 using g++ 2.95.3 (the 
latest we can get here unfortunately).

I get this error message:
/usr/include/strings.h:60: declaration of C function `void memcpy(void *, 
const void *, long unsigned int)' conflicts with
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/include/string.h:92: 
previous declaration `void * memcpy(void *, const void *, long unsigned 
int)' here
...
.../straits.h: In function `static char *
string_char_traits<char>::copy(char *, const char *, long unsigned int)':
.../straits.h:127: cannot convert `memcpy(s1, s2, n)' from type `void' to
type `char *'

However line 60 of strings.h is this:
extern void bcopy(const void *, void *, size_t);

Does anybody know what's wrong, or have an idea on how I can get around
this and get it to compile?
Why would bcopy override the declaration of memcpy?

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help compiling gnu commonc++2
  2004-03-04  0:33 Help compiling gnu commonc++2 Jason.Majors
@ 2004-03-04  1:44 ` Claudio Bley
  0 siblings, 0 replies; 2+ messages in thread
From: Claudio Bley @ 2004-03-04  1:44 UTC (permalink / raw)
  To: gcc-help

On Wed, Mar 03, 2004 at 05:36:45PM -0700, Jason.Majors@metriscompanies.com wrote:
> I'm trying to compile commonc++2-1.1.0 on AIX 4.3.2 using g++ 2.95.3 (the 
> latest we can get here unfortunately).
> 
> I get this error message:
> /usr/include/strings.h:60: declaration of C function `void memcpy(void *, 
> const void *, long unsigned int)' conflicts with
> /usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.2.0/2.95.3/include/string.h:92: 
> previous declaration `void * memcpy(void *, const void *, long unsigned 
> int)' here
> ...
> .../straits.h: In function `static char *
> string_char_traits<char>::copy(char *, const char *, long unsigned int)':
> .../straits.h:127: cannot convert `memcpy(s1, s2, n)' from type `void' to
> type `char *'
> 
> However line 60 of strings.h is this:
> extern void bcopy(const void *, void *, size_t);
> 
> Does anybody know what's wrong, or have an idea on how I can get around
> this and get it to compile?
> Why would bcopy override the declaration of memcpy?

I'd guess because bcopy is deprecated that someone wrote up a macro like

#define bcopy(x, y, z)  memcpy(y, x, z)

Use "gcc -E -dD <source-file>" and have a look at the output to find out if
that is the case and where it gets defined. Just remove it or make sure that
it gets #undef'd before including <strings.h>.

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux user                         - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-04  1:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-04  0:33 Help compiling gnu commonc++2 Jason.Majors
2004-03-04  1:44 ` Claudio Bley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).