On 04/20/2012 03:31 PM, David C. Rankin wrote:
> On 04/20/2012 02:43 PM, Calvin Morrison wrote:
>> for example:
>>
>> http://packages.debian.org/source/wheezy/gopchop
>>
>> scroll down to the downloads section:
>> gopchop_1.1.8-5.debian.tar.gz
>>
>> that tar.gz includes everything needed to make the package, including the
>> patches, just like you would have with a pkgbuild's .src.gz on arch :-)
>
> Thanks Calvin,
>
> I saw that, but I kept looking for a link to 'something.diff' No wonder I
> didn't find it. Hey I need your help with a union question. I have fixed
> xineplayer.cpp in mplayer and I'm now stuck on gstplayer.cpp. The issue is:
>
> XClientMessageEvent ev = {
> ClientMessage, 0, true, display, wid,
> XInternAtom (display, "XVIDEO", false), 8, {b: "quit_now"}
> };
>
> gcc47 is choking on the {b: "quit_now"} assignment to 'b' in the
> XClientMessageEvent data union.
>
> gstplayer.cpp: In function 'int main(int, char**)':
> gstplayer.cpp:1009:5: error: C99 designator 'b' outside aggregate initializer
>
> How do I fix this??
>
> + XInternAtom (display, "XVIDEO", false), 8, {data.b="quit_now"}
>
> or do I have to use some strncpy to get "quit_now" into the union?
>
I have successfully built kmplayer on gcc47 and the current xine-lib and
xine-ui. I need somebody to specifically review the XClientMessageEvent data
union string assignment of "quit_now". man XClientMessageEvent defines:
<snip>
union {
char b[20];
short s[10];
long l[5];
} data;
I decided to just let the compiler handle assigning the data to the proper 'b'
's' 'l' members of the union by simply setting '{"quit_now"}' since there is
only one character type 'b'. I do NOT know if this is right. I've searched for
examples, but have not come up with a clear one. kmplayer now builds with:
CFLAGS="${CFLAGS} -fpermissive" \
CXXFLAGS="${CXXFLAGS} -fpermissive" \
LDFLAGS="${LDFLAGS} -lX11" \
./configure --prefix=${TDEDIR} \
--with-qt-dir=${QTDIR} \
--with-extra-includes=${TDEDIR}/include/dbus-1.0 \
--localstatedir=/var \
--enable-debug=full
Patch attached:
--
David C. Rankin, J.D.,P.E.
Attachments: