From 3786b6640e11482b4573dc0cf1ffabdf5f50cbbc Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 23 Dec 2009 14:14:35 +0200 Subject: [PATCH] Move major, minor + makedev portability stuff out of system.h, simplify - only cpio.c needs, move it there - if none of the standard headers define these, its not our headache anymore --- lib/cpio.c | 8 ++++++++ system.h | 20 -------------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/lib/cpio.c b/lib/cpio.c index 9003494..e71f7cb 100644 --- a/lib/cpio.c +++ b/lib/cpio.c @@ -9,6 +9,14 @@ #include "system.h" +#if MAJOR_IN_MKDEV +#include +#elif MAJOR_IN_SYSMACROS +#include +#else +#include /* already included from system.h */ +#endif + #include #include diff --git a/system.h b/system.h index bdcb3a7..83f3587 100644 --- a/system.h +++ b/system.h @@ -43,26 +43,6 @@ extern char ** environ; # endif #endif -/* Since major is a function on SVR4, we can't use `ifndef major'. */ -#if MAJOR_IN_MKDEV -#include -#define HAVE_MAJOR -#endif -#if MAJOR_IN_SYSMACROS -#include -#define HAVE_MAJOR -#endif -#ifdef major /* Might be defined in sys/types.h. */ -#define HAVE_MAJOR -#endif - -#ifndef HAVE_MAJOR -#define major(dev) (((dev) >> 8) & 0xff) -#define minor(dev) ((dev) & 0xff) -#define makedev(maj, min) (((maj) << 8) | (min)) -#endif -#undef HAVE_MAJOR - #ifdef HAVE_UTIME_H #include #endif -- 2.7.4