www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/06/17/18:15:50

From: marcus AT bighorn DOT dr DOT lucent DOT com
Subject: Re: gcc does not handle macro properly
17 Jun 1998 18:15:50 -0700 :
Message-ID: <199806171825.MAA17963.cygnus.gnu-win32@chorus.dr.lucent.com>
To: gnu-win32 AT cygnus DOT com, papilla AT cs DOT tamu DOT edu

papilla AT cs DOT tamu DOT edu says:

>... gcc does not handle propertly the following macro:
> 
> #define	FD_CLR(fd,set) do { \
> 	u_int __i; \
> 	for (__i = 0; ...
> 
> The compiler says: parse error before for...
> 
> In fact, I edited the file with vi and remove all the ^M after the \ and
> it works. (Now I have different error messages) I am pretty sure that it
> comes from some silly TEXT and BINARY mode. And perhaps the solution would
> be to use the 'mount' programs....
> 
> Benoit Papillault

Absolutely correct.  If the file has <CR><LF> present for newlines and you
mount it as text, the \<CR><LF> is read as a backslash followed by a newline.
The compiler treats this as whitespace.  If, however, you mount its filesystem
as a binary only filesystem, the compiler reads backslash, carriage return,
newline.  It treats the backslash carriage return sequence as just a carriage
return (whitespace), then the newline is processed which terminates the
macro definition.

marcus hall
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019