comp.lang.ada #10239 (0 + 48 more) [1] From: Philippe.Kipfer@di.epfl.ch (Philippe Kipfer) [1] Summary of port of DEC Ada Motif binding on Sun with SunAda Date: Tue Mar 22 04:23:04 EST 1994 Organization: Ecole Polytechnique Federale de Lausanne Lines: 60 Distribution: world Summary of port of DEC Ada Motif binding on Sun ----------------------------------------------- Ph. Kipfer and Robb Nebbe Swiss Federal Institute of Technology Software Engineering Laboratory CH-1015 Lausanne (Switzerland) Host : Sun4c Sun4m (Sparc Station 2 and server 670 MP) OS : Sun OS 4.1.3 (Solaris 1.1.1) Compiler: SunAda 1.1(f) (Verdix) Server : X11R5 Motif : Motif 1.2 We were able to port the DEC Ada Motif binding and examples in about a total of 20 hours most of which was spent resolving UN*X related problems. The following difficulties were encountered: - The installation of the binding requires an ANSI C compiler and all we had installed was Sun 'cc'. In particular we needed the macro "offsetof" so we wound up using gcc. - The pragma Interface_Name specified the external name and SunAda needed the link name (which is the external name preceded by an '_' on our system) for example: pragma INTERFACE_NAME(DEFAULT_COLORMAP, "_XDefaultColormap"); -- Sun pragma INTERFACE_NAME(DEFAULT_COLORMAP, "XDefaultColormap"); -- Dec - Preprocessor directives were added in some files so that support for DEC specific features such as are only included when compiled on DEC platforms. - The scripts have been generalized to make porting them easier. The compilation order was added for compilation environments that aren't as "full featured" as DEC's. - We added the pragma Link_With to X_FOREIGN_BODIES so that the interface behaves exactly as if it was written completely in Ada (which means that programs that use the interface don't require the programmer to know what files need to be linked in to the executable because of some indirect dependency; this is taken care of in the interface where the dependency actually occurs). Apparently this was already the case on DEC platforms (?) No problems were encountered when compiling the Ada code. Compilation of examples were possible after few corrections (XT.NULL_ADDRESS instead of SYSTEM.NULL_ADDRESS): examples/others/* examples/xm_burger/* The examples worked but a couple seem to have a few errors and some depend on DEC libraries (Math_Lib, RTL, ...). Ph. Kipfer & Robb Nebbe -- Swiss Federal Institute of Technology| Kipfer Philippe Software Engineering Laboratory | EPFL-DI-LGL Philippe Kipfer (PKR) | CH-1015 Lausanne (Suisse) E-Mail: philippe.kipfer@di.epfl.ch | (++41 21)693.42.37 FAX:693.50.79