]>
Commit | Line | Data |
---|---|---|
8a17a363 JR |
1 | Prefer types in <inttypes.h> to our own, because it removes file content |
2 | conflicts between 32- and 64-bit architectures. RFEd as #2829. | |
3 | ||
4 | --- cyrus-sasl-2.1.21/configure.in 2006-05-16 07:37:52.000000000 -0400 | |
5 | +++ cyrus-sasl-2.1.21/configure.in 2006-05-16 07:37:52.000000000 -0400 | |
6 | @@ -1083,6 +1083,10 @@ | |
7 | AC_HEADER_DIRENT | |
8 | AC_HEADER_SYS_WAIT | |
9 | AC_CHECK_HEADERS(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) | |
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 |