Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!mailrus!ukma!tut.cis.ohio-state.edu!rutgers!ucla-cs!casey From: casey@CS.UCLA.EDU Newsgroups: comp.sys.apollo Subject: SR10: /usr/include/apollo/{base,time}.h and cc -A nansi ... Keywords: SR10, Ansi C, non Ansi C, Apollo include files Message-ID: <17508@shemp.CS.UCLA.EDU> Date: 3 Nov 88 00:55:39 GMT Sender: news@CS.UCLA.EDU Reply-To: casey@CS.UCLA.EDU (Casey Leedom) Organization: UCLA Cognitive Science Program Lines: 49 The latest chapter in my endless quest to get X.V11R3 compiled on SR10. (Note that my partner in crime will be submitting a amusing little conversation he had with Apollo regarding the missing header files in /usr/include/netinet.) Several bugs really: 1. Apparently Ansi C defines the sequence "##" to be interpreted by the C Preprocessor (cpp) as a null string which can be used to separate macro references and allow their expansions to be concatenated properly. (Many older sources used the non-portable "/**/" equivalent.) Ex: #define foo(a, b) a##b The Apollo SR10 compiler totally barfs on this. Therefore I have to compile X.V11R3 with -A nansi. If the "##" construct is truly a part of Ansi C, can we get an update to Apollo's cpp that handles it properly? 2. I was finally able to find something I could ifdef on to decide whether to try to include /sys/ins/base.ins.c or /usr/include/apollo/base.h - I used _BFMT__COFF. I couldn't use __STDC__ for the above reason. So I have: #ifdef apollo #ifdef _BFMT__COFF #include #include #else #include "/sys/ins/base.ins.c" #include "/sys/ins/time.ins.c" #endif ... #endif In X.V11R3/lib/Xaw/Load.c. We really need something more along the lines of ``#ifdef SR10'' for this kind of thing however. 3. Continuing with Load.c, it turns out that base.h and time.h (and probably several other files in /usr/include/apollo) have Ansi C functional prototypes declared. They don't ifdef the external function declarations on __STDC__ even though it's available, properly implemented by the Apollo compiler, and specifically for this purpose. If people want, I will submit patches for these fixes. Can we get these installed in the standard Apollo release? Casey