summaryrefslogtreecommitdiff
path: root/media-sound/easytag/files/easytag-2.4.3-fix-build-taglib2_32bits.patch
blob: 4ee9592cf61901f752cea50eee7b09034871167b (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
backport https://gitlab.gnome.org/GNOME/easytag/-/commit/3f753f8.patch
rebased and modified to keep compatibility w/ taglib-1
see https://bugs.gentoo.org/982733
fix taglib-2 w/ 32-bits architecture
--- a/src/tags/gio_wrapper.cc
+++ b/src/tags/gio_wrapper.cc
@@ -48,7 +48,7 @@ GIO_InputStream::name () const
 
 TagLib::ByteVector
 #if (TAGLIB_MAJOR_VERSION == 2)
-GIO_InputStream::readBlock (ulong len)
+GIO_InputStream::readBlock (size_t len)
 #else
 GIO_InputStream::readBlock (TagLib::ulong len)
 #endif
@@ -109,7 +109,11 @@ GIO_InputStream::isOpen () const
 }
 
 void
+#if (TAGLIB_MAJOR_VERSION == 2)
+GIO_InputStream::seek (TagLib::offset_t offset, TagLib::IOStream::Position p)
+#else
 GIO_InputStream::seek (long int offset, TagLib::IOStream::Position p)
+#endif
 {
     if (error)
     {
@@ -147,13 +151,21 @@ GIO_InputStream::clear ()
     }
 }
 
+#if (TAGLIB_MAJOR_VERSION == 2)
+TagLib::offset_t
+#else
 long int
+#endif
 GIO_InputStream::tell () const
 {
     return g_seekable_tell (G_SEEKABLE (stream));
 }
 
+#if (TAGLIB_MAJOR_VERSION == 2)
+TagLib::offset_t
+#else
 long int
+#endif
 GIO_InputStream::length ()
 {
     if (error)
@@ -175,7 +187,11 @@ GIO_InputStream::length ()
 }
 
 void
+#if (TAGLIB_MAJOR_VERSION == 2)
+GIO_InputStream::truncate (TagLib::offset_t len)
+#else
 GIO_InputStream::truncate (long int len)
+#endif
 {
     g_warning ("%s", "Trying to truncate read-only file");
 }
@@ -215,7 +231,7 @@ GIO_IOStream::name () const
 
 TagLib::ByteVector
 #if (TAGLIB_MAJOR_VERSION == 2)
-GIO_IOStream::readBlock (ulong len)
+GIO_IOStream::readBlock (size_t len)
 #else
 GIO_IOStream::readBlock (TagLib::ulong len)
 #endif
@@ -430,7 +446,11 @@ GIO_IOStream::isOpen () const
 }
 
 void
+#if (TAGLIB_MAJOR_VERSION == 2)
+GIO_IOStream::seek (TagLib::offset_t offset, TagLib::IOStream::Position p)
+#else
 GIO_IOStream::seek (long int offset, TagLib::IOStream::Position p)
+#endif
 {
     if (error)
     {
@@ -464,13 +484,21 @@ GIO_IOStream::clear ()
     g_clear_error (&error);
 }
 
+#if (TAGLIB_MAJOR_VERSION == 2)
+TagLib::offset_t
+#else
 long int
+#endif
 GIO_IOStream::tell () const
 {
     return g_seekable_tell (G_SEEKABLE (stream));
 }
 
+#if (TAGLIB_MAJOR_VERSION == 2)
+TagLib::offset_t
+#else
 long int
+#endif
 GIO_IOStream::length ()
 {
     long rv = -1;
@@ -494,7 +522,11 @@ GIO_IOStream::length ()
 }
 
 void
+#if (TAGLIB_MAJOR_VERSION == 2)
+GIO_IOStream::truncate (TagLib::offset_t len)
+#else
 GIO_IOStream::truncate (long int len)
+#endif
 {
     if (error)
     {
--- a/src/tags/gio_wrapper.h
+++ b/src/tags/gio_wrapper.h
@@ -34,7 +34,7 @@ public:
     virtual ~GIO_InputStream ();
     virtual TagLib::FileName name () const;
 #if (TAGLIB_MAJOR_VERSION == 2)
-    virtual TagLib::ByteVector readBlock (ulong length);
+    virtual TagLib::ByteVector readBlock (size_t length);
     virtual void writeBlock (TagLib::ByteVector const &data);
     virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0);
     virtual void removeBlock (TagLib::offset_t start = 0, size_t length = 0);
@@ -46,11 +46,19 @@ public:
 #endif
     virtual bool readOnly () const;
     virtual bool isOpen () const;
+#if (TAGLIB_MAJOR_VERSION == 2)
+    virtual void seek (TagLib::offset_t offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
+    virtual void clear ();
+    virtual TagLib::offset_t tell () const;
+    virtual TagLib::offset_t length ();
+    virtual void truncate (TagLib::offset_t length);
+#else
     virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
     virtual void clear ();
     virtual long int tell () const;
     virtual long int length ();
     virtual void truncate (long int length);
+#endif
 
     virtual const GError *getError() const;
 
@@ -69,7 +77,7 @@ public:
     virtual ~GIO_IOStream ();
     virtual TagLib::FileName name () const;
 #if (TAGLIB_MAJOR_VERSION == 2)
-    virtual TagLib::ByteVector readBlock (ulong length);
+    virtual TagLib::ByteVector readBlock (size_t length);
     virtual void writeBlock (TagLib::ByteVector const &data);
     virtual void insert (TagLib::ByteVector const &data, TagLib::offset_t start = 0, size_t replace = 0);
     virtual void removeBlock (TagLib::offset_t start = 0, size_t len = 0);
@@ -81,11 +89,19 @@ public:
 #endif
     virtual bool readOnly () const;
     virtual bool isOpen () const;
+#if (TAGLIB_MAJOR_VERSION == 2)
+    virtual void seek (TagLib::offset_t offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
+    virtual void clear ();
+    virtual TagLib::offset_t tell () const;
+    virtual TagLib::offset_t length ();
+    virtual void truncate (TagLib::offset_t length);
+#else
     virtual void seek (long int offset, TagLib::IOStream::Position p = TagLib::IOStream::Beginning);
     virtual void clear ();
     virtual long int tell () const;
     virtual long int length ();
     virtual void truncate (long int length);
+#endif
 
     virtual const GError *getError() const;