Mail Archives: cygwin/1996/11/21/22:15:20
To whom it may concern:
I have encountered a problem building the Objective-C runtime, with my
system configured as --host=i386-unknown-winnt351.
From directory /H-i386-cygwin32/src/gcc, I execute 'make objc-runtime'.
After a while 'byacc cexp.y' generates file cexp.c which is then compiled
via GCC and results in the following error messages:
/usr/local/include/string.h:53: warning: conflicting types for built-in
function `memcmp'
/usr/local/include/string.h:54: warning: conflicting types for built-in
function `memcpy'
/usr/local/include/string.h:55: syntax error before `0'
/usr/local/include/string.h:55: warning: conflicting types for built-in
function `memset'
The problem is due to compounded definitions, and can be demonstrated by
compiling a two line file, i.e.
#include "config.h"
#include <string.h>
What is happening is that "config.h" includes "i386/xm-winnt.h", which is in
/H-i386-cygwin32/SRC/GCC/CONFIG. "i386/xm-winnt.h" then includes
"winnt/xm-winnt.h", also in /H-i386-cygwin32/SRC/GCC/CONFIG, and which has
the following as line 47:
#define bzero(a,b) memset (a,0,b)
<string.h> also includes #include "_ansi.h", which has the following as line 34:
#define _EXFUN(name, proto) name proto
then line 55 of <string.h> which is:
void _EXFUN(bzero,(char *, size_t));
first expands to:
void bzero(char *, size_t);
and then expands to:
void memset(char *, 0, size_t)
Viola ! we have a compilation error.
I'm not sure of the proper fix, but I do know that there is no need to have
both a macro definition and a prototype of the same function.
David
David Relson internet: drelson AT ic DOT net
Ann Arbor, MI compuserve: 71441,1160
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -