sbonazzo / rpms / cyrus-sasl

Forked from rpms/cyrus-sasl 2 years ago
Clone

Blame SOURCES/cyrus-sasl-2.1.21-sizes.patch

c4de4d
diff -up cyrus-sasl-2.1.27/configure.ac.sizes cyrus-sasl-2.1.27/configure.ac
c4de4d
--- cyrus-sasl-2.1.27/configure.ac.sizes	2015-11-18 09:46:24.000000000 +0100
c4de4d
+++ cyrus-sasl-2.1.27/configure.ac	2015-11-20 15:11:20.474588247 +0100
c4de4d
@@ -1312,6 +1312,10 @@ AC_HEADER_STDC
c4de4d
 AC_HEADER_DIRENT
c4de4d
 AC_HEADER_SYS_WAIT
c4de4d
 AC_CHECK_HEADERS(crypt.h des.h dlfcn.h fcntl.h limits.h malloc.h paths.h strings.h sys/file.h sys/time.h syslog.h unistd.h inttypes.h sys/uio.h sys/param.h sysexits.h stdarg.h varargs.h krb5.h)
c4de4d
+AC_CHECK_TYPES([long long, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t],,,[
c4de4d
+#ifdef HAVE_INTTYPES_H
c4de4d
+#include <inttypes.h>
c4de4d
+#endif])
c4de4d
 
c4de4d
 IPv6_CHECK_SS_FAMILY()
c4de4d
 IPv6_CHECK_SA_LEN()
c4de4d
diff -up cyrus-sasl-2.1.27/include/makemd5.c.sizes cyrus-sasl-2.1.27/include/makemd5.c
c4de4d
--- cyrus-sasl-2.1.27/include/makemd5.c.sizes	2015-10-15 15:44:43.000000000 +0200
c4de4d
+++ cyrus-sasl-2.1.27/include/makemd5.c	2015-11-20 15:11:20.477588240 +0100
c4de4d
@@ -82,12 +82,19 @@
c4de4d
  */
c4de4d
 
c4de4d
 
c4de4d
+#ifdef HAVE_CONFIG_H
c4de4d
+#include "../config.h"
c4de4d
+#endif
c4de4d
 
c4de4d
 #include <stdio.h>
c4de4d
 #include <string.h>
c4de4d
 #include <stdlib.h>
c4de4d
 #include <ctype.h>
c4de4d
 
c4de4d
+#ifdef HAVE_INTTYPES_H
c4de4d
+#include <inttypes.h>
c4de4d
+#endif
c4de4d
+
c4de4d
 
c4de4d
 static void
c4de4d
 my_strupr(char *s)
c4de4d
@@ -122,6 +129,18 @@ my_strupr(char *s)
c4de4d
 static void
c4de4d
 try_signed(FILE *f, int len)
c4de4d
 {
c4de4d
+#ifdef HAVE_INT8_T
c4de4d
+    BITSIZE(int8_t);
c4de4d
+#endif
c4de4d
+#ifdef HAVE_INT16_T
c4de4d
+    BITSIZE(int16_t);
c4de4d
+#endif
c4de4d
+#ifdef HAVE_INT32_T
c4de4d
+    BITSIZE(int32_t);
c4de4d
+#endif
c4de4d
+#ifdef HAVE_INT64_T
c4de4d
+    BITSIZE(int64_t);
c4de4d
+#endif
c4de4d
     BITSIZE(signed char);
c4de4d
     BITSIZE(short);
c4de4d
     BITSIZE(int);
c4de4d
@@ -135,6 +154,18 @@ try_signed(FILE *f, int len)
c4de4d
 static void
c4de4d
 try_unsigned(FILE *f, int len)
c4de4d
 {
c4de4d
+#ifdef HAVE_UINT8_T
c4de4d
+    BITSIZE(uint8_t);
c4de4d
+#endif
c4de4d
+#ifdef HAVE_UINT16_T
c4de4d
+    BITSIZE(uint16_t);
c4de4d
+#endif
c4de4d
+#ifdef HAVE_UINT32_T
c4de4d
+    BITSIZE(uint32_t);
c4de4d
+#endif
c4de4d
+#ifdef HAVE_UINT64_T
c4de4d
+    BITSIZE(uint64_t);
c4de4d
+#endif
c4de4d
     BITSIZE(unsigned char);
c4de4d
     BITSIZE(unsigned short);
c4de4d
     BITSIZE(unsigned int);
c4de4d
@@ -165,6 +196,11 @@ static int print_pre(FILE *f)
c4de4d
 	  "/* POINTER defines a generic pointer type */\n"
c4de4d
 	  "typedef unsigned char *POINTER;\n"
c4de4d
 	  "\n"
c4de4d
+#ifdef HAVE_INTTYPES_H
c4de4d
+	  "/* We try to define integer types for our use */\n"
c4de4d
+	  "#include <inttypes.h>\n"
c4de4d
+	  "\n"
c4de4d
+#endif
c4de4d
 	  );
c4de4d
   return 1;
c4de4d
 }
c4de4d
@@ -212,31 +248,15 @@ int main(int argc, char **argv)
c4de4d
 
c4de4d
   print_pre(f);
c4de4d
 
c4de4d
-#ifndef HAVE_INT8_T
c4de4d
     try_signed (f, 8);
c4de4d
-#endif /* HAVE_INT8_T */
c4de4d
-#ifndef HAVE_INT16_T
c4de4d
     try_signed (f, 16);
c4de4d
-#endif /* HAVE_INT16_T */
c4de4d
-#ifndef HAVE_INT32_T
c4de4d
     try_signed (f, 32);
c4de4d
-#endif /* HAVE_INT32_T */
c4de4d
-#ifndef HAVE_INT64_T
c4de4d
     try_signed (f, 64);
c4de4d
-#endif /* HAVE_INT64_T */
c4de4d
 
c4de4d
-#ifndef HAVE_U_INT8_T
c4de4d
     try_unsigned (f, 8);
c4de4d
-#endif /* HAVE_INT8_T */
c4de4d
-#ifndef HAVE_U_INT16_T
c4de4d
     try_unsigned (f, 16);
c4de4d
-#endif /* HAVE_U_INT16_T */
c4de4d
-#ifndef HAVE_U_INT32_T
c4de4d
     try_unsigned (f, 32);
c4de4d
-#endif /* HAVE_U_INT32_T */
c4de4d
-#ifndef HAVE_U_INT64_T
c4de4d
     try_unsigned (f, 64);
c4de4d
-#endif /* HAVE_U_INT64_T */
c4de4d
 
c4de4d
     print_post(f);
c4de4d