]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/alac-decoder/remove_stdint_headers.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / alac-decoder / remove_stdint_headers.patch
1 diff --git a/alac.c b/alac.c
2 index 469000d..c6fe479 100644
3 --- a/alac.c
4 +++ b/alac.c
5 @@ -33,11 +33,7 @@
6 #include <stdio.h>
7 #include <stdlib.h>
8 #include <string.h>
9 -#ifdef _WIN32
10 - #include "stdint_win.h"
11 -#else
12 - #include <stdint.h>
13 -#endif
14 +#include <stdint.h>
15
16 #include "decomp.h"
17
18 @@ -54,7 +50,7 @@
19 struct {signed int x:24;} se_struct_24;
20 #define SignExtend24(val) (se_struct_24.x = val)
21
22 -extern int host_bigendian;
23 +#define host_bigendian set_endian()
24
25 struct alac_file
26 {
27 diff --git a/decomp.h b/decomp.h
28 index 23dbc52..679a320 100644
29 --- a/decomp.h
30 +++ b/decomp.h
31 @@ -8,6 +8,7 @@ void decode_frame(alac_file *alac,
32 unsigned char *inbuffer,
33 void *outbuffer, int *outputsize);
34 void alac_set_info(alac_file *alac, char *inputbuffer);
35 +int set_endian();
36
37 #endif /* __ALAC__DECOMP_H */
38
39 diff --git a/demux.c b/demux.c
40 index ae77a9d..9e858a9 100644
41 --- a/demux.c
42 +++ b/demux.c
43 @@ -33,11 +33,7 @@
44 #include <string.h>
45 #include <stdio.h>
46 #include <stdlib.h>
47 -#ifdef _WIN32
48 - #include "stdint_win.h"
49 -#else
50 - #include <stdint.h>
51 -#endif
52 +#include <stdint.h>
53
54 #include "stream.h"
55 #include "demux.h"
56 diff --git a/demux.h b/demux.h
57 index 8447bf8..8874ba4 100644
58 --- a/demux.h
59 +++ b/demux.h
60 @@ -1,11 +1,8 @@
61 #ifndef DEMUX_H
62 #define DEMUX_H
63
64 -#ifdef _WIN32
65 - #include "stdint_win.h"
66 -#else
67 - #include <stdint.h>
68 -#endif
69 +
70 +#include <stdint.h>
71
72 #include "stream.h"
73
74 diff --git a/main.c b/main.c
75 index 7449ca1..dd58699 100644
76 --- a/main.c
77 +++ b/main.c
78 @@ -37,11 +37,7 @@
79 #include <stdlib.h>
80 #include <errno.h>
81 #include <string.h>
82 -#ifdef _WIN32
83 - #include "stdint_win.h"
84 -#else
85 - #include <stdint.h>
86 -#endif
87 +#include <stdint.h>
88
89 #include "demux.h"
90 #include "decomp.h"
91 @@ -267,19 +263,7 @@ static void setup_environment(int argc, char **argv)
92 }
93 }
94
95 -/* this could quite easily be done at compile time,
96 - * however I don't want to have to bother with all the
97 - * various possible #define's for endianness, worrying about
98 - * different compilers etc. and I'm too lazy to use autoconf.
99 - */
100 -void set_endian()
101 -{
102 - uint32_t integer = 0x000000aa;
103 - unsigned char *p = (unsigned char*)&integer;
104
105 - if (p[0] == 0xaa) host_bigendian = 0;
106 - else host_bigendian = 1;
107 -}
108
109 int main(int argc, char **argv)
110 {
111 @@ -288,7 +272,7 @@ int main(int argc, char **argv)
112
113 memset(&demux_res, 0, sizeof(demux_res));
114
115 - set_endian();
116 + host_bigendian = set_endian();
117
118 setup_environment(argc, argv);
119
120 diff --git a/stream.c b/stream.c
121 index 565db54..56727a0 100644
122 --- a/stream.c
123 +++ b/stream.c
124 @@ -33,13 +33,10 @@
125 #include <stdio.h>
126 #include <stdlib.h>
127 #include <errno.h>
128 -#ifdef _WIN32
129 - #include "stdint_win.h"
130 -#else
131 - #include <stdint.h>
132 -#endif
133 +#include <stdint.h>
134
135 #include "stream.h"
136 +#include "decomp.h"
137
138 #define _Swap32(v) do { \
139 v = (((v) & 0x000000FF) << 0x18) | \
140 @@ -51,7 +48,7 @@
141 v = (((v) & 0x00FF) << 0x08) | \
142 (((v) & 0xFF00) >> 0x08); } while (0)
143
144 -extern int host_bigendian;
145 +#define host_bigendian set_endian()
146
147 struct stream_tTAG {
148 FILE *f;
149 diff --git a/stream.h b/stream.h
150 index 18d6aa0..ff6325e 100644
151 --- a/stream.h
152 +++ b/stream.h
153 @@ -3,11 +3,8 @@
154
155 /* stream.h */
156
157 -#ifdef _WIN32
158 - #include "stdint_win.h"
159 -#else
160 - #include <stdint.h>
161 -#endif
162 +#include <stdint.h>
163 +
164
165 typedef struct stream_tTAG stream_t;
166
167 diff --git a/wavwriter.c b/wavwriter.c
168 index fd19502..ce941c7 100644
169 --- a/wavwriter.c
170 +++ b/wavwriter.c
171 @@ -32,11 +32,8 @@
172
173 #include <stdio.h>
174 #include <stdlib.h>
175 -#ifdef _WIN32
176 - #include "stdint_win.h"
177 -#else
178 - #include <stdint.h>
179 -#endif
180 +#include <stdint.h>
181 +
182
183 #ifndef MAKEFOURCC
184 #define MAKEFOURCC(ch0, ch1, ch2, ch3) ( \
185 @@ -56,7 +53,7 @@
186 v = (((v) & 0x00FF) << 0x08) | \
187 (((v) & 0xFF00) >> 0x08); } while (0)
188
189 -extern int host_bigendian;
190 +#define host_bigendian set_endian()
191
192 static void write_uint32(FILE *f, uint32_t v, int bigendian)
193 {