From d425a4cd3dded853aaefbca8873c95845933d383 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Apr 2012 15:31:23 -0700 Subject: On advice from Jelmer and Andrew, move the blksize_t and blkcnt_t tests into libreplace to make it standalone. Autobuild-User: Jeremy Allison Autobuild-Date: Tue Apr 10 04:07:11 CEST 2012 on sn-devel-104 --- lib/replace/libreplace.m4 | 12 ++++++++++++ lib/replace/replace.h | 8 -------- lib/replace/wscript | 2 ++ 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/replace/libreplace.m4 b/lib/replace/libreplace.m4 index 72de91799c..df3d4c8fca 100644 --- a/lib/replace/libreplace.m4 +++ b/lib/replace/libreplace.m4 @@ -60,6 +60,18 @@ AC_STRUCT_ST_RDEV AC_CHECK_TYPE(ino_t,unsigned) AC_CHECK_TYPE(loff_t,off_t) AC_CHECK_TYPE(offset_t,loff_t) +AC_CHECK_TYPE([blksize_t],, + [AC_DEFINE_UNQUOTED([blksize_t], [long], + [Define to `long' if + does not define it.])], + [], + [[#include ]]) +AC_CHECK_TYPE([blkcnt_t],, + [AC_DEFINE_UNQUOTED([blkcnt_t], [long], + [Define to `long' if + does not define it.])], + [], + [[#include ]]) AC_FUNC_MEMCMP diff --git a/lib/replace/replace.h b/lib/replace/replace.h index debd4dae3c..776da8aa4a 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -841,12 +841,4 @@ typedef long useconds_t; int usleep(useconds_t); #endif -#ifndef HAVE_BLKSIZE_T -typedef long blksize_t; -#endif - -#ifndef HAVE_BLKCNT_T -typedef long blkcnt_t; -#endif - #endif /* _LIBREPLACE_REPLACE_H */ diff --git a/lib/replace/wscript b/lib/replace/wscript index 025dda460d..d7b0634f3f 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -91,6 +91,8 @@ def configure(conf): conf.CHECK_TYPE('offset_t', 'loff_t') conf.CHECK_TYPE('volatile int', define='HAVE_VOLATILE') conf.CHECK_TYPE('uint_t', 'unsigned int') + conf.CHECK_TYPE('blksize_t', 'long', headers='sys/types.h sys/stat.h unistd.h') + conf.CHECK_TYPE('blkcnt_t', 'long', headers='sys/types.h sys/stat.h unistd.h') conf.CHECK_SIZEOF('bool char int "long long" long short size_t ssize_t') conf.CHECK_SIZEOF('int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t') -- cgit