Article View: news.software.nntp
Article #73296Re: INN 2.4.2 fails to compile with gcc 3.4.2 on Solaris 10
From: Bill Davidsen
Date: Tue, 21 Feb 2006 15:53
Date: Tue, 21 Feb 2006 15:53
86 lines
5579 bytes
5579 bytes
John Hyatt - Perfectly Good GuitarRuss Allbery wrote: > In news.software.nntp, Bill Davidsen <davidsen@deathstar.prodigy.com> writes: >> Russ Allbery wrote: >>> In news.software.nntp, Ian Collins <ian-news@hotmail.com> writes: > >>>> The comment in the file says: > >>>> * Included for alignment with the ISO/IEC 9899:1999 standard. The >>>> * contents of this header are only visible when using a c99 >>>> * compiler, otherwise inclusion of this header will result in a >>>> * forced compilation failure. > >>>> gcc isn't a C99 compiler. > >>> What the heck was the point of that? > >> I thought the comment was pretty clear, the point is to keep you from >> building a non-portable software package. The real question is why that >> header is being included... > > For the same reason why I include any other header file: I want to use > the C language feature defined in that header file. But it isn't a C language feature, it's a C99 feature, and unless you persuade gcc to run as a C99 compiler those features are not a proper feature of the language of the compiler any more than features of Ada or COBOL :-( > > My guess is that Solaris is trying to protect the user against trying to > use bool with a compiler that doesn't support _Bool, but that's an odd way > of doing it. Why not just let the compilation fail later? In this > attempt to protect against an entirely theoretical problem, they've > introduced problems with an actual usage. I don't think that using features not in the language is a theoretical problem, but I've tried to write portable code for some decades and accept using a common subset of the language as the method to do that. C99 is not widely supported, particularly for gcc; the slowness of the recent versions encourage use of old versions, 2.95 particularly, to complete compilation before the next version comes out. > > I'm sure that the Autoconf 2.59 AC_HEADER_BOOL macro probably handles all > of this, so the real solution would be to just switch Autoconfs. I'm not > sure I really want to do that for the STABLE branch, though. (The best > solution would be for me to find the time to get 2.5.0 released.) Sounds fine to me, don't use features you don't have, or fake them with macros and typedefs. > >> If gcc lacks a c99 environment switch (haven't looked at the new >> features) > > It has one, but setting standards environments in gcc is always > problematic since it usually enables standards namespaces and other > undesirable features. Then you get lost in a twisty little maze of > feature test macros, none of which work quite right. > >> then the best thing is to not try to use the feature, > > No, INN uses bool extensively and I'm not going to stop. The general > development philosophy of INN is to use the latest standard and then patch > things up for older standards via Autoconf, and that generally works quite > well. But it used bool long before C99, when the feature was done internally. > >> and the easy thing is to get a copy of the header and add a -I to >> include that instead of the system header. > > Um, no. That's a really bad idea. Using the headers which came with the compiler is a bad idea? Worse than using the Sun headers which probably match some non-gcc compiler? > > I suppose I need to write an Autoconf probe that does more than just test > for the existence of the header file. Or switch Autoconf implementations. > Bleh. I suppose I could just copy the AC_HEADER_BOOL macro from a later > Autoconf. > That sounds like a better solution which won't bite you in the future. -- bill davidsen SBC/Prodigy Yorktown Heights NY data center http://newsgroups.news.prodigy.com
Technical Details
Message-ID:
<EHGKf.1799$%m4.1244@newssvr33.news.prodigy.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.solaris.mbox.zip!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsmst01b.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr33.news.prodigy.com.POSTED!1055e9ad!not-for-mailReferences:
<slrndvdg03.44o.ese002@spica.exile.org> <87y809qiht.fsf@windlord.stanford.edu> <1140250253.11999@drone2-svc-skyt.qsi.net.nz> <87mzgpqdad.fsf@windlord.stanford.edu> <jTqKf.1717$%m4.316@newssvr33.news.prodigy.com> <871wxxbs29.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <EHGKf.1799$%m4.1244@newssvr33.news.prodigy.com> Subject: Re: INN 2.4.2 fails to compile with gcc 3.4.2 on Solaris 10 Date: Tue, 21 Feb 2006 15:53:08 GMT From: Bill Davidsen <davidsen@deathstar.prodigy.com> References: <slrndvdg03.44o.ese002@spica.exile.org> <87y809qiht.fsf@windlord.stanford.edu> <1140250253.11999@drone2-svc-skyt.qsi.net.nz> <87mzgpqdad.fsf@windlord.stanford.edu> <jTqKf.1717$%m4.316@newssvr33.news.prodigy.com> <871wxxbs29.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.unix.solaris.mbox.zip!g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsmst01b.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr33.news.prodigy.com.POSTED!1055e9ad!not-for-mail User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0 MIME-Version: 1.0 Newsgroups: news.software.nntp,comp.unix.solaris In-Reply-To: <871wxxbs29.fsf@windlord.stanford.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 85 NNTP-Posting-Host: 207.115.54.38 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr33.news.prodigy.com 1140537188 ST000 207.115.54.38 (Tue, 21 Feb 2006 10:53:08 EST) NNTP-Posting-Date: Tue, 21 Feb 2006 10:53:08 EST Organization: SBC http://yahoo.sbc.com X-UserInfo1: [[PAPDCA[S@US\TYARKXK_@@FBYFRM@OMPUT_FMNJZ]BGIELNVUEAE[YETZPIWWI[FCIZA^NBFXZ_D[BFNTCNVPDTNTKHWXKB@X^B_OCJLPZ@ET_O[G\XSG@E\G[ZKVLBL^CJINM@I_KVIOR\T_M_AW_M[_BWU_HFA_]@A_A^SGFAUDE_DFTMQPFWVW[QPJN