From owner-freebsd-hackers Wed May 3 06:46:23 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id GAA02638 for hackers-outgoing; Wed, 3 May 1995 06:46:23 -0700 Received: from sci.brooklyn.cuny.edu (eastham.sci.brooklyn.cuny.edu [146.245.1.21]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id GAA02632 for ; Wed, 3 May 1995 06:46:20 -0700 Received: from robeson.brooklyn.cuny.edu (robeson.sci.brooklyn.cuny.edu) by sci.brooklyn.cuny.edu (4.1/SMI-4.1a) id AA10044; Wed, 3 May 95 09:44:21 EDT Date: Wed, 3 May 95 09:44:21 EDT From: dayton@sci.brooklyn.cuny.edu (Dayton Clark) Message-Id: <9505031344.AA10044@sci.brooklyn.cuny.edu> Received: by robeson.brooklyn.cuny.edu (4.1/SMI-4.1) id AA10209; Wed, 3 May 95 09:44:04 EDT To: joerg_wunsch@uriah.heep.sax.de Cc: rpt@miles.sso.loral.com, hackers@FreeBSD.org In-Reply-To: <199505030617.IAA18293@uriah.heep.sax.de> (message from J Wunsch on Wed, 3 May 1995 08:17:40 +0200 (MET DST)) Subject: Re: GNU cpp bug with pthreads Sender: hackers-owner@FreeBSD.org Precedence: bulk <.> From: J Wunsch <.> Date: Wed, 3 May 1995 08:17:40 +0200 (MET DST) <.> Cc: hackers@FreeBSD.org <.> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) <.> X-Phone: +49-351-2012 669 <.> Mime-Version: 1.0 <.> Content-Type: text/plain; charset=ISO-8859-1 <.> Content-Transfer-Encoding: 8bit <.> Content-Length: 1182 <.> Precedence: bulk <.> <.> As Richard Toren wrote: <.> > <.> > cpp, when expanding the concatenate operator '##' seems to append a <.> > couple (3) blanks after the substitution. Here is a piece of pthreads and <.> > an abbreviated command line to test. Line 8 is the one munged up. <.> <.> I'm not sure if it's a bug or a feature, nor does reading the `bible' <.> enlighten me more. <.> <.> > #ifdef __STDC__ <.> <.> Note: this should be ``#if __STDC__'' anyway. Some preprocessors do <.> define this macro to 0 when running in `traditional' mode. ANSI says <.> it is ``the constant 1'' in a standard-conforming environment. <.> <.> > #define SYSCALL(x) \ <.> > .globl _machdep_sys_##x; \ <.> > \ <.> > _machdep_sys_##x:; \ <.> > \ <.> > movl $(SYS_##x), %eax; \ <.> <.> This works: <.> <.> #define SYSCALL(x) \ <.> .globl _machdep_sys_##x##; \ <.> \ <.> _machdep_sys_##x##:; \ <.> \ <.> movl $(SYS_##x##), %eax; \ <.> <.> -- <.> cheers, J"org <.> <.> joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ <.> Never trust an operating system you don't have sources for. ;-) <.> I have a set of patches to pthreads 1.60beta that get it to work on Freebsd2.0. I can make it available if someone will tell me where to place them. They fix this problem and a couple of others. dayton _________ _____/ D \_____________ | | | Dayton Clark | | CIS Department | | Brooklyn College/CUNY | | Brooklyn, New York 11210 | | | | 718/951-4811 | | dayton@brooklyn.cuny.edu | |___________________________|