Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!elsie!ado From: ado@elsie.UUCP Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: need cpp macros to concatenate names Message-ID: <7414@elsie.UUCP> Date: Wed, 6-May-87 05:35:21 EDT Article-I.D.: elsie.7414 Posted: Wed May 6 05:35:21 1987 Date-Received: Fri, 8-May-87 01:15:37 EDT References: <634@calma.UUCP> <18010@sun.uucp> Organization: NIH-LEC, Bethesda, MD Lines: 27 Xref: utgpu comp.unix.wizards:2013 comp.unix.questions:1934 Summary: With an eye to the future > > Our intent is to be portable to any System V machine with a minimum of > > changes. > > > > Anybody have a suggestion? (We know about m4 and sed, but we can't afford to > > add another step to the compilation of many thousands of lines of code. . .) > > . . .I suggest you use "m4" and/or "sed", since there's no > *documented* way of gluing tokens together in pre-ANSI C. > > The following trick works on the versions of the "Reiser" preprocessor > that are distributed with AT&T UNIX releases. . . > > #define concat(x,y) x/**/y And if you think the code will have a good long lifetime, think about using #ifdef __STDC__ #define concat(x,y) x ## y #else #define concat(x,y) x/**/y #endif -- UNIX is a registered trademark of AT&T. -- UUCP: ..seismo!elsie!ado ARPA: elsie!ado@seismo.CSS.GOV Elsie and Ado are trademarks of Borden, Inc. and Ampex.