ENH: make this work for older versions of OSX
[cmake.git] / Utilities / cmtar / internal.h
blobc1bba632b54c03133a5ab7ee2a09437a52f27b2d
1 /*
2 ** Copyright 2002-2003 University of Illinois Board of Trustees
3 ** Copyright 2002-2003 Mark D. Roth
4 ** All rights reserved.
5 **
6 ** internal.h - internal header file for libtar
7 **
8 ** Mark D. Roth <roth@uiuc.edu>
9 ** Campus Information Technologies and Educational Services
10 ** University of Illinois at Urbana-Champaign
13 #include <libtar/config.h>
14 #include <libtar/compat.h>
16 #include <libtar/libtar.h>
18 #ifdef HAVE_SYS_SYSMACROS_H
19 #include <sys/sysmacros.h>
20 #endif
22 #ifndef HAVE_MAJOR
23 # define major(dev) ((int)(((dev) >> 8) & 0xff))
24 #endif
25 #ifndef HAVE_MINOR
26 # define minor(dev) ((int)((dev) & 0xff))
27 #endif
28 /* On Cray XT3 when using thr PGI pgcc 7.0.4 sys/sysmacros.h ends up without
29 makedev(), since __i386__ is not defined when GLIBC_HAVE_LONG_LONG should
30 be enabled in features.h */
31 #ifndef HAVE_MAKEDEV
32 # define makedev(major, minor) ((((int)((major) & 0xff)) << 8 ) \
33 | ((int)((minor) & 0xff)) )
34 #endif