Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public header rfb/rfbproto.h redefines TRUE #627

Open
gaho1 opened this issue Jul 31, 2024 · 2 comments
Open

public header rfb/rfbproto.h redefines TRUE #627

gaho1 opened this issue Jul 31, 2024 · 2 comments

Comments

@gaho1
Copy link

gaho1 commented Jul 31, 2024

The header file rfb/rfbproto.h #undefs and #defines TRUE to -1 and is part of the public API for the project (deployed to /usr/include) for client applications to use. This header is included when rfb/rfbclient.h is included by an application using libvncclient.

This redefinition of TRUE is likely to silently clash with definitions of the same name provided by either another library or by user code. Especially because of the slightly non-conventional use of -1 for TRUE and how widely used a symbol named TRUE is.

In my case, it clashed with an internal header from the gstreamer project which defines TRUE as 1. Gstreamer validates some inputs against that value.

@gaho1 gaho1 added the bug label Jul 31, 2024
@bk138
Copy link
Member

bk138 commented Jul 31, 2024

This is somehting for post-v.1.0.0. In the meantime, you'll have to do your own #ifdef logic.

@bk138 bk138 added rework-api and removed bug labels Jul 31, 2024
@gaho1
Copy link
Author

gaho1 commented Jul 31, 2024

Thanks.
I have a workaround - just wanted to ensure it was tracked / known here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants