public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: problem compiling sharutils-4.2.1 under Cygwin 1.0
@ 2000-01-21 17:50 N8TM
  0 siblings, 0 replies; 3+ messages in thread
From: N8TM @ 2000-01-21 17:50 UTC (permalink / raw)
  To: kelem, bug-gnu-utils, cygwin

In a message dated 1/21/2000 5:17:26 PM Pacific Standard Time, 
kelem@adaptivesilicon.com writes:

> When I run the newly compiled uudecode on WinNT, I get a 257 byte file.
>  When I run uudecode on the same file on Linux, I get a 256 byte file.
>  cmp (on Linux) reports:
>  test.bin test.bin.nt differ: char 11, line 1
Is this anything more than the \n vs \r\n line termination question?  
sharutils has worked well for me.  Try either starting with \r\n separators, 
or removing them from the uudecode result.  IIRC, I had better luck with the 
source code which came with my linux than with that from the ftp.gnu.org.

Tim
tprince@computer.org

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: problem compiling sharutils-4.2.1 under Cygwin 1.0
  2000-01-21 17:16 Steve Kelem
@ 2000-01-22  1:56 ` Corinna Vinschen
  0 siblings, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2000-01-22  1:56 UTC (permalink / raw)
  To: Steve Kelem, bug-gnu-utils; +Cc: cygwin

Steve Kelem wrote:
> I'm trying to build sharutils-4.2.1 under Cygwin 1.0 on WinNT 4.0 SP6 on
> a Pentium III 550.
> 
> It appears to build and compile ok, but fails the first test.

I'm sure you have textmode mounts. Try using binmode mounts or better
change the sources of sharutils to support the "b" flag of
f(re)open if compiled with cygwin.
It's simple. Example from sharutils-4.2, uudecode/uuencode:

--- uudecode.c.orig     Sat Jan 22 10:42:30 2000
+++ uudecode.c  Sat Jan 22 10:41:41 2000
@@ -339,8 +339,13 @@ decode (inname, forced_outname)

   /* Create output file and set mode.  */

+#ifdef __CYGWIN__
+#define OPENMODE "wb"
+#else
+#define OPENMODE "w"
+#endif
   if (strcmp (outname, "/dev/stdout") != 0 && strcmp (outname, "-") !=
0
-      && (freopen (outname, "w", stdout) == NULL
+      && (freopen (outname, OPENMODE, stdout) == NULL
 #if HAVE_FCHMOD
          || fchmod (fileno (stdout), mode & (S_IRWXU | S_IRWXG |
S_IRWXO))
 #else
--- uuencode.c.orig     Sat Jan 22 10:42:45 2000
+++ uuencode.c  Sat Jan 22 10:43:24 2000
@@ -270,7 +270,13 @@ main (argc, argv)

       /* Optional first argument is input file.  */

-      if (!freopen (argv[optind], "r", stdin) || fstat (fileno (stdin),
&sb))
+#ifdef __CYGWIN__
+#define OPENMODE "rb"
+#else
+#define OPENMODE "r"
+#endif
+      if (!freopen (argv[optind], OPENMODE, stdin)
+          || fstat (fileno (stdin), &sb))
        error (EXIT_FAILURE, errno, "%s", argv[optind]);
       mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
       optind++;

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* problem compiling sharutils-4.2.1 under Cygwin 1.0
@ 2000-01-21 17:16 Steve Kelem
  2000-01-22  1:56 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Kelem @ 2000-01-21 17:16 UTC (permalink / raw)
  To: bug-gnu-utils, cygwin

I'm trying to build sharutils-4.2.1 under Cygwin 1.0 on WinNT 4.0 SP6 on
a Pentium III 550.

It appears to build and compile ok, but fails the first test.

The test is to uudecode testdata, then uuencode the resulting file and
see if they're the same.  They're not.

testdata looks like:
begin 664 test.bin
M``$"`P0%!@<("0H+#`T.#Q`1$A,4%187&!D:&QP='A\@(2(C)"4F)R@I*BLL
M+2XO,#$R,S0U-C<X.3H[/#T^/T!!0D-$149'2$E*2TQ-3D]045)35%565UA9
M6EM<75Y?8&%B8V1E9F=H:6IK;&UN;W!Q<G-T=79W>'EZ>WQ]?G^`@8*#A(6&
MAXB)BHN,C8Z/D)&2DY25EI>8F9J;G)V>GZ"AHJ.DI::GJ*FJJZRMKJ^PL;*S
MM+6VM[BYNKN\O;Z_P,'"P\3%QL?(R<K+S,W.S]#1TM/4U=;7V-G:V]S=WM_@
?X>+CY.7FY^CIZNOL[>[O\/'R\_3U]O?X^?K[_/W^_P``
`
end

When I run the newly compiled uudecode on WinNT, I get a 257 byte file.
When I run uudecode on the same file on Linux, I get a 256 byte file.
cmp (on Linux) reports:
test.bin test.bin.nt differ: char 11, line 1

When I run the newly-compiled uuencode on WinNT, I get the file:
begin 644 test.bin
:``$"`P0%!@<("0H+#`T.#Q`1$A,4%187&!D`
`
end

Any idea what's wrong or how to fix it?

Help!
Steve

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

end of thread, other threads:[~2000-01-22  1:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-21 17:50 problem compiling sharutils-4.2.1 under Cygwin 1.0 N8TM
  -- strict thread matches above, loose matches on Subject: below --
2000-01-21 17:16 Steve Kelem
2000-01-22  1:56 ` Corinna Vinschen

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