Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!acorn!john From: john@acorn.co.uk (John Bowler) Newsgroups: comp.windows.x Subject: Re: Does cc -E read from stdin? Summary: Need cc -E - Keywords: Imake Message-ID: <2625@acorn.co.uk> Date: 2 Aug 90 13:43:04 GMT References: <1990Jul31.225117.4362@smsc.sony.com> Reply-To: john@acorn.UUCP (John Bowler) Organization: Acorn Computers Ltd, Cambridge, UK Lines: 15 In article <1990Jul31.225117.4362@smsc.sony.com> dce@smsc.sony.com (David Elliott) writes: >In X11R4, the util/scripts stuff uses "$(PREPROCESSCMD) < filename" to >generate scripts. PREPROCESSCMD defaults to the C compiler (e.g., cc) >with the -E option. > >... >Is it common for cc to read from stdin, or is this a more general >flaw in X11R4? No - the ``standard'', the pcc front end (BSD 4.3), expects ``cc -E -''; ie it interprets the filename ``-'' as meaning ``read from stdin''. On the other hand cpp (ie the preprocessor bit of pcc) acts as a filter and reads from stdin (but it will also take a file name, including ``-''. John Bowler (jbowler@acorn.co.uk)