From owner-freebsd-questions Thu Nov 7 7:14:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B52837B401 for ; Thu, 7 Nov 2002 07:14:18 -0800 (PST) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C5A2243E4A for ; Thu, 7 Nov 2002 07:14:17 -0800 (PST) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id gA7FEFI07085; Thu, 7 Nov 2002 10:14:15 -0500 (EST) From: Jerry McAllister Message-Id: <200211071514.gA7FEFI07085@clunix.cl.msu.edu> Subject: Re: end of line ^M To: shubha_mr@yahoo.com (Shubha) Date: Thu, 7 Nov 2002 10:14:15 -0500 (EST) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <20021107133156.38987.qmail@web41106.mail.yahoo.com> from "=?iso-8859-1?q?shubha=20mr?=" at Nov 07, 2002 01:31:56 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > Hi, > I have developed a device driver for BSD and I mailed > it to a customer from a windows machine.But the driver > did not compile on the target BSD machine.we found > that because the src files got ^M's for every end -of > -line beacause of windows,and hence the compile did > not go through.Is there any flag that I can set in > the makefile for gcc so that the end of line charaters > are ignored during compilation? > > Please help urgently.I have the scripts to remmove > this ^M's but if I can modify the makefile to set some > flag then it will be a much better solution. Three ways to deal with this: 1. Do the editing in a UNIX environment. Guess you are sort of past this one already. 2. When you transfer the source from the Microsloth machine to the UNIX machine use FTP in ASCII mode. eg. after you have made the FTP connection, type 'ascii' (minus the quotes). FTP will automatically strip the ^M from the lines. By the way, going the other direction, - UNIX to MS, it will add them for you. 3. Already on the UNIX system? use tr(1). It will make such changes. type rtr -d "\r" < MESSYFILE > UNIFILE where: MESSYFILE is the file from MS with the extra ^M UNIFILE is the resulting cleaned up file ////jerry > > Thankyou > shubha > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message