From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-26 14:24:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!freenix!fr.usenet-edu.net!usenet-edu.net!fu-berlin.de!news.cid.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Implementing C/C++ style #include... Date: 27 Mar 2001 00:34:07 +0200 Organization: Enyo's not your organization Message-ID: <87puf4ma74.fsf@deneb.enyo.de> References: <98m938$2iod0$1@ID-25716.news.dfncis.de> <99alrr$itf$1@nh.pace.co.uk> <99d5dj$fi4$1@nh.pace.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Xref: supernews.google.com comp.lang.ada:6084 Date: 2001-03-27T00:34:07+02:00 List-Id: Stephen Leake writes: > And anyway, what is the alternative for Linux? I guess structuring it > so the number of configurations is actually linear with the number of > targets, but is that really possible? They try to isolate the configuration-specific code. Once there was a rule, 'no #ifdefs in actual code', but I don't know if it still followed. OTOH, it doesn't matter much if some configurations do not compile. The fix is pretty straightforward most of the time (even if it breaks other configurations), and the usual configurations are tested most, of course, so the probability they work is quite high. Well, my experiences with the C preprocessor in much smaller projects are quite bad as well. I'm maintaining a fork of OpenSSH which adds additional control over port forwarding (we use OpenSSH to implement a poor man's VPN at the university because no other protocol/vendor supports all the platforms we need), and the upstream authors use #ifdefs in actual code. Adding a few extra parameters to some routines is quite annoying because of procedure calls hidden behind an #ifdef. For the next patching frenzy, I'm warned, but I'm convinced as well that the C preprocessor is the source of major maintenance headaches.