From: drelson AT mail DOT ic DOT net (David Relson) Subject: Header File problem 21 Nov 1996 22:15:20 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <2.2.32.19961122045352.002e9e00.cygnus.gnu-win32@mail.ic.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Sender: drelson AT mail DOT ic DOT net X-Mailer: Windows Eudora Pro Version 2.2 (32) Original-To: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com 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 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) also includes #include "_ansi.h", which has the following as line 34: #define _EXFUN(name, proto) name proto then line 55 of 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".