# Checks for header files.
AC_HEADER_STDC
+AC_HEADER_MAJOR
AC_CHECK_HEADERS([ctype.h fcntl.h libgen.h libintl.h limits.h locale.h \
mntent.h stddef.h stdint.h stdlib.h stdio.h stdarg.h string.h \
strings.h errno.h time.h unistd.h utime.h wchar.h getopt.h features.h \
regex.h endian.h byteswap.h sys/byteorder.h sys/disk.h sys/endian.h \
- sys/param.h sys/ioctl.h sys/mkdev.h sys/mount.h sys/stat.h sys/types.h \
- sys/vfs.h sys/statvfs.h sys/sysmacros.h linux/major.h linux/fd.h \
+ sys/param.h sys/ioctl.h sys/mount.h sys/stat.h sys/types.h \
+ sys/vfs.h sys/statvfs.h linux/major.h linux/fd.h \
linux/fs.h inttypes.h linux/hdreg.h \
machine/endian.h windows.h syslog.h pwd.h malloc.h])
#include <limits.h>
#include <errno.h>
-#if defined(__sun) && defined (__SVR4)
-#ifdef HAVE_SYS_MKDEV_H
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#endif
-#endif /* defined(__sun) && defined (__SVR4) */
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
#define PARAM(inarg) (((const char *)(inarg)) + sizeof(*(inarg)))
#define OFFSET_MAX 0x7fffffffffffffffLL
#include <sys/stat.h>
#endif
-#if defined(__sun) && defined (__SVR4)
-#ifdef HAVE_SYS_MKDEV_H
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#endif
-#else /* defined(__sun) && defined (__SVR4) */
-#ifdef HAVE_SYS_SYSMACROS_H
+#ifdef MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
#endif
-#endif /* defined(__sun) && defined (__SVR4) */
#include "param.h"
#include "types.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_MKDEV_H
+#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
#if defined(__APPLE__) || defined(__DARWIN__)
#include <sys/dirent.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_MKDEV_H
+#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#endif
+#ifdef MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
#if defined(__APPLE__) || defined(__DARWIN__)
#include <sys/dirent.h>