From owner-freebsd-hackers Tue May 2 23:33:34 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA02592 for hackers-outgoing; Tue, 2 May 1995 23:33:34 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id XAA02582 for ; Tue, 2 May 1995 23:33:24 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA05007; Wed, 3 May 1995 08:33:10 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id IAA28636; Wed, 3 May 1995 08:33:08 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.6.11/8.6.9) id IAA18293; Wed, 3 May 1995 08:17:41 +0200 From: J Wunsch Message-Id: <199505030617.IAA18293@uriah.heep.sax.de> Subject: Re: GNU cpp bug with pthreads To: rpt@miles.sso.loral.com (Richard Toren) Date: Wed, 3 May 1995 08:17:40 +0200 (MET DST) Cc: hackers@FreeBSD.org In-Reply-To: from "Richard Toren" at May 2, 95 09:35:49 pm Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1182 Sender: hackers-owner@FreeBSD.org 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. ;-)