Date: Fri, 17 Apr 1998 11:20:13 -0700 (PDT) From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs Subject: Re: bin/6332: time.h doesn't compile with -traditional Message-ID: <199804171820.LAA19494@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6332; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: FreeBSD-gnats-submit@FreeBSD.ORG, sastdr@unx.sas.com Cc: Subject: Re: bin/6332: time.h doesn't compile with -traditional Date: Sat, 18 Apr 1998 04:05:28 +1000 >>Description: > > I continue to compile some software with -traditional; because > it may not compile on other hosts and I'd like to "catch" this on > FreeBSD before it gets there. >... >>Fix: > > Replace uses of 'const' with the __const keyword defined in cdefs.h. `const' is used on about 561 lines in /usr/include/*.h, 244 lines in /usr/include/sys/*.h, ... It is too late to uglify them all. <sys/cdefs.h> defines away `const' (and other ANSI-only keywords) unless NO_ANSI_KEYWORDS or __GNUC__ is defined. It is assumed that `gcc -traditional' is only used to compile dusty code that uses these keywords as normal identifiers. If your code doesn't have such identifiers then you can easily define away the identifiers directly by compiling with `gcc -traditional -Dconst='. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804171820.LAA19494>
