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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!D74SUN.MITRE.ORG!emery From: emery@D74SUN.MITRE.ORG (David Emery) Newsgroups: comp.lang.ada Subject: conditional compilation and standardization Message-ID: <8912130238.AA05204@d74sun.mitre.org> Date: 13 Dec 89 02:38:53 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: Bill Wolfe sez: > [standardization of symbols like the enumerations in SYSTEM.NAME > should be ] > Appropriately handled in the package which provides the binding to > the operating system involved. OS bindings must also be standardized, > and this is taking place; e.g., the IEEE 1003.5 Ada binding to Posix. First, there are often options in a program which are not bound to the operating system. One example that I've seen used very effectively occurs in the C source for Nethack, where features may be included or excluded at compile time by defining or undefining certain symbols. These features include things like different types of monsters, as well as support for system things, such as compressing save files. Second, as Technical Editor for IEEE 1003.5 POSIX Ada Binding, I see several instances in our binding where conditional compilation would be very useful to an applications programmer, particularly one trying to write portable software. This is particularly true of the execution time symbolic constants, such as the C symbols _POSIX_NO_TRUNC and _POSIX_VDISABLE (defined in IEEE P1003.1-1988), and depending on the application, may also be true of the compile time symbolic constants, such as _POSIX_JOB_CONTROL. "Ultimate standardization", even of operating system names, is a long way away. I don't see anyone racing around trying to standardize such things, either. I don't believe that it's worth waiting for, particularly since it won't solve all the problems. One of the weaker points of Ada for portability is its lack of a general conditional compilation mechanism (based on some information obtained at compile time). I know of many examples of tricks and techniques used by people like compiler developers, to maintain different versions of the same code for different operating environments (including such things as Operating System and its variant features, presence or absence of windowing systems, availability of third-party software, etc.) Secondary standards (such as O.S. bindings) are not the solution to such configuration/adaption problems. They help, but are not complete. dave emery emery@aries.mitre.org