public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: tar, zip, gzip troubles
@ 1998-10-12  1:26 Dr. Markus Hönicka
  0 siblings, 0 replies; 14+ messages in thread
From: Dr. Markus Hönicka @ 1998-10-12  1:26 UTC (permalink / raw)
  To: 'mh@mike.franken.de'; +Cc: gnu-win32

>>Seems to be the "non binary mounts problem".
Do you have binary mounts ?<<

Please excuse my ignorance. If binary mounts are not there by default, I
don't use them. I've seen in the FAQ that it is necessary to explicitely
mount directories if they are not on drive C: . However, I assume this
means if the dir is not on the drive where the Cygnus tools are
installed, in my case it's D:, and I've put the zip/unzip binaries in
the Cygnus/B19/i-386.../bin dir anyway.
BTW tar/gzip now works on this setup if I use it properly, as someone
else instructed me...However I'd like to have the choice between tar.gz
and zip.
Markus
_________________________
Dr. Markus Hoenicka
DLR Inst. Aerospace Medicine
D-51170 Cologne, Germany
Hoenicka@pbmail.me.kp.dlr.de
Phone: ++49-2203-601-3101
Fax: ++49-2203-61159
_________________________


-
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] 14+ messages in thread
* RE: tar, zip, gzip troubles
@ 1998-10-14  4:27 Earnie Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Earnie Boyd @ 1998-10-14  4:27 UTC (permalink / raw)
  To: Kubat, Karel; +Cc: gw32

---"Kubat, Karel" <k.kubat@roccadefinance.nl> wrote:
>
> More on open/fopen in binary mode.
> 
> Earnie Boyd writes:
> > I suggest that you get the source code and find all of the
open/fopen
> > statements and properly add the necessary file mode processing
> > switches. Make the appropriate changes to the open/fopen statements.
> 
> You've got my vote on this! Only problem is, fopen() doesn't know a
"rb"
> or "wb" setting as I've found out. The only way I could think of while
> porting stuff, was to rewrite fopen() into open() calls, using
O_BINARY
> as a flag.
> 
> Are there better ways?
> 

This is the first I've heard of this.  "rb" and "wb" should work with
fopen(), if not it's a bug and should be reported as such.

Any others on the list seen this problem?

==
-                \\||//
-----------o0O0--Earnie--0O0o------------
--        earnie_boyd@yahoo.com        --
-- http://freeyellow.com/members5/gw32 --
--------------ooo0O--O0ooo---------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.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] 14+ messages in thread
* RE: tar, zip, gzip troubles
@ 1998-10-13  7:14 Dr. Markus Hönicka
  0 siblings, 0 replies; 14+ messages in thread
From: Dr. Markus Hönicka @ 1998-10-13  7:14 UTC (permalink / raw)
  To: 'earnie_boyd@yahoo.com'; +Cc: 'gnu-win32@cygnus.com'

>>I suggest that you get the source code and find all of the open/fopen
statements and properly add the necessary file mode processing
switches.  The only truly way to get rid of this for good is to
properly port the code and be specific about what mode your file
should be processing in.<<

So what I've found advertised as ported was ported only halfways? The
author claimed that this port serves him well, but he seems to have
tweaked his Cygwin setup to support this.
Actually I tried to compile the sources on my machine with the
modifications published by the same author. Unzip made it, zip won't
link properly, but I couldn't find out what went wrong (I'll get back to
this list if I gained some more insight). At least I will play around
with unzip and make the changes you suggested.

>>PS: Newbie's, you should visit my page.<<
Done.

Markus

_________________________
Dr. Markus Hoenicka
DLR Inst. Aerospace Medicine
D-51170 Cologne, Germany
Hoenicka@pbmail.me.kp.dlr.de
Phone: ++49-2203-601-3101
Fax: ++49-2203-61159
_________________________


-
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] 14+ messages in thread
* RE: tar, zip, gzip troubles
@ 1998-10-13  7:14 Dr. Markus Hönicka
  1998-10-14  4:56 ` Benjamin Riefenstahl
  0 siblings, 1 reply; 14+ messages in thread
From: Dr. Markus Hönicka @ 1998-10-13  7:14 UTC (permalink / raw)
  To: 'Larry Hall'; +Cc: 'gnu-win32@cygnus.com'

>>This smacks of the old binary/text problem.  It doesn't sound like you

have set your mounts (mount -b) or CYGWIN32 (binmode) variable to binary

mode so I suggest you look there first.<<

Oh yes, this cured the problem (although I had to strip the \r's from my
.bashrc to restart bash successfully). However, as Earnie Boyd pointed
out, this seems to be more a workaround than a fix and I'll try to
modify the zip/unzip sources to fix the problem (may take years,
though).
Thanks a lot
Markus 


_________________________
Dr. Markus Hoenicka
DLR Inst. Aerospace Medicine
D-51170 Cologne, Germany
Hoenicka@pbmail.me.kp.dlr.de
Phone: ++49-2203-601-3101
Fax: ++49-2203-61159
_________________________


-
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] 14+ messages in thread
* RE: tar, zip, gzip troubles
@ 1998-10-13  6:06 Earnie Boyd
  0 siblings, 0 replies; 14+ messages in thread
From: Earnie Boyd @ 1998-10-13  6:06 UTC (permalink / raw)
  To: Dr._Markus_Hönicka, 'Stipe Tolj'
  Cc: 'gnu-win32@cygnus.com'

This has the sounds of the all too familiar text vs binary file
processing modes.  Cygnus provided a shortcut to proper porting called
the binary mode switch stored within the mount table.  The mount
command will show this as text!=binary for text mode or text=binary
for binary mode.  This then becomes the default for the open and fopen
functions.

As I've stated on my web pages under my Personal Reflections on this
subject, IF YOU DEPEND ON THE BINARY MODE MOUNT SETTING THEN YOU ARE
MASKING A PROBLEM WHICH WILL EVENTUALLY BYTE YOU SOMEWHERE ELSE. 
Consider yourself bytten.

I suggest that you get the source code and find all of the open/fopen
statements and properly add the necessary file mode processing
switches.  The only truly way to get rid of this for good is to
properly port the code and be specific about what mode your file
should be processing in.

PORTERS OF SOFTWARE, please, don't depend on the binary mode mount
setting!!  Make the appropriate changes to the open/fopen statements.


---=?iso-8859-1?Q?Dr=2E_Markus_H=F6nicka?=
<Hoenicka@pbmail.me.kp.dlr.de> wrote:
>
> >> you may specify your setup and environment, so we can get a clue
why
> that
> happens. I had never problems with the Cygwin32 (CDK, not usertool
> package)
> tar and gzip utils. <<
> 
> Well, to be precise, on my homebox it's also the CDK, but at work I
use
> the usertools.
> Someone else already pointed out that I should use the tar -z option
> instead of piping through gzip - this cured the tar/gzip problem.
> The zip/unzip problem persists, however. My setup is plain vanilla,
> AFAIK:
> - Boot drive is C:, NT4 %SYSTEMDRIVE% is D:
> - Installed the CDK to D:/Win32App/Tools/Cygnus
> - created D:/tmp and D:/bin and copied sh.exe to /bin
> - downloaded the InfoZip ported to CygWin from
> http://www.i21.com/~tjump/files/index.html
> - put the binaries to the Cygnus/B19/H-i386.../bin dir.
> 
> Just an example of what happens:
> Markus@~/Programmieren/Projekt/Tricarb#zip tricarb *.cpp Hlp/*.bmp
>   adding: stdafx.cpp    zip warning:  file size changed while zipping
> stdafx.cpp
> 
>  s=123, actual=122
> zip error: Internal logic error (incorrect compressed size)
> 
> Any clues?
> Markus
> 
> 
> _________________________
> Dr. Markus Hoenicka
> DLR Inst. Aerospace Medicine
> D-51170 Cologne, Germany
> Hoenicka@pbmail.me.kp.dlr.de
> Phone: ++49-2203-601-3101
> Fax: ++49-2203-61159
> _________________________
> 
> 
> -
> For help on using this list (especially unsubscribing), send a
message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
> 

==
-                \\||//
-----------o0O0--Earnie--0O0o------------
--        earnie_boyd@yahoo.com        --
-- http://freeyellow.com/members5/gw32 --
--------------ooo0O--O0ooo---------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.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] 14+ messages in thread
* RE: tar, zip, gzip troubles
@ 1998-10-13  4:00 Dr. Markus Hönicka
  0 siblings, 0 replies; 14+ messages in thread
From: Dr. Markus Hönicka @ 1998-10-13  4:00 UTC (permalink / raw)
  To: 'tolj@uni-duesseldorf.de', 'gnu-win32@cygnus.com'

My replay obviously was swallowed by our mail system, so I send it again
here:

> >> you may specify your setup and environment, so we can get a clue
> why that
> happens. I had never problems with the Cygwin32 (CDK, not usertool
> package)
> tar and gzip utils. <<
> 
> Well, to be precise, on my homebox it's also the CDK, but at work I
> use the usertools.
> Someone else already pointed out that I should use the tar -z option
> instead of piping through gzip - this cured the tar/gzip problem.
> The zip/unzip problem persists, however. My setup is plain vanilla,
> AFAIK:
> - Boot drive is C:, NT4 %SYSTEMDRIVE% is D:
> - Installed the CDK to D:/Win32App/Tools/Cygnus
> - created D:/tmp and D:/bin and copied sh.exe to /bin
> - downloaded the InfoZip ported to CygWin from
> http://www.i21.com/~tjump/files/index.html
> - put the binaries to the Cygnus/B19/H-i386.../bin dir.
> 
> Just an example of what happens:
> Markus@~/Programmieren/Projekt/Tricarb#zip tricarb *.cpp Hlp/*.bmp
>   adding: stdafx.cpp    zip warning:  file size changed while zipping
> stdafx.cpp
> 
>  s=123, actual=122
> zip error: Internal logic error (incorrect compressed size)
> 
> Any clues? Is there anything else that I have to set up?
> Markus
> 
> 
> _________________________
> Dr. Markus Hoenicka
> DLR Inst. Aerospace Medicine
> D-51170 Cologne, Germany
> Hoenicka@pbmail.me.kp.dlr.de
> Phone: ++49-2203-601-3101
> Fax: ++49-2203-61159
> _________________________
> 
> 
-
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] 14+ messages in thread
* RE: tar, zip, gzip troubles
@ 1998-10-12 23:34 Dr. Markus Hönicka
  0 siblings, 0 replies; 14+ messages in thread
From: Dr. Markus Hönicka @ 1998-10-12 23:34 UTC (permalink / raw)
  To: 'mh@mike.franken.de', 'gnu-win32@cygnus.com'

My reply seems to have been swallowed by our mail system, so here it is
again:

> >>Seems to be the "non binary mounts problem".
> Do you have binary mounts ?<<
> 
> Please excuse my ignorance. If binary mounts are not there by default,
> I don't use them. I've seen in the FAQ that it is necessary to
> explicitely mount directories if they are not on drive C: . However, I
> assume this means if the dir is not on the drive where the Cygnus
> tools are installed, in my case it's D:, and I've put the zip/unzip
> binaries in the Cygnus/B19/i-386.../bin dir anyway.
> BTW tar/gzip now works on this setup if I use it properly, as someone
> else instructed me...However I'd like to have the choice between
> tar.gz and zip.
> Markus
> _________________________
> Dr. Markus Hoenicka
> DLR Inst. Aerospace Medicine
> D-51170 Cologne, Germany
> Hoenicka@pbmail.me.kp.dlr.de
> Phone: ++49-2203-601-3101
> Fax: ++49-2203-61159
> _________________________
> 
> 
-
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] 14+ messages in thread
* RE: tar, zip, gzip troubles
@ 1998-10-12  1:26 Dr. Markus Hönicka
  1998-10-14  0:19 ` jeffdb
  0 siblings, 1 reply; 14+ messages in thread
From: Dr. Markus Hönicka @ 1998-10-12  1:26 UTC (permalink / raw)
  To: 'Stipe Tolj'; +Cc: 'gnu-win32@cygnus.com'

>> you may specify your setup and environment, so we can get a clue why
that
happens. I had never problems with the Cygwin32 (CDK, not usertool
package)
tar and gzip utils. <<

Well, to be precise, on my homebox it's also the CDK, but at work I use
the usertools.
Someone else already pointed out that I should use the tar -z option
instead of piping through gzip - this cured the tar/gzip problem.
The zip/unzip problem persists, however. My setup is plain vanilla,
AFAIK:
- Boot drive is C:, NT4 %SYSTEMDRIVE% is D:
- Installed the CDK to D:/Win32App/Tools/Cygnus
- created D:/tmp and D:/bin and copied sh.exe to /bin
- downloaded the InfoZip ported to CygWin from
http://www.i21.com/~tjump/files/index.html
- put the binaries to the Cygnus/B19/H-i386.../bin dir.

Just an example of what happens:
Markus@~/Programmieren/Projekt/Tricarb#zip tricarb *.cpp Hlp/*.bmp
  adding: stdafx.cpp    zip warning:  file size changed while zipping
stdafx.cpp

 s=123, actual=122
zip error: Internal logic error (incorrect compressed size)

Any clues?
Markus


_________________________
Dr. Markus Hoenicka
DLR Inst. Aerospace Medicine
D-51170 Cologne, Germany
Hoenicka@pbmail.me.kp.dlr.de
Phone: ++49-2203-601-3101
Fax: ++49-2203-61159
_________________________


-
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] 14+ messages in thread
* tar, zip, gzip troubles
@ 1998-10-09 11:14 Dr. Markus Hönicka
  1998-10-10  7:18 ` Michael Hirmke
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Dr. Markus Hönicka @ 1998-10-09 11:14 UTC (permalink / raw)
  To: 'gnu-win32@cygnus.com'

Hi,
I'm quite new to the Cygnus tools (B19), but I have some experience with
both Windows NT4 and Linux. I can unpack .tar.gz and .zip on NT and I
can create .tar.gz on Linux and create .zip on NT (WinZip, InfoZip
zip/unzip in cmd.exe). However, I can't properly pack or unpack using
the Cygnus bash. All attempts result in invalid or unreadable archives.
I've tested:
- gzip/gunzip/tar shipped with the Cygnus tools
- InfoZip zip/unzip ported to Cygnus
- InfoZip zip/unzip compiled for WinNT
The only packer that partially works is pkzip, but this fails to
recursively search subdirectories.
I've tested the whole thing on two NT boxes, and I've downloaded the
usertools twice to be sure the distribution isn't corrupted.
What am I doing wrong?
TIA
Markus

____________________
Dr. Markus Hoenicka
DLR Inst. Aerospace Medicine
D-51170 Cologne, Germany
Hoenicka@pbmail.me.kp.dlr.de
Phone: ++49-2203-601-3101
Fax: ++49-2203-61159
_________________________

-
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] 14+ messages in thread

end of thread, other threads:[~1998-10-14  4:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-12  1:26 tar, zip, gzip troubles Dr. Markus Hönicka
  -- strict thread matches above, loose matches on Subject: below --
1998-10-14  4:27 Earnie Boyd
1998-10-13  7:14 Dr. Markus Hönicka
1998-10-13  7:14 Dr. Markus Hönicka
1998-10-14  4:56 ` Benjamin Riefenstahl
1998-10-13  6:06 Earnie Boyd
1998-10-13  4:00 Dr. Markus Hönicka
1998-10-12 23:34 Dr. Markus Hönicka
1998-10-12  1:26 Dr. Markus Hönicka
1998-10-14  0:19 ` jeffdb
1998-10-09 11:14 Dr. Markus Hönicka
1998-10-10  7:18 ` Michael Hirmke
1998-10-11  3:59 ` Jan Tomasek
1998-10-11 18:22 ` Stipe Tolj

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).