Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mimsy!eneevax!umd5!brl-adm!adm!Rminnich@UDEL.EDU From: Rminnich@UDEL.EDU Newsgroups: comp.unix.wizards Subject: Concatenation with cpp. Message-ID: <7257@brl-adm.ARPA> Date: Wed, 6-May-87 09:57:03 EDT Article-I.D.: brl-adm.7257 Posted: Wed May 6 09:57:03 1987 Date-Received: Fri, 8-May-87 04:09:55 EDT Sender: news@brl-adm.ARPA Lines: 20 If you want to concatenate and you do not want to be portable, then #define cat(x,y) x/* */y works on many BSD systems. It will not work on SCO Xenix at all and it sounds like it fails on SYS V too. It fails on SCO Xenix because they defined their own, improved cpp (called p0) which of course does things differently. I just got bit by this in a big way on a piece of imported software. Our solution was adding the extra process. It does not seem a good idea to use comments as an infix concatenate operator, which is really what the above is. If you really need the concatenate, and you do not want an extra process, then get GNU cpp. It supports concatenate pretty nicely. It also uses alloca, which i understand is a very portable function :-) (which is why we do not use it on Xenix). If you want a copy please let me know. ron (rminnich@udel.edu)