Move blksize_t and blkcnt_t to replace.h from includes.h. Should help with platforms...
authorJeremy Allison <jra@samba.org>
Mon, 9 Apr 2012 18:04:07 +0000 (11:04 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 9 Apr 2012 19:40:40 +0000 (21:40 +0200)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr  9 21:40:42 CEST 2012 on sn-devel-104

lib/replace/README
lib/replace/replace.h
source3/configure.in
source3/include/includes.h
source3/wscript

index 787ee858123bc3fa900e6dae7c59c9e4efe6cb5c..5399971afec8d176ad01eb914f94a0d30a966820 100644 (file)
@@ -81,6 +81,8 @@ uint{8,16,32,64}_t
 int{8,16,32,64}_t
 intptr_t
 sig_atomic_t
+blksize_t
+blkcnt_t
 
 Constants:
 PATH_NAME_MAX
index 776da8aa4a13d97cf64d044ef942802c50de1ed4..debd4dae3c22856e290b9adeea8817b4239ca25d 100644 (file)
@@ -841,4 +841,12 @@ 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 */
index 98714d5dd2045e6a51c3af7d4df359e1dd039c6a..bc8afc007dd359f306cd6ef1dd3602c76ebf95e9 100644 (file)
@@ -2943,6 +2943,9 @@ AC_TRY_RUN([
 #endif
 #include <stdio.h>
 #include <sys/stat.h>
+#ifndef HAVE_BLKCNT_T
+typedef long blkcnt_t;
+#endif
 main() { exit((sizeof(blkcnt_t) == 4) ? 0 : 1); }],
 samba_cv_SIZEOF_BLKCNT_T_4=yes,samba_cv_SIZEOF_BLKCNT_T_4=no,samba_cv_SIZEOF_BLKCNT_T_4=cross)])
 if test x"$samba_cv_SIZEOF_BLKCNT_T_4" = x"yes"; then
@@ -2956,6 +2959,9 @@ AC_TRY_RUN([
 #endif
 #include <stdio.h>
 #include <sys/stat.h>
+#ifndef HAVE_BLKCNT_T
+typedef long blkcnt_t;
+#endif
 main() { exit((sizeof(blkcnt_t) == 8) ? 0 : 1); }],
 samba_cv_SIZEOF_BLKCNT_T_8=yes,samba_cv_SIZEOF_BLKCNT_T_8=no,samba_cv_SIZEOF_BLKCNT_T_8=cross)])
 if test x"$samba_cv_SIZEOF_BLKCNT_T_8" = x"yes"; then
index 7bdd20074a44e7c1fe464a8f97e952836681335e..88b8b4fef22020185abb1a27a417fdeb378abe45 100644 (file)
@@ -317,16 +317,6 @@ typedef uint64_t br_off;
 #define SOFF_T_R(p, ofs, v) (SIVAL(p,(ofs)+4,(v)&0xFFFFFFFF), SIVAL(p,ofs,(v)>>32))
 #define IVAL_TO_SMB_OFF_T(buf,off) ((off_t)(( ((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF) )))
 
-#ifndef HAVE_BLKSIZE_T
-/* This is mainly for HP/UX which defines st_blksize as long */
-typedef long blksize_t;
-#endif
-
-#ifndef HAVE_BLKCNT_T
-/* This is mainly for HP/UX which doesn't have blkcnt_t */
-typedef long blkcnt_t;
-#endif
-
 /*
  * Type for stat structure.
  */
index 28ef0d932f1fd4acc64473fcaaaf741c69d07f65..3c8df0a0769bb5c3d165e339712eb6ac515f3c45 100644 (file)
@@ -178,14 +178,14 @@ main() {
        conf.CHECK_CODE('''
        return sizeof(blkcnt_t) == 4 ? 0 : 1''',
                'SIZEOF_BLKCNT_T_4', execute=True,
-               headers='sys/types.h sys/stat.h unistd.h',
+               headers='replace.h sys/types.h sys/stat.h unistd.h',
                msg="Checking whether blkcnt_t is 32 bit")
 
     if "HAVE_BLKCNT_T" in conf.env:
        conf.CHECK_CODE('''
        return sizeof(blkcnt_t) == 8 ? 0 : 1''',
                'SIZEOF_BLKCNT_T_8', execute=True,
-               headers='sys/types.h sys/stat.h unistd.h',
+               headers='replace.h sys/types.h sys/stat.h unistd.h',
                msg="Checking whether blkcnt_t is 64 bit")
 
     # Check for POSIX capability support