public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Compilling squid
@ 1998-08-03 17:22 Andrew Thompson
  1998-08-03 17:30 ` ftp client corrupts binary files with ^m ?? Andrew Thompson
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Thompson @ 1998-08-03 17:22 UTC (permalink / raw)
  To: gnu-win32

Some people have sucessfull compiled squid on the latest gnu-win32. I have
the EGCs compillers and lots of librarys but I still need a number or
things like regex_t, timegm, tm.tm_gmtoff ,timezone or time_t.

Am I wasting my time if I try to go to one of the GNU ftp servers and take
the source for these librarys and compile them ??? I am new to unix
programming.

Andrew Thompson

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* ftp client corrupts binary files with ^m ??
  1998-08-03 17:22 Compilling squid Andrew Thompson
@ 1998-08-03 17:30 ` Andrew Thompson
  1998-08-05  3:36   ` Guido Roeskens
  1998-08-05  4:28   ` Marius van Wyk
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Thompson @ 1998-08-03 17:30 UTC (permalink / raw)
  To: gnu-win32

I have ftp.exe installed on my system. When I get text files from other
servers ftp works OK but when I set ftp to 'bin' and get a binary file the
file comes out a little larger and (I Think) it has ^m's inserted into the
binary code, hence it does not run.

Do I need to mount everyting as "text=bin" on my system currently
everyting is text=!bin??

I do not understand how this system translates text files from unix type
to dos type.

Andrew Thompson

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ftp client corrupts binary files with ^m ??
  1998-08-03 17:30 ` ftp client corrupts binary files with ^m ?? Andrew Thompson
@ 1998-08-05  3:36   ` Guido Roeskens
  1998-08-05  4:28   ` Marius van Wyk
  1 sibling, 0 replies; 7+ messages in thread
From: Guido Roeskens @ 1998-08-05  3:36 UTC (permalink / raw)
  To: Andrew Thompson; +Cc: gnu-win32

Andrew Thompson wrote:

> I have ftp.exe installed on my system. When I get text files from other
> servers ftp works OK but when I set ftp to 'bin' and get a binary file the
> file comes out a little larger and (I Think) it has ^m's inserted into the
> binary code, hence it does not run.
>
> Do I need to mount everyting as "text=bin" on my system currently
> everyting is text=!bin??
>
> I do not understand how this system translates text files from unix type
> to dos type.
>
> Andrew Thompson

When ftp starts up it is in text (ascii) mode which does EOL
conversion("End-of Line" gets converted from 'LF' on Unix to 'CRLF' on DOS)

You have to change the transfer type to binary mode: Simply type "bin" as an
abbreviation for "binary". You can check the transfer type set with "type" or
with "status".

BTW: For help with ftp type "help" or "help <command>"Guido


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ftp client corrupts binary files with ^m ??
  1998-08-03 17:30 ` ftp client corrupts binary files with ^m ?? Andrew Thompson
  1998-08-05  3:36   ` Guido Roeskens
@ 1998-08-05  4:28   ` Marius van Wyk
  1 sibling, 0 replies; 7+ messages in thread
From: Marius van Wyk @ 1998-08-05  4:28 UTC (permalink / raw)
  To: gnu-win32

On Wed, 5 Aug 1998 01:40:57 +1200 (NZST), Andrew Thompson
<andrew@waitaki.otago.ac.nz> wrote:

> I have ftp.exe installed on my system. When I get text files from other
> servers ftp works OK but when I set ftp to 'bin' and get a binary file the
> file comes out a little larger and (I Think) it has ^m's inserted into the
> binary code, hence it does not run.
> 
> Do I need to mount everyting as "text=bin" on my system currently
> everyting is text=!bin??

Assume that the ftp was written for a unix machine, and that the
author did not bother opening files as binary instead of text, so use
bin at all times anyway.

DOS's crlf configuration sucks - period

> I do not understand how this system translates text files from unix type
> to dos type.

> Andrew Thompson
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".

--
> finger marius@e.co.za for PGP and other info.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ftp client corrupts binary files with ^m ??
  1998-08-06 14:36 ` Larry Hall
@ 1998-08-07 17:07   ` Peter Dalgaard BSA
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Dalgaard BSA @ 1998-08-07 17:07 UTC (permalink / raw)
  To: Larry Hall; +Cc: Kevin F. Quinn, gnu-win32, Guido Roeskens

Larry Hall <lhall@rfk.com> writes:

> 
> At 09:00 AM 8/6/98 +0100, Kevin F. Quinn wrote:
> >Guido Roeskens [groeskens@bluewin.ch] wrote:
> >
> >> You have to change the transfer type to binary mode: Simply type
> >> "bin" as an abbreviation for "binary". You can check the transfer
> >> type set with "type" or with "status".
> >
> >The ftp.exe I have (from Sergey's "remote" package, I think) assumes
> >binary mounts, and fails on transfer of binary files to text!=binary
> >mounts in this way, even if type "binary" has been specified.
> >
> 
> I'm missing the logic of doing this.  If someone has already taken the
> time to modify the code to check that the file system is mounted binary
> and fail if it is not for binary transfers, why wouldn't one have just 
> made the changes that make sure the file is created locally as binary
> when the mode is specified as binary?  The problem should be simple to solve 
> if you're willing to edit and rebuild so I'm not sure I see the benefit of 
> not solving it if one was going to go through the edit/rebuild process 
> anyway (although anyone is free to do whatever they want with this code!)  
> Can anyone explain to me why it would be better to alter the ftp client to 
> do as Kevin describes above rather than just fix the problem?

As I understand it, it happens all by itself. The program opens the
file and writes bytes from the connection into it without touching
them. Then *cygwin* takes the written bytes and converts LF to CR-LF.
This happens every time you convert a Unix program that writes binary
data. You can fix it by opening the output file in binary mode
explicitly, whereever necessary (finding out where and when that is,
is the difficult part). 

The 'bin' mode of FTP has less to do with file modes than with the way
data passes across the wires: The opposite (ascii mode) means that
either end of the connection should convert to/from their native text
format to "net ascii" - lines of bytes separated by CR-LF as far as I
remember. 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ftp client corrupts binary files with ^m ??
  1998-08-06  0:57 Kevin F. Quinn
@ 1998-08-06 14:36 ` Larry Hall
  1998-08-07 17:07   ` Peter Dalgaard BSA
  0 siblings, 1 reply; 7+ messages in thread
From: Larry Hall @ 1998-08-06 14:36 UTC (permalink / raw)
  To: Kevin F. Quinn, gnu-win32; +Cc: Guido Roeskens

At 09:00 AM 8/6/98 +0100, Kevin F. Quinn wrote:
>Guido Roeskens [groeskens@bluewin.ch] wrote:
>
>> You have to change the transfer type to binary mode: Simply type
>> "bin" as an abbreviation for "binary". You can check the transfer
>> type set with "type" or with "status".
>
>The ftp.exe I have (from Sergey's "remote" package, I think) assumes
>binary mounts, and fails on transfer of binary files to text!=binary
>mounts in this way, even if type "binary" has been specified.
>

I'm missing the logic of doing this.  If someone has already taken the
time to modify the code to check that the file system is mounted binary
and fail if it is not for binary transfers, why wouldn't one have just 
made the changes that make sure the file is created locally as binary
when the mode is specified as binary?  The problem should be simple to solve 
if you're willing to edit and rebuild so I'm not sure I see the benefit of 
not solving it if one was going to go through the edit/rebuild process 
anyway (although anyone is free to do whatever they want with this code!)  
Can anyone explain to me why it would be better to alter the ftp client to 
do as Kevin describes above rather than just fix the problem?


Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      (781) 239-1053
8 Grove Street                          (781) 239-1655 - FAX
Wellesley, MA  02181                    http://www.rfk.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ftp client corrupts binary files with ^m ??
@ 1998-08-06  0:57 Kevin F. Quinn
  1998-08-06 14:36 ` Larry Hall
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin F. Quinn @ 1998-08-06  0:57 UTC (permalink / raw)
  To: gnu-win32; +Cc: Guido Roeskens

Guido Roeskens [groeskens@bluewin.ch] wrote:

> You have to change the transfer type to binary mode: Simply type
> "bin" as an abbreviation for "binary". You can check the transfer
> type set with "type" or with "status".

The ftp.exe I have (from Sergey's "remote" package, I think) assumes
binary mounts, and fails on transfer of binary files to text!=binary
mounts in this way, even if type "binary" has been specified.

-- 
Kevin F. Quinn
Web: http://www.banana.demon.co.uk/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1998-08-07 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-03 17:22 Compilling squid Andrew Thompson
1998-08-03 17:30 ` ftp client corrupts binary files with ^m ?? Andrew Thompson
1998-08-05  3:36   ` Guido Roeskens
1998-08-05  4:28   ` Marius van Wyk
1998-08-06  0:57 Kevin F. Quinn
1998-08-06 14:36 ` Larry Hall
1998-08-07 17:07   ` Peter Dalgaard BSA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).