diff options
author | David Zeuthen <david@fubar.dk> | 2005-06-27 14:52:03 +0000 |
---|---|---|
committer | David Zeuthen <david@fubar.dk> | 2005-06-27 14:52:03 +0000 |
commit | bc1d89a8068288bc7bde39f632c14a0efbd9e9fd (patch) | |
tree | dbf7d16668ef0b0d8a49b6bf85dbe148f8350627 | |
parent | 09e949953ea0906f790551507cea6a0e42f1337c (diff) |
Include stdint.h to get uint8_t and friends so we compile on Linux.
This patch check for some internal Linux kernel types and redefine it using
the standard system types. It also removes the a private Linux kernel
include. Patch from Alvaro Lopez Ortega <alvaro@sun.com>.
34 files changed, 25 insertions, 31 deletions
@@ -1,5 +1,17 @@ 2005-06-27 David Zeuthen <davidz@redhat.com> + * volume_id/util.h: Include stdint.h to get uint8_t and friends so + we compile on Linux. + +2005-06-27 David Zeuthen <davidz@redhat.com> + + * configure.in, volume_id/*.c: This patch check for some internal + Linux kernel types and redefine it using the standard system + types. It also removes the a private Linux kernel include. Patch + from Alvaro Lopez Ortega <alvaro@sun.com>. + +2005-06-27 David Zeuthen <davidz@redhat.com> + Patch from Alvaro Lopez Ortega <alvaro@sun.com>. * volume_id/dasd.c: Use HAVE_SYS_IOCCOM_H to conditionally include diff --git a/configure.in b/configure.in index e1aad632..daa8c2a5 100644 --- a/configure.in +++ b/configure.in @@ -35,6 +35,17 @@ AC_SYS_LARGEFILE AC_CHECK_HEADERS([sys/ioccom.h]) +AC_CHECK_TYPE(__u8, , + [AC_DEFINE(__s8, int8_t, [Signed 8 bits type]) + AC_DEFINE(__u8, uint8_t, [Unsigned 8 bits type]) + AC_DEFINE(__s16, int16_t, [Signed 16 bits type]) + AC_DEFINE(__u16, uint16_t, [Unsigned 16 bits type]) + AC_DEFINE(__s32, int32_t, [Signed 32 bits type]) + AC_DEFINE(__u32, uint32_t, [Unsigned 32 bits type]) + AC_DEFINE(__s64, int64_t, [Signed 64 bits type]) + AC_DEFINE(__u64, uint64_t, [Unsigned 64 bits type])], + /usr/include/sys/types.h) + AC_ARG_WITH(os-type, [ --with-os-type=<os> Distribution or OS (redhat)]) AC_ARG_WITH(pid-file, [ --with-pid-file=<file> PID file for HAL daemon]) AC_ARG_WITH(hwdata,[ --with-hwdata=<dir> where PCI and USB IDs are found (auto)]) diff --git a/volume_id/cramfs.c b/volume_id/cramfs.c index 0c768600..401fe1e3 100644 --- a/volume_id/cramfs.c +++ b/volume_id/cramfs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/dasd.c b/volume_id/dasd.c index c414e4dd..38012d50 100644 --- a/volume_id/dasd.c +++ b/volume_id/dasd.c @@ -32,7 +32,6 @@ #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> -#include <asm/types.h> #ifdef HAVE_SYS_IOCCOM_H # include <sys/ioccom.h> diff --git a/volume_id/ext.c b/volume_id/ext.c index 47836421..15e410f6 100644 --- a/volume_id/ext.c +++ b/volume_id/ext.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "util.h" diff --git a/volume_id/fat.c b/volume_id/fat.c index f6d36997..3e305c02 100644 --- a/volume_id/fat.c +++ b/volume_id/fat.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/hfs.c b/volume_id/hfs.c index 8c409750..03d9959d 100644 --- a/volume_id/hfs.c +++ b/volume_id/hfs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/highpoint.c b/volume_id/highpoint.c index 938a8934..e4d3bb58 100644 --- a/volume_id/highpoint.c +++ b/volume_id/highpoint.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/hpfs.c b/volume_id/hpfs.c index 96c63d5e..8007f586 100644 --- a/volume_id/hpfs.c +++ b/volume_id/hpfs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/iso9660.c b/volume_id/iso9660.c index 5d4ab92a..faa69c5c 100644 --- a/volume_id/iso9660.c +++ b/volume_id/iso9660.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/isw_raid.c b/volume_id/isw_raid.c index c703f3fe..e9dcd242 100644 --- a/volume_id/isw_raid.c +++ b/volume_id/isw_raid.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/jfs.c b/volume_id/jfs.c index 77fa0953..1d9776ef 100644 --- a/volume_id/jfs.c +++ b/volume_id/jfs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/linux_raid.c b/volume_id/linux_raid.c index 598002ec..cd808464 100644 --- a/volume_id/linux_raid.c +++ b/volume_id/linux_raid.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/linux_swap.c b/volume_id/linux_swap.c index e37a79be..2e0b1f5b 100644 --- a/volume_id/linux_swap.c +++ b/volume_id/linux_swap.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/lsi_raid.c b/volume_id/lsi_raid.c index e411fbc2..29358871 100644 --- a/volume_id/lsi_raid.c +++ b/volume_id/lsi_raid.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/luks.c b/volume_id/luks.c index a00bf404..450cba82 100644 --- a/volume_id/luks.c +++ b/volume_id/luks.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "util.h" diff --git a/volume_id/lvm.c b/volume_id/lvm.c index d1e337dc..bf186c85 100644 --- a/volume_id/lvm.c +++ b/volume_id/lvm.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/mac.c b/volume_id/mac.c index dcfacc2a..7eaf65d7 100644 --- a/volume_id/mac.c +++ b/volume_id/mac.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/minix.c b/volume_id/minix.c index d2f2a336..f8767f78 100644 --- a/volume_id/minix.c +++ b/volume_id/minix.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/msdos.c b/volume_id/msdos.c index 47c94456..5c90428d 100644 --- a/volume_id/msdos.c +++ b/volume_id/msdos.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/ntfs.c b/volume_id/ntfs.c index f9df0e9c..89079cd0 100644 --- a/volume_id/ntfs.c +++ b/volume_id/ntfs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/nvidia_raid.c b/volume_id/nvidia_raid.c index ad766317..769e3dba 100644 --- a/volume_id/nvidia_raid.c +++ b/volume_id/nvidia_raid.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/promise_raid.c b/volume_id/promise_raid.c index 8fda1494..08d9d724 100644 --- a/volume_id/promise_raid.c +++ b/volume_id/promise_raid.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/reiserfs.c b/volume_id/reiserfs.c index 34cf167d..865f777d 100644 --- a/volume_id/reiserfs.c +++ b/volume_id/reiserfs.c @@ -33,7 +33,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/romfs.c b/volume_id/romfs.c index 9c2b41bb..2493d581 100644 --- a/volume_id/romfs.c +++ b/volume_id/romfs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/silicon_raid.c b/volume_id/silicon_raid.c index e528a34c..c657b23c 100644 --- a/volume_id/silicon_raid.c +++ b/volume_id/silicon_raid.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/sysv.c b/volume_id/sysv.c index d4745daa..a527fcd6 100644 --- a/volume_id/sysv.c +++ b/volume_id/sysv.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/udf.c b/volume_id/udf.c index a378fa9f..cb5d7c91 100644 --- a/volume_id/udf.c +++ b/volume_id/udf.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/ufs.c b/volume_id/ufs.c index d4f4db3d..b118f995 100644 --- a/volume_id/ufs.c +++ b/volume_id/ufs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/util.c b/volume_id/util.c index 7499fc12..ff2c5088 100644 --- a/volume_id/util.c +++ b/volume_id/util.c @@ -34,7 +34,6 @@ #include <ctype.h> #include <fcntl.h> #include <sys/stat.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/util.h b/volume_id/util.h index 9cea8fc3..c642e864 100644 --- a/volume_id/util.h +++ b/volume_id/util.h @@ -29,6 +29,8 @@ # include <config.h> #endif +#include <stdint.h> + /* size of superblock buffer, reiserfs block is at 64k */ #define SB_BUFFER_SIZE 0x11000 /* size of seek buffer, FAT cluster is 32k max */ diff --git a/volume_id/via_raid.c b/volume_id/via_raid.c index 393890eb..2dc8fc9e 100644 --- a/volume_id/via_raid.c +++ b/volume_id/via_raid.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/volume_id.c b/volume_id/volume_id.c index 3fe8562e..de0f1cce 100644 --- a/volume_id/volume_id.c +++ b/volume_id/volume_id.c @@ -35,7 +35,6 @@ #include <ctype.h> #include <fcntl.h> #include <sys/stat.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" diff --git a/volume_id/xfs.c b/volume_id/xfs.c index b8702a3f..caa73827 100644 --- a/volume_id/xfs.c +++ b/volume_id/xfs.c @@ -32,7 +32,6 @@ #include <string.h> #include <errno.h> #include <ctype.h> -#include <asm/types.h> #include "volume_id.h" #include "logging.h" |