Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2002 10:14:15 -0500 (EST)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        shubha_mr@yahoo.com (Shubha)
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: end of line ^M
Message-ID:  <200211071514.gA7FEFI07085@clunix.cl.msu.edu>
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

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211071514.gA7FEFI07085>