delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/03/02/11:20:14

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Sat, 02 Mar 2002 18:12:51 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp-workers AT delorie DOT com
Message-Id: <2110-Sat02Mar2002181250+0200-eliz@is.elta.co.il>
X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9
Subject: Two small patches for the ported Fileutils 4.0
Reply-To: djgpp-workers AT delorie DOT com

Here are two patches for Fileutils, to correct the following two
problems:

  - ginstall would crash when invoked to install a file with no
    extension (such as a shell script);

  - "cp -Pp" would print an error message on filesystems that don't
    allow setting timestamps of directories.

HTH

2002-03-02  Eli Zaretskii  <eliz AT is DOT elta DOT co DOT il>

	* src/cp.c (re_protect) [MSDOS]: Don't print an error message if
	utime fails.

	* src/install.c (install_file_in_file) [__DJGPP__]: Don't compute
	to_dot (it's unused), and don't pass from_dot to STREQ unless it
	is non-NULL.


--- src/cp.c~0	Sat Sep 19 17:09:22 1998
+++ src/cp.c	Sat Mar  2 17:52:26 2002
@@ -242,8 +242,12 @@ re_protect (const char *const_dst_path, 
 
 	  if (utime (dst_path, &utb))
 	    {
+#ifndef MSDOS
+	      /* MS-DOS doesn't allow to change timestamp of a
+		 directory.  */
 	      error (0, errno, _("preserving times for %s"), dst_path);
 	      return 1;
+#endif
 	    }
 	}
 

--- src/install.c~0	Sun May 27 11:42:22 2001
+++ src/install.c	Sat Mar  2 17:07:18 2002
@@ -454,11 +454,11 @@ install_file_in_file (const char *from, 
 #ifdef __DJGPP__  
   static char STUBIFY[] = "stubify.exe";
   char *from_dot = strrchr(from, '.');
-  char *to_dot   = strrchr(to, '.');
 
   /* DJGPP executables need to be stubbed and to have a valid executable file
    * extension, to be executable by some DOS shells (e.g. COMMAND.COM). */
-  if (!STREQ (from_dot, ".exe") && !STREQ (from_dot, ".com"))
+  if (!(from_dot
+	&& (STREQ (from_dot, ".exe") || STREQ (from_dot, ".com"))))
     {
       char *new_from, *new_to;
       const _v2_prog_type *file_type;

- Raw text -


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