-style fixes
[oweals/gnunet.git] / m4 / align.m4
index 256300e377902d73a789348b63eae0bf6045ce8e..7bcbae8fa4cbeb7da3df2f21117c3a782d1f764c 100644 (file)
@@ -11,11 +11,15 @@ dnl the same distribution terms as the rest of that program.
 # see some message along those lines on the console).
 AC_DEFUN([AC_UNALIGNED_64_ACCESS],
 [AC_CACHE_CHECK([whether unaligned 64-bit access works],
- ac_cv_unaligned_64_access, 
+ ac_cv_unaligned_64_access,
  [
- AC_RUN_IFELSE(AC_LANG_PROGRAM([[struct S { int a,b,c;};]],
-                               [[struct S s = {0,0,0}; long long * p = &s.b; 
-                                 long long x = *p; return (int) x*x;]]),
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[struct S { int a,b,c;};]],
+                               [[struct S s = {0,0,0}; long long * p = (long long *) &s.b;
+                                void *bp = malloc (50);
+                                long long x = *p;
+                                long long *be = (long long*) &bp[1];
+                                long long y = *be;
+                                return (int) x*y;]])],
  ac_cv_unaligned_64_access=yes,
  ac_cv_unaligned_64_access=no,
  ac_cv_unaligned_64_access=no)