www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/11/17/00:29:53

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
Message-ID: <019701c16f29$19cf8fe0$0200a8c0@lifelesswks>
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin-apps AT sources DOT redhat DOT com>
Subject: indent
Date: Sat, 17 Nov 2001 16:31:25 +1100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-OriginalArrivalTime: 17 Nov 2001 05:29:32.0170 (UTC) FILETIME=[D5EF76A0:01C16F28]

Gerrit, this is the bit of the patch I'm not sure of: as you are linking
against automode, isn't this redundant?

Also, at this point there's no need to have setup.hint embedded in the
binary or source tarball. (I see no particular reason no to either, this
is just a comment).

I've uploaded the files to sources.redhat.com. Welcome to the club.

Rob

diff -urbdN indent-2.2.6-orig/io.c indent-2.2.6-1/io.c
--- indent-2.2.6-orig/io.c      Fri Nov 17 04:01:04 2000
+++ indent-2.2.6-1/io.c Thu Nov 15 16:35:22 2001
@@ -36,7 +36,7 @@
 /* POSIX says that <fcntl.h> should exist.  Some systems might need to
use
    <sys/fcntl.h> or <sys/file.h> instead.  */
 #include <fcntl.h>
-#ifdef _WIN32
+#if defined(_WIN32) || defined(__CYGWIN__)
 #include <io.h>
 #endif
 #endif /* not VMS */
@@ -1029,6 +1029,9 @@
   int namelen = strlen (filename);

   fd = open (filename, O_RDONLY, 0777);
+#ifdef __CYGWIN__
+  setmode(fd, O_TEXT);
+#endif
   if (fd < 0)
     fatal ("Can't open input file %s", filename);

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019