From owner-freebsd-standards@FreeBSD.ORG Wed Apr 30 07:35:08 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A03D937B401 for ; Wed, 30 Apr 2003 07:35:08 -0700 (PDT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03F2543FBF for ; Wed, 30 Apr 2003 07:35:07 -0700 (PDT) (envelope-from schweikh@schweikhardt.net) Received: from bremen.shuttle.de (localhost [127.0.0.1]) by bremen.shuttle.de (Postfix) with ESMTP id 0460517D6D for ; Wed, 30 Apr 2003 16:35:05 +0200 (CEST) Received: (from uucp@localhost)h3UEZ4Pe017276 for freebsd-standards@freebsd.org; Wed, 30 Apr 2003 16:35:04 +0200 Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) h3UEYmts012256 for ; Wed, 30 Apr 2003 16:34:48 +0200 (CEST) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.12.9/8.12.6/Submit) id h3UEYmOO012255 for freebsd-standards@freebsd.org; Wed, 30 Apr 2003 16:34:48 +0200 (CEST) Date: Wed, 30 Apr 2003 16:34:48 +0200 From: Jens Schweikhardt To: freebsd-standards@freebsd.org Message-ID: <20030430143448.GB5142@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: bug or feature in m4? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2003 14:35:09 -0000 hello, world\n I'm not sure if this is a bug, feature or a misunderstanding of mine. I would expect the m4 syscmd macro to be replaced at the point where it appears in the input, but apparently its output appears at the very beginning. How to repeat: $ m4 > x hello world syscmd(date)dnl foo bar ^D $ cat x Wed Apr 30 16:21:07 CEST 2003 hello world foo bar My expectation is to see hello world Wed Apr 30 16:21:07 CEST 2003 foo bar POSIX 2001 (SUSv3) says syscmd The syscmd macro shall interpret its first argument as a shell command line. The defining text shall be the string result of that command. No output redirection shall be performed by the m4 utility. The exit status value from the command can be retrieved using the sysval macro. The esyscmd macro does what I expect, however it is not POSIX and I'd like to write portable m4 input files. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped) From owner-freebsd-standards@FreeBSD.ORG Wed Apr 30 17:45:02 2003 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7D9637B404 for ; Wed, 30 Apr 2003 17:45:00 -0700 (PDT) Received: from smtp01.syd.iprimus.net.au (smtp01.syd.iprimus.net.au [210.50.30.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4752343F93 for ; Wed, 30 Apr 2003 17:45:00 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au (203.134.131.24) by smtp01.syd.iprimus.net.au (7.0.012) id 3E96D1D2003105B3; Thu, 1 May 2003 10:44:58 +1000 Received: by dilbert.robbins.dropbear.id.au (Postfix, from userid 1000) id 63250C90D; Thu, 1 May 2003 10:44:52 +1000 (EST) Date: Thu, 1 May 2003 10:44:52 +1000 From: Tim Robbins To: Jens Schweikhardt Message-ID: <20030501104452.A24591@dilbert.robbins.dropbear.id.au> References: <20030430143448.GB5142@schweikhardt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030430143448.GB5142@schweikhardt.net>; from schweikh@schweikhardt.net on Wed, Apr 30, 2003 at 04:34:48PM +0200 cc: freebsd-standards@freebsd.org Subject: Re: bug or feature in m4? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2003 00:45:03 -0000 On Wed, Apr 30, 2003 at 04:34:48PM +0200, Jens Schweikhardt wrote: > hello, world\n > > I'm not sure if this is a bug, feature or a misunderstanding of mine. I > would expect the m4 syscmd macro to be replaced at the point where it > appears in the input, but apparently its output appears at the very > beginning. There's probably a missing call to fflush(). I'll check it out. Tim From owner-freebsd-standards@FreeBSD.ORG Fri May 2 13:56:51 2003 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF90237B401; Fri, 2 May 2003 13:56:51 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A8C343F75; Fri, 2 May 2003 13:56:51 -0700 (PDT) (envelope-from wollman@FreeBSD.org) Received: from freefall.freebsd.org (wollman@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h42KupUp076860; Fri, 2 May 2003 13:56:51 -0700 (PDT) (envelope-from wollman@freefall.freebsd.org) Received: (from wollman@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h42Kupxk076856; Fri, 2 May 2003 13:56:51 -0700 (PDT) Date: Fri, 2 May 2003 13:56:51 -0700 (PDT) From: Garrett Wollman Message-Id: <200305022056.h42Kupxk076856@freefall.freebsd.org> To: boris@cs.tu-berlin.de, wollman@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: standards/50257: _POSIX_C_SOURCE is undefined warnings in sys/cdefs.h when -Wundef enabled X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2003 20:56:52 -0000 Synopsis: _POSIX_C_SOURCE is undefined warnings in sys/cdefs.h when -Wundef enabled State-Changed-From-To: open->closed State-Changed-By: wollman State-Changed-When: Fri May 2 13:56:06 PDT 2003 State-Changed-Why: If there is a bug anywhere, it's in gcc. http://www.freebsd.org/cgi/query-pr.cgi?pr=50257