summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/faac/files/build-fix.patch
blob: 83cff8f89e14933ac824b73b5bc7bec27c9b1778 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
Patch fixing build error and warnings. Error consisted of redefining
strcasestr function from string.h. Warnings consisted of deprecated conversions
of string constants to char*, using '%llu' for type uint64_t (which on 64 bit
systems, is defined as unsigned long int by stdint.h), and using '==' for
equality of two strings.

Patch originally from Debian.

Upstream-Status: Pending

==========================================================================
--- a/common/mp4v2/mpeg4ip.h
+++ b/common/mp4v2/mpeg4ip.h
@@ -120,14 +120,6 @@
 #endif
 #include <sys/param.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-char *strcasestr(const char *haystack, const char *needle);
-#ifdef __cplusplus
-}
-#endif
-
 #define OPEN_RDWR O_RDWR
 #define OPEN_CREAT O_CREAT 
 #define OPEN_RDONLY O_RDONLY
@@ -135,7 +127,6 @@
 #define closesocket close
 #define IOSBINARY ios::bin
 
-#if SIZEOF_LONG == 8
 #define MAX_UINT64 -1LU
 #define D64F "ld"
 #define U64F  "lu"
@@ -143,15 +134,6 @@
 
 #define TO_D64(a) (a##L)
 #define TO_U64(a) (a##LU)
-#else
-#define MAX_UINT64 -1LLU
-#define D64F "lld"
-#define U64F  "llu"
-#define X64F "llx"
-
-#define TO_D64(a) (a##LL)
-#define TO_U64(a) (a##LLU)
-#endif
 
 #ifdef HAVE_FPOS_T___POS
 #define FPOS_TO_VAR(fpos, typed, var) (var) = (typed)((fpos).__pos)
--- a/configure.in
+++ b/configure.in
@@ -4,6 +4,9 @@
 AM_INIT_AUTOMAKE
 
 AM_CONFIG_HEADER(config.h)
+AH_TOP([#ifndef CONFIG_H
+#define CONFIG_H])
+AH_BOTTOM([#endif /* CONFIG_H */])
 
 AC_ARG_WITH( mp4v2,  [  --with-mp4v2            compile libmp4v2],WITHMP4V2=$withval, WITHMP4V2=yes)
 AC_ARG_ENABLE( drm,  [  --enable-drm            Digital Radio Mondiale support], enable_drm=$enableval, enable_drm=no)
--- a/common/mp4v2/atom_avcC.cpp
+++ b/common/mp4v2/atom_avcC.cpp
@@ -29,7 +29,7 @@
 class SizeTableProperty : public MP4TableProperty 
 {
  public:
-  SizeTableProperty(char *name, MP4IntegerProperty *pCountProperty) :
+  SizeTableProperty(const char *name, MP4IntegerProperty *pCountProperty) :
     MP4TableProperty(name, pCountProperty) {};
  protected:
   void ReadEntry(MP4File *pFile, u_int32_t index) {
--- a/common/mp4v2/atom_ohdr.cpp
+++ b/common/mp4v2/atom_ohdr.cpp
@@ -21,7 +21,7 @@
       \param useCountedFormat    counted format flag.
       \param useUnicode          unicode flag.
   */
-	OhdrMP4StringProperty(char* name, bool useCountedFormat = false,
+	OhdrMP4StringProperty(const char* name, bool useCountedFormat = false,
     bool useUnicode = false): MP4StringProperty(name, useCountedFormat,
     useUnicode) {
   }
--- a/common/mp4v2/atom_stz2.cpp
+++ b/common/mp4v2/atom_stz2.cpp
@@ -30,7 +30,7 @@
 class MP4HalfSizeTableProperty : public MP4TableProperty
 {
 public:
-  MP4HalfSizeTableProperty(char *name, MP4IntegerProperty *pCountProperty) :
+  MP4HalfSizeTableProperty(const char *name, MP4IntegerProperty *pCountProperty) :
     MP4TableProperty(name, pCountProperty) {};
 
   // The count is half the actual size
--- a/common/mp4v2/mp4atom.cpp
+++ b/common/mp4v2/mp4atom.cpp
@@ -806,7 +806,7 @@
 	AddProperty(new MP4Integer24Property("flags"));
 }
 
-void MP4Atom::AddReserved(char* name, u_int32_t size) 
+void MP4Atom::AddReserved(const char* name, u_int32_t size)
 {
 	MP4BytesProperty* pReserved = new MP4BytesProperty(name, size); 
 	pReserved->SetReadOnly();
--- a/common/mp4v2/mp4atom.h
+++ b/common/mp4v2/mp4atom.h
@@ -204,7 +204,7 @@
 
 	void AddVersionAndFlags();
 
-	void AddReserved(char* name, u_int32_t size);
+	void AddReserved(const char* name, u_int32_t size);
 
 	void ExpectChildAtom(const char* name, 
 		bool mandatory, bool onlyOne = true);
--- a/common/mp4v2/mp4file.cpp
+++ b/common/mp4v2/mp4file.cpp
@@ -718,7 +718,7 @@
 	}
 }
 
-void MP4File::ProtectWriteOperation(char* where)
+void MP4File::ProtectWriteOperation(const char* where)
 {
 	if (m_mode == 'r') {
 		throw new MP4Error("operation not permitted in read mode", where);
@@ -1274,7 +1274,7 @@
 }
 
 // NULL terminated list of brands which require the IODS atom
-char *brandsWithIods[] = { "mp42",
+const char *brandsWithIods[] = { "mp42",
                            "isom",
                            NULL};
 
@@ -2211,11 +2211,11 @@
 	for (u_int32_t i = 0; i < m_pTracks.Size(); i++) {
 		if (!strcmp(normType, m_pTracks[i]->GetType())) {
 			if (subType) {
-				if (normType == MP4_AUDIO_TRACK_TYPE) {
+				if (!strcmp(normType,MP4_AUDIO_TRACK_TYPE)) {
 					if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
 						continue;
 					}
-				} else if (normType == MP4_VIDEO_TRACK_TYPE) {
+				} else if (!strcmp(normType,MP4_VIDEO_TRACK_TYPE)) {
 					if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
 						continue;
 					}
@@ -2278,11 +2278,11 @@
   for (u_int32_t i = 0; i < m_pTracks.Size(); i++) {
     if (!strcmp(normType, m_pTracks[i]->GetType())) {
       if (subType) {
-	if (normType == MP4_AUDIO_TRACK_TYPE) {
+	if (!strcmp(normType,MP4_AUDIO_TRACK_TYPE)) {
 	  if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
 	    continue;
 	  }
-	} else if (normType == MP4_VIDEO_TRACK_TYPE) {
+	} else if (!strcmp(normType,MP4_VIDEO_TRACK_TYPE)) {
 	  if (subType != GetTrackEsdsObjectTypeId(m_pTracks[i]->GetId())) {
 	    continue;
 	  }
--- a/common/mp4v2/mp4file.h
+++ b/common/mp4v2/mp4file.h
@@ -700,7 +700,7 @@
 	const char* TempFileName();
 	void Rename(const char* existingFileName, const char* newFileName);
 
-	void ProtectWriteOperation(char* where);
+	void ProtectWriteOperation(const char* where);
 
 	void FindIntegerProperty(const char* name, 
 		MP4Property** ppProperty, u_int32_t* pIndex = NULL);
--- a/common/mp4v2/mp4property.cpp
+++ b/common/mp4v2/mp4property.cpp
@@ -313,7 +313,7 @@
 
 // MP4StringProperty
 
-MP4StringProperty::MP4StringProperty(char* name, 
+MP4StringProperty::MP4StringProperty(const char* name,
 	bool useCountedFormat, bool useUnicode)
 	: MP4Property(name)
 {
@@ -420,7 +420,7 @@
 
 // MP4BytesProperty
 
-MP4BytesProperty::MP4BytesProperty(char* name, u_int32_t valueSize,
+MP4BytesProperty::MP4BytesProperty(const char* name, u_int32_t valueSize,
                                    u_int32_t defaultValueSize)
 	: MP4Property(name)
 {
@@ -549,7 +549,7 @@
 
 // MP4TableProperty
 
-MP4TableProperty::MP4TableProperty(char* name, MP4IntegerProperty* pCountProperty)
+MP4TableProperty::MP4TableProperty(const char* name, MP4IntegerProperty* pCountProperty)
 	: MP4Property(name) 
 {
 	m_pCountProperty = pCountProperty;
@@ -725,7 +725,7 @@
 
 // MP4DescriptorProperty
   
-MP4DescriptorProperty::MP4DescriptorProperty(char* name, 
+MP4DescriptorProperty::MP4DescriptorProperty(const char* name,
 	u_int8_t tagsStart, u_int8_t tagsEnd, bool mandatory, bool onlyOne)
 	: MP4Property(name) 
 { 
--- a/common/mp4v2/mp4property.h
+++ b/common/mp4v2/mp4property.h
@@ -100,7 +100,7 @@
 
 class MP4IntegerProperty : public MP4Property {
 protected:
-	MP4IntegerProperty(char* name)
+	MP4IntegerProperty(const char* name)
 		: MP4Property(name) { };
 
 public:
@@ -118,7 +118,7 @@
 #define MP4INTEGER_PROPERTY_DECL2(isize, xsize) \
 	class MP4Integer##xsize##Property : public MP4IntegerProperty { \
 	public: \
-		MP4Integer##xsize##Property(char* name) \
+		MP4Integer##xsize##Property(const char* name) \
 			: MP4IntegerProperty(name) { \
 			SetCount(1); \
 			m_values[0] = 0; \
@@ -188,7 +188,7 @@
 
 class MP4BitfieldProperty : public MP4Integer64Property {
 public:
-	MP4BitfieldProperty(char* name, u_int8_t numBits)
+	MP4BitfieldProperty(const char* name, u_int8_t numBits)
 		: MP4Integer64Property(name) {
 		ASSERT(numBits != 0);
 		ASSERT(numBits <= 64);
@@ -213,7 +213,7 @@
 
 class MP4Float32Property : public MP4Property {
 public:
-	MP4Float32Property(char* name)
+	MP4Float32Property(const char* name)
 		: MP4Property(name) {
 		m_useFixed16Format = false;
 		m_useFixed32Format = false;
@@ -280,7 +280,7 @@
 
 class MP4StringProperty : public MP4Property {
 public:
-	MP4StringProperty(char* name, 
+	MP4StringProperty(const char* name,
 	  bool useCountedFormat = false, bool useUnicode = false);
 
 	~MP4StringProperty();
@@ -355,7 +355,7 @@
 
 class MP4BytesProperty : public MP4Property {
 public:
-	MP4BytesProperty(char* name, u_int32_t valueSize = 0,
+	MP4BytesProperty(const char* name, u_int32_t valueSize = 0,
                          u_int32_t defaultValueSize = 0);
 
 	~MP4BytesProperty();
@@ -419,7 +419,7 @@
 
 class MP4TableProperty : public MP4Property {
 public:
-	MP4TableProperty(char* name, MP4IntegerProperty* pCountProperty);
+	MP4TableProperty(const char* name, MP4IntegerProperty* pCountProperty);
 
 	~MP4TableProperty();
 
@@ -469,7 +469,7 @@
 
 class MP4DescriptorProperty : public MP4Property {
 public:
-	MP4DescriptorProperty(char* name = NULL, 
+	MP4DescriptorProperty(const char* name = NULL,
 	  u_int8_t tagsStart = 0, u_int8_t tagsEnd = 0,
 	  bool mandatory = false, bool onlyOne = false);
 
@@ -531,7 +531,7 @@
 
 class MP4QosQualifierProperty : public MP4DescriptorProperty {
 public:
-	MP4QosQualifierProperty(char* name = NULL, 
+	MP4QosQualifierProperty(const char* name = NULL,
 	  u_int8_t tagsStart = 0, u_int8_t tagsEnd = 0,
 	  bool mandatory = false, bool onlyOne = false) :
 	MP4DescriptorProperty(name, tagsStart, tagsEnd, mandatory, onlyOne) { }
--- a/common/mp4v2/mp4track.cpp
+++ b/common/mp4v2/mp4track.cpp
@@ -1360,7 +1360,7 @@
   }
 }
 
-MP4Atom* MP4Track::AddAtom(char* parentName, char* childName)
+MP4Atom* MP4Track::AddAtom(const char* parentName, const char* childName)
 {
 	MP4Atom* pChildAtom = MP4Atom::CreateAtom(childName);
 
--- a/common/mp4v2/mp4track.h
+++ b/common/mp4v2/mp4track.h
@@ -168,7 +168,7 @@
 	void UpdateSyncSamples(MP4SampleId sampleId, 
 		bool isSyncSample);
 
-	MP4Atom* AddAtom(char* parentName, char* childName);
+	MP4Atom* AddAtom(const char* parentName, const char* childName);
 
 	void UpdateDurations(MP4Duration duration);
 	MP4Duration ToMovieDuration(MP4Duration trackDuration);
--- a/common/mp4v2/ocidescriptors.cpp
+++ b/common/mp4v2/ocidescriptors.cpp
@@ -171,7 +171,7 @@
 
 class MP4CreatorTableProperty : public MP4TableProperty {
 public:
-	MP4CreatorTableProperty(char* name, MP4Integer8Property* pCountProperty) :
+	MP4CreatorTableProperty(const char* name, MP4Integer8Property* pCountProperty) :
 		MP4TableProperty(name, pCountProperty) {
 	};
 protected: