Package: lde
Severity: important
Version: 2.6.0-7.1
Tags: patch
User: glibc-bsd-de...@lists.alioth.debian.org
Usertags: kfreebsd


Hi,

the current version fails to build on kfreebsd-amd64.

It needs a small tweak as on 64-bit achitectures is sizeof(long) = 8.
On all Debian architectures is sizeof(int) = 4. Please find attached patch with needed tweaks.

It would also be nice if you can ask upstream
to include this changes.

Thanks in advance

                        Petr
diff -u lde-2.6.0/macros/misctests.m4 lde-2.6.0/macros/misctests.m4
--- lde-2.6.0/macros/misctests.m4
+++ lde-2.6.0/macros/misctests.m4
@@ -140,19 +140,19 @@
 	fi
 				
         if test x$ac_cv_lde_haveu32 != xyes; then
-		AC_CHECK_TYPE(__u32, unsigned long)
+		AC_CHECK_TYPE(__u32, unsigned int)
 		if test x$ac_cv_type___u32 = xno ; then
-			AC_CHECK_SIZEOF(unsigned long,0)
-			if test x$ac_cv_sizeof_unsigned_long != x4 ; then
+			AC_CHECK_SIZEOF(unsigned int,0)
+			if test x$ac_cv_sizeof_unsigned_int != x4 ; then
 				AC_MSG_ERROR([Can't determine 32-bit unsigned type for this machine])
 			fi
 		fi
 	fi
         if test x$ac_cv_lde_haves32 != xyes; then
-		AC_CHECK_TYPE(__s32, long)
+		AC_CHECK_TYPE(__s32, int)
 		if test x$ac_cv_type___s32 = xno ; then
-			AC_CHECK_SIZEOF(long,0)
-			if test x$ac_cv_sizeof_long != x4 ; then
+			AC_CHECK_SIZEOF(int,0)
+			if test x$ac_cv_sizeof_int != x4 ; then
 				AC_MSG_ERROR([Can't determine 32-bit signed type for this machine])
 			fi
 		fi
diff -u lde-2.6.0/macros/configure lde-2.6.0/macros/configure
--- lde-2.6.0/macros/configure
+++ lde-2.6.0/macros/configure
@@ -2062,19 +2062,19 @@
 echo "$ac_t""$ac_cv_type___u32" 1>&6
 if test $ac_cv_type___u32 = no; then
   cat >> confdefs.h <<\EOF
-#define __u32 unsigned long
+#define __u32 unsigned int
 EOF
 
 fi
 
 		if test x$ac_cv_type___u32 = xno ; then
-			echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
-echo "configure:2073: checking size of unsigned long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
+			echo $ac_n "checking size of unsigned int""... $ac_c" 1>&6
+echo "configure:2073: checking size of unsigned int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_unsigned_long=0
+  ac_cv_sizeof_unsigned_int=0
 else
   cat > conftest.$ac_ext <<EOF
 #line 2081 "configure"
@@ -2085,30 +2085,30 @@
 {
   FILE *f=fopen("conftestval", "w");
   if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(unsigned long));
+  fprintf(f, "%d\n", sizeof(unsigned int));
   exit(0);
 }
 EOF
 if { (eval echo configure:2093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  ac_cv_sizeof_unsigned_long=`cat conftestval`
+  ac_cv_sizeof_unsigned_int=`cat conftestval`
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_sizeof_unsigned_long=0
+  ac_cv_sizeof_unsigned_int=0
 fi
 rm -fr conftest*
 fi
 
 fi
-echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
+echo "$ac_t""$ac_cv_sizeof_unsigned_int" 1>&6
 cat >> confdefs.h <<EOF
-#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
+#define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int
 EOF
 
 
-			if test x$ac_cv_sizeof_unsigned_long != x4 ; then
+			if test x$ac_cv_sizeof_unsigned_int != x4 ; then
 				{ echo "configure: error: Can't determine 32-bit unsigned type for this machine" 1>&2; exit 1; }
 			fi
 		fi
@@ -2142,19 +2142,19 @@
 echo "$ac_t""$ac_cv_type___s32" 1>&6
 if test $ac_cv_type___s32 = no; then
   cat >> confdefs.h <<\EOF
-#define __s32 long
+#define __s32 int
 EOF
 
 fi
 
 		if test x$ac_cv_type___s32 = xno ; then
-			echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2153: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+			echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:2153: checking size of int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_long=0
+  ac_cv_sizeof_int=0
 else
   cat > conftest.$ac_ext <<EOF
 #line 2161 "configure"
@@ -2165,30 +2165,30 @@
 {
   FILE *f=fopen("conftestval", "w");
   if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long));
+  fprintf(f, "%d\n", sizeof(int));
   exit(0);
 }
 EOF
 if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
-  ac_cv_sizeof_long=`cat conftestval`
+  ac_cv_sizeof_int=`cat conftestval`
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -fr conftest*
-  ac_cv_sizeof_long=0
+  ac_cv_sizeof_int=0
 fi
 rm -fr conftest*
 fi
 
 fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
 cat >> confdefs.h <<EOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
+#define SIZEOF_INT $ac_cv_sizeof_int
 EOF
 
 
-			if test x$ac_cv_sizeof_long != x4 ; then
+			if test x$ac_cv_sizeof_int != x4 ; then
 				{ echo "configure: error: Can't determine 32-bit signed type for this machine" 1>&2; exit 1; }
 			fi
 		fi

Reply via email to