Portability: Use some autoconf magic to include the

correct headers for major()/minor()/makedev() on various
platforms.

Thanks to: Darin Broady
This commit is contained in:
kientzle 2005-11-08 03:52:42 +00:00
parent 73a216f99c
commit 6f0c8478d1
4 changed files with 28 additions and 0 deletions

View File

@ -29,6 +29,13 @@ __FBSDID("$FreeBSD$");
#include <sys/stat.h>
#include <sys/types.h>
#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#else
#ifdef MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
#endif
#endif
#ifdef HAVE_EXT2FS_EXT2_FS_H
#include <ext2fs/ext2_fs.h> /* for Linux file flags */
#endif

View File

@ -28,6 +28,13 @@
__FBSDID("$FreeBSD$");
#include <sys/stat.h>
#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#else
#ifdef MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
#endif
#endif
#include <errno.h>
#include <stddef.h>
/* #include <stdint.h> */ /* See archive_platform.h */

View File

@ -28,6 +28,13 @@
__FBSDID("$FreeBSD$");
#include <sys/stat.h>
#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#else
#ifdef MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
#endif
#endif
#include <errno.h>
#include <stdlib.h>
#include <string.h>

View File

@ -28,6 +28,13 @@
__FBSDID("$FreeBSD$");
#include <sys/stat.h>
#ifdef MAJOR_IN_MKDEV
#include <sys/mkdev.h>
#else
#ifdef MAJOR_IN_SYSMACROS
#include <sys/sysmacros.h>
#endif
#endif
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>