]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(ENABLE_HARD_LINK_TO_SYMLINK_WARNING): Define to 0.
authorJim Meyering <jim@meyering.net>
Thu, 19 Jun 2003 11:38:16 +0000 (11:38 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 19 Jun 2003 11:38:16 +0000 (11:38 +0000)
(do_link): Don't warn about hard link to symlink.

src/ln.c

index f46ad1b2399c171bfd49e5be5ef4afd403bbd48b..c653c5dd40106f4c2269f57ea2abfe2f58a47ffa 100644 (file)
--- a/src/ln.c
+++ b/src/ln.c
 
 #define AUTHORS N_ ("Mike Parker and David MacKenzie")
 
+#ifndef ENABLE_HARD_LINK_TO_SYMLINK_WARNING
+# define ENABLE_HARD_LINK_TO_SYMLINK_WARNING 0
+#endif
+
 /* For long options that have no equivalent short option, use a
    non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
 enum
@@ -162,7 +166,8 @@ do_link (const char *source, const char *dest)
          return 1;
        }
 
-      if (S_ISLNK (source_stats.st_mode))
+      if (ENABLE_HARD_LINK_TO_SYMLINK_WARNING
+         && S_ISLNK (source_stats.st_mode))
        {
          error (0, 0, _("%s: warning: making a hard link to a symbolic link\
  is not portable"),