This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Ready for test coreutils-5.2.0-1


I've created a new coreutils package that I hope addresses some of the concerns recently voiced about it:

-cp.exe corrupting files when copying from binary to text mounts.
-printf.exe (and others) being statically linked with libintl.a and libiconv.a created large binaries.


http://blackburn.homeip.net/cygwin-packages/release/coreutils/coreutils-5.2.0-1-src.tar.bz2
http://blackburn.homeip.net/cygwin-packages/release/coreutils/coreutils-5.2.0-1.tar.bz2
http://blackburn.homeip.net/cygwin-packages/release/coreutils/setup.hint

5a9ee1e8ef9455a14b9ed52c0f52e03e *coreutils-5.2.0-1-src.tar.bz2
779d8871f359223c2337a7ead83e2b9f *coreutils-5.2.0-1.tar.bz2


There are also some patches I'm considering adding from fileutils-4.1-2 (proposed-fileutils-patches.txt). I got these by diffing fileutils-4.1 with the src package for fileutils-4.1-2. I was hoping that the previous maintainer could comment on these patches so I could figure out if they are relevant for the coreutils package.



Mark Blackburn
diff -Naur fileutils-4.1/lib/regex.c fileutils-4.1-2/lib/regex.c
--- fileutils-4.1/lib/regex.c	2001-04-02 04:26:14.000000000 -0400
+++ fileutils-4.1-2/lib/regex.c	2003-07-13 11:21:46.000000000 -0400
@@ -7841,7 +7841,7 @@
       if (msg_size > errbuf_size)
         {
 #if defined HAVE_MEMPCPY || defined _LIBC
-	  *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+	  *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
 #else
           memcpy (errbuf, msg, errbuf_size - 1);
           errbuf[errbuf_size - 1] = 0;
diff -Naur fileutils-4.1/src/copy.c fileutils-4.1-2/src/copy.c
--- fileutils-4.1/src/copy.c	2001-01-13 10:49:44.000000000 -0500
+++ fileutils-4.1-2/src/copy.c	2001-06-25 18:42:46.000000000 -0400
@@ -1147,6 +1147,7 @@
 	}
     }
 
+ ok:
   return delayed_fail;
 
 un_backup:
diff -Naur fileutils-4.1/src/install.c fileutils-4.1-2/src/install.c
--- fileutils-4.1/src/install.c	2000-12-25 06:07:36.000000000 -0500
+++ fileutils-4.1-2/src/install.c	2001-06-15 15:07:52.000000000 -0400
@@ -390,6 +390,32 @@
 install_file_in_file (const char *from, const char *to,
 		      const struct cp_options *x)
 {
+  int temp_fd;
+
+  /* CYGNUS LOCAL - dj/install */
+  /* dos/win hack - silently add .exe if it was silently added by gcc.
+     Note that cygwin's stat() checks foo and foo.exe for us (how nice)
+     but open() doesn't */
+  if ((temp_fd = open (from, O_RDONLY | O_BINARY)) < 0)
+    {
+      /* This isn't freed, but the program exits quickly */
+      char *new_from = (char *) xmalloc (strlen(from) + 5);
+      strcpy(new_from, from);
+      strcat(new_from, ".exe");
+      if ((temp_fd = open (new_from, O_RDONLY | O_BINARY)) >= 0)
+      {
+        char *new_to = (char *) xmalloc (strlen(to) + 5);
+        strcpy(new_to, to);
+        strcat(new_to, ".exe");
+        from = new_from;
+        to = new_to;
+        close (temp_fd);
+      }
+    }
+  else
+    close (temp_fd);
+  /* END CYGNUS LOCAL - dj/install */
+
   if (copy_file (from, to, x))
     return 1;
   if (strip_files)
diff -Naur fileutils-4.1/src/ln.c fileutils-4.1-2/src/ln.c
--- fileutils-4.1/src/ln.c	2001-02-03 12:57:02.000000000 -0500
+++ fileutils-4.1-2/src/ln.c	2001-06-15 15:07:52.000000000 -0400
@@ -228,6 +228,13 @@
       && (!symbolic_link || stat (source, &source_stats) == 0)
       && source_stats.st_dev == dest_stats.st_dev
       && source_stats.st_ino == dest_stats.st_ino
+    /* CYGNUS LOCAL */
+#ifdef __CYGWIN__
+      && (strlen (source) < 5
+	 || strncasecmp (source, dest, strlen (dest)) != 0
+	 || strcasecmp (source + strlen (source) - 4, ".exe") != 0)
+#endif
+    /* END CYGNUS LOCAL */
       /* The following detects whether removing DEST will also remove
  	 SOURCE.  If the file has only one link then both are surely
  	 the same link.  Otherwise check whether they point to the same
@@ -252,7 +259,13 @@
 	  if (!yesno ())
 	    return 0;
 	}
-      else if (!remove_existing_files && backup_type == none)
+      else if (!remove_existing_files && backup_type == none
+#if defined (__CYGWIN__)
+	    && (strlen (source) < 5
+		|| strncasecmp (source, dest, strlen (dest)) != 0
+		|| strcasecmp (source + strlen (source) - 4, ".exe") != 0)
+#endif
+	      )
 	{
 	  error (0, 0, _("%s: File exists"), quote (dest));
 	  return 1;
diff -Naur fileutils-4.1/src/system.h fileutils-4.1-2/src/system.h
--- fileutils-4.1/src/system.h	2000-04-19 17:41:14.000000000 -0400
+++ fileutils-4.1-2/src/system.h	2001-06-15 15:07:52.000000000 -0400
@@ -272,7 +272,11 @@
 #endif
 
 #ifndef ST_NBLOCKSIZE
-# define ST_NBLOCKSIZE 512
+# ifdef S_BLKSIZE
+#  define ST_NBLOCKSIZE S_BLKSIZE
+# else
+#  define ST_NBLOCKSIZE 512
+# endif
 #endif
 
 #include "sys2.h"
diff -urN -x .build -x .inst -x .sinst coreutils-5.2.0-orig/CYGWIN-PATCHES/coreutils.README coreutils-5.2.0/CYGWIN-PATCHES/coreutils.README
--- coreutils-5.2.0-orig/CYGWIN-PATCHES/coreutils.README	1969-12-31 19:00:00.000000000 -0500
+++ coreutils-5.2.0/CYGWIN-PATCHES/coreutils.README	2004-03-11 15:04:58.251955200 -0500
@@ -0,0 +1,305 @@
+coreutils
+------------------------------------------
+The GNU Core Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system.
+Previously these utilities were offered as three individual sets of GNU utilities, fileutils, shellutils, and textutils. Those three have been combined into a single set of utilities called the coreutils. 
+
+Runtime requirements:
+  cygwin-1.5.7 or newer
+  libintl
+  libiconv
+
+Build requirements:
+  cygwin-1.5.7 or newer
+  gcc-3.3.1-3 or newer
+  binutils-20030901-1 or newer
+  gettext
+  libintl-devel
+  libiconv-devel
+
+Canonical homepage:
+  http://www.gnu.org/software/coreutils/
+
+Canonical download:
+  http://ftp.gnu.org/pub/gnu/coreutils/
+
+------------------------------------
+
+Build instructions:
+  unpack coreutils-5.2.0-1-src.tar.bz2
+    if you use setup to install this src package, it will be
+	 unpacked under /usr/src automatically
+  cd /usr/src
+  ./coreutils-5.2.0-1.sh all
+
+This will create:
+  /usr/src/coreutils-5.2.0-1.tar.bz2
+  /usr/src/coreutils-5.2.0-1-src.tar.bz2
+
+Or use './coreutils-5.2.0-1.sh prep' to get a patched source directory
+
+-------------------------------------------
+
+Files included in the binary distribution:
+
+  /usr/bin/basename.exe
+  /usr/bin/cat.exe
+  /usr/bin/chgrp.exe
+  /usr/bin/chmod.exe
+  /usr/bin/chown.exe
+  /usr/bin/chroot.exe
+  /usr/bin/cksum.exe
+  /usr/bin/comm.exe
+  /usr/bin/cp.exe
+  /usr/bin/csplit.exe
+  /usr/bin/cut.exe
+  /usr/bin/date.exe
+  /usr/bin/dd.exe
+  /usr/bin/df.exe
+  /usr/bin/dir.exe
+  /usr/bin/dircolors.exe
+  /usr/bin/dirname.exe
+  /usr/bin/du.exe
+  /usr/bin/echo.exe
+  /usr/bin/env.exe
+  /usr/bin/expand.exe
+  /usr/bin/expr.exe
+  /usr/bin/factor.exe
+  /usr/bin/false.exe
+  /usr/bin/fmt.exe
+  /usr/bin/fold.exe
+  /usr/bin/groups
+  /usr/bin/head.exe
+  /usr/bin/hostid.exe
+  /usr/bin/hostname.exe
+  /usr/bin/id.exe
+  /usr/bin/install.exe
+  /usr/bin/join.exe
+  /usr/bin/kill.exe
+  /usr/bin/link.exe
+  /usr/bin/ln.exe
+  /usr/bin/logname.exe
+  /usr/bin/ls.exe
+  /usr/bin/md5sum.exe
+  /usr/bin/mkdir.exe
+  /usr/bin/mkfifo.exe
+  /usr/bin/mknod.exe
+  /usr/bin/mv.exe
+  /usr/bin/nice.exe
+  /usr/bin/nl.exe
+  /usr/bin/nohup.exe
+  /usr/bin/od.exe
+  /usr/bin/paste.exe
+  /usr/bin/pathchk.exe
+  /usr/bin/pinky.exe
+  /usr/bin/pr.exe
+  /usr/bin/printenv.exe
+  /usr/bin/printf.exe
+  /usr/bin/ptx.exe
+  /usr/bin/pwd.exe
+  /usr/bin/readlink.exe
+  /usr/bin/rm.exe
+  /usr/bin/rmdir.exe
+  /usr/bin/seq.exe
+  /usr/bin/sha1sum.exe
+  /usr/bin/shred.exe
+  /usr/bin/sleep.exe
+  /usr/bin/sort.exe
+  /usr/bin/split.exe
+  /usr/bin/stat.exe
+  /usr/bin/stty.exe
+  /usr/bin/sum.exe
+  /usr/bin/sync.exe
+  /usr/bin/tac.exe
+  /usr/bin/tail.exe
+  /usr/bin/tee.exe
+  /usr/bin/test.exe
+  /usr/bin/touch.exe
+  /usr/bin/tr.exe
+  /usr/bin/true.exe
+  /usr/bin/tsort.exe
+  /usr/bin/tty.exe
+  /usr/bin/uname.exe
+  /usr/bin/unexpand.exe
+  /usr/bin/uniq.exe
+  /usr/bin/unlink.exe
+  /usr/bin/uptime.exe
+  /usr/bin/users.exe
+  /usr/bin/vdir.exe
+  /usr/bin/wc.exe
+  /usr/bin/who.exe
+  /usr/bin/whoami.exe
+  /usr/bin/yes.exe
+  /usr/bin/[.exe
+  /usr/lib/charset.alias
+  /usr/share/doc/coreutils-5.2.0/ABOUT-NLS
+  /usr/share/doc/coreutils-5.2.0/AUTHORS
+  /usr/share/doc/coreutils-5.2.0/ChangeLog
+  /usr/share/doc/coreutils-5.2.0/COPYING
+  /usr/share/doc/coreutils-5.2.0/INSTALL
+  /usr/share/doc/coreutils-5.2.0/NEWS
+  /usr/share/doc/coreutils-5.2.0/README
+  /usr/share/doc/coreutils-5.2.0/THANKS
+  /usr/share/doc/coreutils-5.2.0/TODO
+  /usr/share/doc/Cygwin/coreutils-5.2.0.README
+  /usr/share/info/coreutils.info.gz
+  /usr/share/locale/be/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/be/LC_TIME/coreutils.mo
+  /usr/share/locale/ca/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/ca/LC_TIME/coreutils.mo
+  /usr/share/locale/cs/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/cs/LC_TIME/coreutils.mo
+  /usr/share/locale/da/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/da/LC_TIME/coreutils.mo
+  /usr/share/locale/de/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/de/LC_TIME/coreutils.mo
+  /usr/share/locale/el/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/el/LC_TIME/coreutils.mo
+  /usr/share/locale/es/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/es/LC_TIME/coreutils.mo
+  /usr/share/locale/et/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/et/LC_TIME/coreutils.mo
+  /usr/share/locale/fi/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/fi/LC_TIME/coreutils.mo
+  /usr/share/locale/fr/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/fr/LC_TIME/coreutils.mo
+  /usr/share/locale/ga/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/ga/LC_TIME/coreutils.mo
+  /usr/share/locale/gl/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/gl/LC_TIME/coreutils.mo
+  /usr/share/locale/hu/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/hu/LC_TIME/coreutils.mo
+  /usr/share/locale/it/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/it/LC_TIME/coreutils.mo
+  /usr/share/locale/ja/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/ja/LC_TIME/coreutils.mo
+  /usr/share/locale/ko/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/ko/LC_TIME/coreutils.mo
+  /usr/share/locale/lg/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/lg/LC_TIME/coreutils.mo
+  /usr/share/locale/ms/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/ms/LC_TIME/coreutils.mo
+  /usr/share/locale/nb/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/nb/LC_TIME/coreutils.mo
+  /usr/share/locale/nl/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/nl/LC_TIME/coreutils.mo
+  /usr/share/locale/no/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/no/LC_TIME/coreutils.mo
+  /usr/share/locale/pl/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/pl/LC_TIME/coreutils.mo
+  /usr/share/locale/pt/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/pt/LC_TIME/coreutils.mo
+  /usr/share/locale/pt_BR/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/pt_BR/LC_TIME/coreutils.mo
+  /usr/share/locale/ru/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/ru/LC_TIME/coreutils.mo
+  /usr/share/locale/sk/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/sk/LC_TIME/coreutils.mo
+  /usr/share/locale/sl/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/sl/LC_TIME/coreutils.mo
+  /usr/share/locale/sv/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/sv/LC_TIME/coreutils.mo
+  /usr/share/locale/tr/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/tr/LC_TIME/coreutils.mo
+  /usr/share/locale/zh_CN/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/zh_CN/LC_TIME/coreutils.mo
+  /usr/share/locale/zh_TW/LC_MESSAGES/coreutils.mo
+  /usr/share/locale/zh_TW/LC_TIME/coreutils.mo
+  /usr/share/man/man1/basename.1.gz
+  /usr/share/man/man1/cat.1.gz
+  /usr/share/man/man1/chgrp.1.gz
+  /usr/share/man/man1/chmod.1.gz
+  /usr/share/man/man1/chown.1.gz
+  /usr/share/man/man1/chroot.1.gz
+  /usr/share/man/man1/cksum.1.gz
+  /usr/share/man/man1/comm.1.gz
+  /usr/share/man/man1/cp.1.gz
+  /usr/share/man/man1/csplit.1.gz
+  /usr/share/man/man1/cut.1.gz
+  /usr/share/man/man1/date.1.gz
+  /usr/share/man/man1/dd.1.gz
+  /usr/share/man/man1/df.1.gz
+  /usr/share/man/man1/dir.1.gz
+  /usr/share/man/man1/dircolors.1.gz
+  /usr/share/man/man1/dirname.1.gz
+  /usr/share/man/man1/du.1.gz
+  /usr/share/man/man1/echo.1.gz
+  /usr/share/man/man1/env.1.gz
+  /usr/share/man/man1/expand.1.gz
+  /usr/share/man/man1/expr.1.gz
+  /usr/share/man/man1/factor.1.gz
+  /usr/share/man/man1/false.1.gz
+  /usr/share/man/man1/fmt.1.gz
+  /usr/share/man/man1/fold.1.gz
+  /usr/share/man/man1/groups.1.gz
+  /usr/share/man/man1/head.1.gz
+  /usr/share/man/man1/hostid.1.gz
+  /usr/share/man/man1/hostname.1.gz
+  /usr/share/man/man1/id.1.gz
+  /usr/share/man/man1/install.1.gz
+  /usr/share/man/man1/join.1.gz
+  /usr/share/man/man1/kill.1.gz
+  /usr/share/man/man1/link.1.gz
+  /usr/share/man/man1/ln.1.gz
+  /usr/share/man/man1/logname.1.gz
+  /usr/share/man/man1/ls.1.gz
+  /usr/share/man/man1/md5sum.1.gz
+  /usr/share/man/man1/mkdir.1.gz
+  /usr/share/man/man1/mkfifo.1.gz
+  /usr/share/man/man1/mknod.1.gz
+  /usr/share/man/man1/mv.1.gz
+  /usr/share/man/man1/nice.1.gz
+  /usr/share/man/man1/nl.1.gz
+  /usr/share/man/man1/nohup.1.gz
+  /usr/share/man/man1/od.1.gz
+  /usr/share/man/man1/paste.1.gz
+  /usr/share/man/man1/pathchk.1.gz
+  /usr/share/man/man1/pinky.1.gz
+  /usr/share/man/man1/pr.1.gz
+  /usr/share/man/man1/printenv.1.gz
+  /usr/share/man/man1/printf.1.gz
+  /usr/share/man/man1/ptx.1.gz
+  /usr/share/man/man1/pwd.1.gz
+  /usr/share/man/man1/readlink.1.gz
+  /usr/share/man/man1/rm.1.gz
+  /usr/share/man/man1/rmdir.1.gz
+  /usr/share/man/man1/seq.1.gz
+  /usr/share/man/man1/sha1sum.1.gz
+  /usr/share/man/man1/shred.1.gz
+  /usr/share/man/man1/sleep.1.gz
+  /usr/share/man/man1/sort.1.gz
+  /usr/share/man/man1/split.1.gz
+  /usr/share/man/man1/stat.1.gz
+  /usr/share/man/man1/stty.1.gz
+  /usr/share/man/man1/su.1.gz
+  /usr/share/man/man1/sum.1.gz
+  /usr/share/man/man1/sync.1.gz
+  /usr/share/man/man1/tac.1.gz
+  /usr/share/man/man1/tail.1.gz
+  /usr/share/man/man1/tee.1.gz
+  /usr/share/man/man1/test.1.gz
+  /usr/share/man/man1/touch.1.gz
+  /usr/share/man/man1/tr.1.gz
+  /usr/share/man/man1/true.1.gz
+  /usr/share/man/man1/tsort.1.gz
+  /usr/share/man/man1/tty.1.gz
+  /usr/share/man/man1/uname.1.gz
+  /usr/share/man/man1/unexpand.1.gz
+  /usr/share/man/man1/uniq.1.gz
+  /usr/share/man/man1/unlink.1.gz
+  /usr/share/man/man1/uptime.1.gz
+  /usr/share/man/man1/users.1.gz
+  /usr/share/man/man1/vdir.1.gz
+  /usr/share/man/man1/wc.1.gz
+  /usr/share/man/man1/who.1.gz
+  /usr/share/man/man1/whoami.1.gz
+  /usr/share/man/man1/yes.1.gz
+
+------------------
+
+Port Notes:
+
+----------  coreutils-5.2.0-1  -----------
+Initial release
+
+Cygwin port maintained by: Mark Blackburn <marklist@fangorn.ca>
+
diff -urN -x .build -x .inst -x .sinst coreutils-5.2.0-orig/CYGWIN-PATCHES/setup.hint coreutils-5.2.0/CYGWIN-PATCHES/setup.hint
--- coreutils-5.2.0-orig/CYGWIN-PATCHES/setup.hint	1969-12-31 19:00:00.000000000 -0500
+++ coreutils-5.2.0/CYGWIN-PATCHES/setup.hint	2004-03-11 15:16:03.718849600 -0500
@@ -0,0 +1,4 @@
+sdesc: "Core utilities which are expected to exist on every operating system"
+ldesc: "A command line file transfer program. It suppore Utilities are the basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every operating system. Previously these utilities were offered as three individual sets of GNU utilities,  fileutils,  shellutils, and  textutils. Those three have been combined into a single set of utilities called the coreutils."
+category: Base
+requires: cygwin libiconv2 libintl2
diff -urN -x .build -x .inst -x .sinst coreutils-5.2.0-orig/src/Makefile.am coreutils-5.2.0/src/Makefile.am
--- coreutils-5.2.0-orig/src/Makefile.am	2004-02-02 03:12:57.000000000 -0500
+++ coreutils-5.2.0/src/Makefile.am	2004-03-11 13:09:37.169928000 -0500
@@ -30,7 +30,7 @@
 # must precede $(LIBINTL) in order to ensure we use GNU getopt.
 # But libfetish.a must also follow $(LIBINTL), since libintl uses
 # replacement functions defined in libfetish.a.
-LDADD = ../lib/libfetish.a $(LIBINTL) ../lib/libfetish.a
+LDADD = ../lib/libfetish.a $(LTLIBINTL) ../lib/libfetish.a
 
 dir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
 ls_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
diff -urN -x .build -x .inst -x .sinst coreutils-5.2.0-orig/src/Makefile.in coreutils-5.2.0/src/Makefile.in
--- coreutils-5.2.0-orig/src/Makefile.in	2004-02-10 03:11:58.000000000 -0500
+++ coreutils-5.2.0/src/Makefile.in	2004-03-11 13:17:08.198475200 -0500
@@ -833,7 +833,7 @@
 # must precede $(LIBINTL) in order to ensure we use GNU getopt.
 # But libfetish.a must also follow $(LIBINTL), since libintl uses
 # replacement functions defined in libfetish.a.
-LDADD = ../lib/libfetish.a $(LIBINTL) ../lib/libfetish.a
+LDADD = ../lib/libfetish.a $(LTLIBINTL) ../lib/libfetish.a
 dir_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
 ls_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
 shred_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
@@ -974,7 +974,7 @@
 	done
 
 clean-binPROGRAMS:
-	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) > /dev/null 2>&1 || /bin/rm -f $(bin_PROGRAMS)
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 
 installcheck-binPROGRAMS: $(bin_PROGRAMS)
 	bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
diff -urN -x .build -x .inst -x .sinst coreutils-5.2.0-orig/src/copy.c coreutils-5.2.0/src/copy.c
--- coreutils-5.2.0-orig/src/copy.c	2004-02-07 10:42:04.000000000 -0500
+++ coreutils-5.2.0/src/copy.c	2004-03-10 23:43:22.420454400 -0500
@@ -216,7 +216,7 @@
   int last_write_made_hole = 0;
   int make_holes = (x->sparse_mode == SPARSE_ALWAYS);
 
-  source_desc = open (src_path, O_RDONLY);
+  source_desc = open (src_path, O_RDONLY | O_BINARY);
   if (source_desc < 0)
     {
       error (0, errno, _("cannot open %s for reading"), quote (src_path));
@@ -245,11 +245,11 @@
      The if-block will be taken in move_mode.  */
   if (*new_dst)
     {
-      dest_desc = open (dst_path, O_WRONLY | O_CREAT, dst_mode);
+      dest_desc = open (dst_path, O_WRONLY | O_CREAT | O_BINARY, dst_mode);
     }
   else
     {
-      dest_desc = open (dst_path, O_WRONLY | O_TRUNC, dst_mode);
+      dest_desc = open (dst_path, O_WRONLY | O_TRUNC | O_BINARY, dst_mode);
 
       if (dest_desc < 0 && x->unlink_dest_after_failed_open)
 	{
@@ -264,7 +264,7 @@
 	  *new_dst = 1;
 
 	  /* Try the open again, but this time with different flags.  */
-	  dest_desc = open (dst_path, O_WRONLY | O_CREAT, dst_mode);
+	  dest_desc = open (dst_path, O_WRONLY | O_CREAT | O_BINARY, dst_mode);
 	}
     }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]