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,38159b1b5557a2e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-27 07:40:02 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.stueberl.de!newsr1.ipcore.viaginterkom.de!btnet-peer1!btnet-feed3!btnet!carbon.eu.sun.com!new-usenet.uk.sun.com!not-for-mail From: Ole-Hjalmar Kristensen Newsgroups: comp.lang.ada Subject: Re: Standard Ada Preprocessor Date: 27 Jan 2004 16:22:19 +0100 Organization: Sun Microsystems Message-ID: References: <100upo7ln5e3k59@corp.supernews.com> <400FC8E8.2040100@noplace.com> <_JSdna166JuxFo3dRVn-hg@comcast.com> <401115B7.5020205@noplace.com> NNTP-Posting-Host: europa1.norway.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: new-usenet.uk.sun.com 1075216940 26551 129.159.113.161 (27 Jan 2004 15:22:20 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 27 Jan 2004 15:22:20 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:4906 Date: 2004-01-27T15:22:20+00:00 List-Id: Georg Bauhaus writes: > Ole-Hjalmar Kristensen wrote: > : One way to combat the combinatorial explosion of platforms * compiler > : * library is to explicitly test for the features of the environment > : you really need to know, not assume something because of a particular > : platform/compiler. This is the approach typically used by projects > : using the 'configure' tool. > > Only to some extent is this test possible with this approach. > Some GNU software authors must frankly tell you that unless > you use a know combination of compiler (i.e. gcc ;-) and OS (i.e., > Unix or Wunix), > "... non-default environments can expose bugs in the system header > files, crippling compilation in _very_ non-obvious ways. Because > of that, we define them only on well-tested architectures where we > know they will work." > (from wget config-post.h "1.9+cvs-dev") Yes, you depend very much on how intelligent the configure scripts are, and you cannot count on it being automatically portable to another platform, but in my experience it is more portable and more readable then trying to cover all platform/compiler/os versions explicitly. This is from experience of developing/maintaining a > 1000 KLOC project on diverse platforms, like FreeBSD, Linux, AIX, HP-UX, Solaris, and Windows for several years. > > And promtly como --c --strict lets me translate the source, > but without --remarks, it does not tell me that usleep is not > defined. So for a double argument to usleep which has been > manually range checked, the conversion to long is not done... > > The configure approach has always been a nightmare for me the moment > I had to deviate from the assumptions that the configure script > is known to verify. > Yes, of course. As soon as you introduce new kinds of system dependencies, you have to revice the configure script. The hard part is figuring out which part of your code is really system dependent. You usually find it out by trying to port your system. Remember the saying about there is no such thing about portable software, only software which has been ported :-) > : I would really like to have some standard configuration tool which > : could take such parameters as input and produce a version of the > : system tailored to the environment in which it is to be compiled and > : run. > > Yes. But do you think it will ever be produced by programmers (who > like to creatively write programs)? > Collegues tell me that CM is tedious, always the same, automatic, > boring, wast of time, etc. etc., they want a DWIM procedure. > And when I answer that configuration > management, installation procedures, installation testing routines > and so one are 50% of software development, I'm on my own. > > So the trick will be to turn CM into a programming problem, so > programmers and mathematicians will be instrested in solving it. > > > -- Georg In addition, you need it to be available without too much effort. Isn't turning CM into a programming problem exactly what you do by using a preprocessor? -- C++: The power, elegance and simplicity of a hand grenade.