From 09571aa76d8c1f4994abe48e5dad4746a04c288b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 10 Jan 2002 01:49:09 +0000 Subject: We need to test for major/minor macros. Jeremy. (This used to be commit ee8c8add7f83d7a794546769c59c85ef8bb5b89a) --- source3/configure.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index ed5bc605ef..864999332c 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -899,6 +899,30 @@ if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then AC_DEFINE(HAVE_STRUCT_DIRENT64) fi +AC_CACHE_CHECK([for major macro],samba_cv_HAVE_DEVICE_MAJOR_FN,[ +AC_TRY_RUN([ +#if defined(HAVE_UNISTD_H) +#include +#endif +#include +main() { dev_t dev; int i = major(dev); return 0; }], +samba_cv_HAVE_DEVICE_MAJOR_FN=yes,samba_cv_HAVE_DEVICE_MAJOR_FN=no,samba_cv_HAVE_DEVICE_MAJOR_FN=cross)]) +if test x"$samba_cv_HAVE_DEVICE_MAJOR_FN" = x"yes"; then + AC_DEFINE(HAVE_DEVICE_MAJOR_FN) +fi + +AC_CACHE_CHECK([for minor macro],samba_cv_HAVE_DEVICE_MINOR_FN,[ +AC_TRY_RUN([ +#if defined(HAVE_UNISTD_H) +#include +#endif +#include +main() { dev_t dev; int i = minor(dev); return 0; }], +samba_cv_HAVE_DEVICE_MINOR_FN=yes,samba_cv_HAVE_DEVICE_MINOR_FN=no,samba_cv_HAVE_DEVICE_MINOR_FN=cross)]) +if test x"$samba_cv_HAVE_DEVICE_MINOR_FN" = x"yes"; then + AC_DEFINE(HAVE_DEVICE_MINOR_FN) +fi + AC_CACHE_CHECK([for unsigned char],samba_cv_HAVE_UNSIGNED_CHAR,[ AC_TRY_RUN([#include main() { char c; c=250; exit((c > 0)?0:1); }], -- cgit