reserved keyword "class" in xdo.h

179 views
Skip to first unread message

Daniel Kahn Gillmor

unread,
Mar 8, 2012, 9:58:08 AM3/8/12
to xdotool-users
Hi Jordan--

I just got this report (http://bugs.debian.org/663007) from a debian user:

> xdo.h includes the name "class" which is a reserved keyword in c++.
> This prevents including it in a C++ program:
> extern "C" {
> #include <xdo.h>
> }
>
> g++ file.cpp
> In file included from test.cpp:2:0:
> /usr/include/xdo.h:530:37: error: expected ',' or '...' before 'class'
>
> please rename or remove the parameter.

I note that xdo.c already has the parameter re-named "_class" instead of
"class", and it doesn't look to me like shifting the name of the
parameter in xdo.h would change either the API or the ABI.

What do you think of the attached patch?

Regards,

--dkg

663077.patch

Jordan Sissel

unread,
Mar 8, 2012, 10:01:35 AM3/8/12
to d...@fifthhorseman.net, xdotool-users
I swear I've fixed this like 30 times by now, my mind must be going! hah :)

Yeah shoot me a pull request or patch - otherwise I can hand patch it.
FYI, in case I forgot to announce - the source repo lives here now: http://github.com/jordansissel/xdotool

-Jordan

Daniel Kahn Gillmor

unread,
Mar 8, 2012, 10:45:00 AM3/8/12
to Jordan Sissel, xdotool-users
On 03/08/2012 10:01 AM, Jordan Sissel wrote:
> On Thu, Mar 8, 2012 at 6:58 AM, Daniel Kahn Gillmor <d...@fifthhorseman.net>wrote:
>> What do you think of the attached patch?
>
> Yeah shoot me a pull request or patch

Hmm, i attached a patch to my original e-mail. Maybe it got stripped by
your MUA somehow? I'm trying again in this message.

> - otherwise I can hand patch it.
> FYI, in case I forgot to announce - the source repo lives here now:
> http://github.com/jordansissel/xdotool

Yep, the patch is based on that source.

Regards,

--dkg

663077.patch

Jordan Sissel

unread,
Mar 8, 2012, 11:00:58 AM3/8/12
to xdotool-users
On Thu, Mar 8, 2012 at 7:45 AM, Daniel Kahn Gillmor <d...@fifthhorseman.net> wrote:
On 03/08/2012 10:01 AM, Jordan Sissel wrote:
On Thu, Mar 8, 2012 at 6:58 AM, Daniel Kahn Gillmor <d...@fifthhorseman.net>wrote:
What do you think of the attached patch?
>
Yeah shoot me a pull request or patch

Hmm, i attached a patch to my original e-mail.  Maybe it got stripped by your MUA somehow?  I'm trying again in this message.


Oh, I'm a nut. I see the patch now. :)

Patch applied in master. I'll try and get a release out in the next week. Thanks!

-Jordan

Daniel Kahn Gillmor

unread,
Mar 8, 2012, 11:04:28 AM3/8/12
to xdotool-users
On 03/08/2012 11:00 AM, Jordan Sissel wrote:
> Patch applied in master. I'll try and get a release out in the next week.

Thanks, Jordan!

--dkg

Daniel Kahn Gillmor

unread,
Jan 24, 2014, 10:05:55 AM1/24/14
to seb....@gmail.com, xdotoo...@googlegroups.com
On 01/24/2014 06:46 AM, seb....@gmail.com wrote:

> libxdo-dev package on debian wheezy also contains an xdo.h with the 'class'
> parameter in
>
> xdo_window_setclass

Yes, this is true. However, the version currently in debian
testing/unstable does not have this issue. It was resolved in debian
only after the wheezy release (due to problems with the testsuite,
unfortunately)

--dkg

signature.asc

phip...@gmail.com

unread,
Apr 2, 2014, 10:50:07 AM4/2/14
to xdotoo...@googlegroups.com, d...@fifthhorseman.net
hey folks!

is there still support for this xdotool project? i just included xdo.h in one of my c++ projects on my raspberry pi.
i get the same error you found 2012: error: expected ',' or '...' before 'class'

how can i fix that? where can i get the latest version of xdotool?


cheers!

phil

Daniel Kahn Gillmor

unread,
Apr 6, 2014, 6:28:17 PM4/6/14
to phip...@gmail.com, xdotoo...@googlegroups.com
On 04/02/2014 10:50 AM, phip...@gmail.com wrote:

> is there still support for this xdotool project? i just included xdo.h in
> one of my c++ projects on my raspberry pi.
> i get the same error you found 2012: error: expected ',' or '...' before
> 'class'

what version of xdotool are you using? this error was fixed upstream in
2011-03-16, commit a9a5f9bfb614

> how can i fix that? where can i get the latest version of xdotool?

the canonical upstream development version is at

https://github.com/jordansissel/xdotool

hth,

--dkg

signature.asc
Reply all
Reply to author
Forward
0 new messages