[hackers] [sbase] Stop defining major()/minor() and makedev() || sin

From: <git_AT_suckless.org>
Date: Sun, 4 Oct 2015 17:39:32 +0200 (CEST)

commit f14a8968913a4a86064b1688790880bb94fe5a53
Author: sin <sin_AT_2f30.org>
AuthorDate: Sun Oct 4 16:36:39 2015 +0100
Commit: sin <sin_AT_2f30.org>
CommitDate: Sun Oct 4 16:39:28 2015 +0100

    Stop defining major()/minor() and makedev()
    
    Rely on what the system provides. These are not standardized macros
    but any relevant UNIX system will provide them.
    
    We can revisit this in the future if something breaks.

diff --git a/tar.c b/tar.c
index 8dbce22..16c3da0 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -17,13 +17,6 @@
 
 #define BLKSIZ 512
 
-#undef major
-#define major(dev) ((int)(((unsigned int)(dev) >> 8) & 0xff))
-#undef minor
-#define minor(dev) ((int)((dev) & 0xff))
-#undef makedev
-#define makedev(major, minor) (((major) << 8) | (minor))
-
 enum Type {
         REG = '0',
         AREG = '\0',
Received on Sun Oct 04 2015 - 17:39:32 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 04 2015 - 17:48:09 CEST