Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> List-Archive: <http://sourceware.cygnus.com/ml/cygwin/> List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com> List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <38897EC1.32A5E56C@vinschen.de> Date: Sat, 22 Jan 2000 10:56:17 +0100 From: Corinna Vinschen <corinna AT vinschen DOT de> X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: de,en MIME-Version: 1.0 To: Steve Kelem <kelem AT adaptivesilicon DOT com>, bug-gnu-utils AT prep DOT ai DOT mit DOT edu CC: cygwin AT sourceware DOT cygnus DOT com Subject: Re: problem compiling sharutils-4.2.1 under Cygwin 1.0 References: <388904B0 DOT 1E9524FE AT adaptivesilicon DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 AT sourceware DOT cygnus DOT com