From: Ullrich von Bassewitz; on Date: January 21, 2005, at 08:22 AM -0500 > > On Fri, Jan 21, 2005 at 01:49:28PM +0100, Spiro Trikaliotis wrote: > > BTW: To compile the cc65 package on my Cygwin box, I had to make > > sure that src/common/inttypes.h includes stdint.h instead of defining > > it's own types, or I get an error. > > > > Trying to check for __STDC_VERSION__ with a simple test source, I > > get "No __STDC_VERSION__", so I do not know how this can be > > distinguished. > > That means that the compiler is not conforming to the ISO C99 standard, > which states that __STDC_VERSION__ must be a predefined macro. The problem > why the code doesn't work is probably that the compiler doesn't define > __STDC_VERSION__, but seems to include stdint.h (which is a header file > new in C99) somewhere, so there are name collisions. Unfortunately, there's > not much I can do about it. I would say it's a Cygwin problem. The compiler > should either say that it's C99 conformant, or not use any identifiers new in > C99. Yes, it's a Cygwin bug. This command: (cc65/src/common/)$ gcc -H -fsyntax-only xsprintf.c generates this console output: . /usr/include/stdio.h .. /usr/include/sys/types.h ... /usr/include/cygwin/types.h .... /usr/include/stdint.h . inttypes.h In file included from xsprintf.c:44: inttypes.h:51: error: conflicting types for `intmax_t' /usr/include/stdint.h:66: error: previous declaration of `intmax_t' inttypes.h:52: error: conflicting types for `uintmax_t' /usr/include/stdint.h:67: error: previous declaration of `uintmax_t' (Cygwin's "stdint.h" defines the maximum integer type as "long long".) gcc defaults to c89 with extensions. You must tell gcc version 3 to be (almost) c99, with extensions, by adding the option "-std=gnu99" to it's command-line. Then, it will define __STDC_VERSION__. ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Wed Feb 2 09:10:18 2005
This archive was generated by hypermail 2.1.8 : 2005-02-02 09:10:28 CET