1
0

internal.h 958 B

1234567891011121314151617181920212223242526272829303132333435
  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 <[email protected]>
  9. ** Campus Information Technologies and Educational Services
  10. ** University of Illinois at Urbana-Champaign
  11. */
  12. #include <libtar/config.h>
  13. #include <libtar/compat.h>
  14. #include <libtar/libtar.h>
  15. #ifdef HAVE_SYS_SYSMACROS_H
  16. #include <sys/sysmacros.h>
  17. #endif
  18. #ifndef HAVE_MAJOR
  19. # define major(dev) ((int)(((dev) >> 8) & 0xff))
  20. #endif
  21. #ifndef HAVE_MINOR
  22. # define minor(dev) ((int)((dev) & 0xff))
  23. #endif
  24. /* On Cray XT3 when using thr PGI pgcc 7.0.4 sys/sysmacros.h ends up without
  25. makedev(), since __i386__ is not defined when GLIBC_HAVE_LONG_LONG should
  26. be enabled in features.h */
  27. #ifndef HAVE_MAKEDEV
  28. # define makedev(major, minor) ((((int)((major) & 0xff)) << 8 ) \
  29. | ((int)((minor) & 0xff)) )
  30. #endif