[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils-bug
Subject:    mknod patch for stat-macros.h
From:       Paul Eggert <eggert () CS ! UCLA ! EDU>
Date:       2006-08-29 0:34:22
Message-ID: E1GHrYc-0004Et-7d () penguin ! cs ! ucla ! edu
[Download RAW message or body]

I installed the following similar patch for mknod.  It's a bit of a
special case since it uses S_IFBLK and S_IFCHR directly, and these
aren't guaranteed by POSIX.  But the S_ISFIFO test can be removed.

2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>

	* src/mknod.c (main): Don't test whether macros like
	S_ISLNK are defined, since they're always defined now.

--- src/mknod.c.~1.93.~	2006-07-16 20:11:01.000000000 -0700
+++ src/mknod.c	2006-08-28 17:30:18.000000000 -0700
@@ -208,12 +208,8 @@ main (int argc, char **argv)
       break;
 
     case 'p':			/* `pipe' */
-#ifndef S_ISFIFO
-      error (EXIT_FAILURE, 0, _("fifo files not supported"));
-#else
       if (mkfifo (argv[optind], newmode) != 0)
 	error (EXIT_FAILURE, errno, "%s", quote (argv[optind]));
-#endif
       break;
 
     default:



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic