]> git.pld-linux.org Git - packages/cyrus-sasl.git/blame - cyrus-sasl-sizes.patch
- allow building without Nagios support
[packages/cyrus-sasl.git] / cyrus-sasl-sizes.patch
CommitLineData
8a17a363
JR
1Prefer types in <inttypes.h> to our own, because it removes file content
2conflicts between 32- and 64-bit architectures. RFEd as #2829.
3
5dd34792
JB
4--- cyrus-sasl-2.1.27/configure.ac.orig 2018-11-24 12:00:08.141550691 +0100
5+++ cyrus-sasl-2.1.27/configure.ac 2018-11-24 12:52:23.144848228 +0100
6@@ -1288,6 +1288,10 @@
8a17a363
JR
7 AC_HEADER_DIRENT
8 AC_HEADER_SYS_WAIT
5dd34792 9 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)
8a17a363
JR
10+AC_CHECK_TYPES([long long, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t],,,[
11+#ifdef HAVE_INTTYPES_H
12+#include <inttypes.h>
13+#endif])
14
15 IPv6_CHECK_SS_FAMILY()
16 IPv6_CHECK_SA_LEN()
17--- cyrus-sasl-2.1.21/include/makemd5.c 2003-02-13 14:55:52.000000000 -0500
18+++ cyrus-sasl-2.1.21/include/makemd5.c 2006-05-16 07:45:08.000000000 -0400
19@@ -82,12 +82,19 @@
20 */
21
22
23+#ifdef HAVE_CONFIG_H
24+#include "../config.h"
25+#endif
26
27 #include <stdio.h>
28 #include <string.h>
29 #include <stdlib.h>
30 #include <ctype.h>
31
32+#ifdef HAVE_INTTYPES_H
33+#include <inttypes.h>
34+#endif
35+
36
37 static void
38 my_strupr(char *s)
39@@ -122,6 +129,18 @@
40 static void
41 try_signed(FILE *f, int len)
42 {
43+#ifdef HAVE_INT8_T
44+ BITSIZE(int8_t);
45+#endif
46+#ifdef HAVE_INT16_T
47+ BITSIZE(int16_t);
48+#endif
49+#ifdef HAVE_INT32_T
50+ BITSIZE(int32_t);
51+#endif
52+#ifdef HAVE_INT64_T
53+ BITSIZE(int64_t);
54+#endif
55 BITSIZE(signed char);
56 BITSIZE(short);
57 BITSIZE(int);
58@@ -135,6 +154,18 @@
59 static void
60 try_unsigned(FILE *f, int len)
61 {
62+#ifdef HAVE_UINT8_T
63+ BITSIZE(uint8_t);
64+#endif
65+#ifdef HAVE_UINT16_T
66+ BITSIZE(uint16_t);
67+#endif
68+#ifdef HAVE_UINT32_T
69+ BITSIZE(uint32_t);
70+#endif
71+#ifdef HAVE_UINT64_T
72+ BITSIZE(uint64_t);
73+#endif
74 BITSIZE(unsigned char);
75 BITSIZE(unsigned short);
76 BITSIZE(unsigned int);
77@@ -165,6 +196,11 @@
78 "/* POINTER defines a generic pointer type */\n"
79 "typedef unsigned char *POINTER;\n"
80 "\n"
81+#ifdef HAVE_INTTYPES_H
82+ "/* We try to define integer types for our use */\n"
83+ "#include <inttypes.h>\n"
84+ "\n"
85+#endif
86 );
87 return 1;
88 }
89@@ -212,31 +248,15 @@
90
91 print_pre(f);
92
93-#ifndef HAVE_INT8_T
94 try_signed (f, 8);
95-#endif /* HAVE_INT8_T */
96-#ifndef HAVE_INT16_T
97 try_signed (f, 16);
98-#endif /* HAVE_INT16_T */
99-#ifndef HAVE_INT32_T
100 try_signed (f, 32);
101-#endif /* HAVE_INT32_T */
102-#ifndef HAVE_INT64_T
103 try_signed (f, 64);
104-#endif /* HAVE_INT64_T */
105
106-#ifndef HAVE_U_INT8_T
107 try_unsigned (f, 8);
108-#endif /* HAVE_INT8_T */
109-#ifndef HAVE_U_INT16_T
110 try_unsigned (f, 16);
111-#endif /* HAVE_U_INT16_T */
112-#ifndef HAVE_U_INT32_T
113 try_unsigned (f, 32);
114-#endif /* HAVE_U_INT32_T */
115-#ifndef HAVE_U_INT64_T
116 try_unsigned (f, 64);
117-#endif /* HAVE_U_INT64_T */
118
119 print_post(f);
120
This page took 0.074649 seconds and 4 git commands to generate.