We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 170 - Updated dynamic X11 support...
Summary: Updated dynamic X11 support...
Status: VERIFIED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: x86 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-21 19:34 UTC by Ryan C. Gordon
Modified: 2006-03-22 04:18 UTC (History)
0 users

See Also:


Attachments
Updated dynamic X11 patch. (126.62 KB, patch)
2006-03-21 19:34 UTC, Ryan C. Gordon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan C. Gordon 2006-03-21 19:34:14 UTC
Here's a shot at updating the dynamic X11 code.

- It no longer needs all code to prefix a 'p' before X calls...this makes development more natural, and makes it easy to totally remove the dynamic code if this doesn't work out. The bulk of this patch is reverting all the 'p' prefixing in the rest of the source code.
- It now keeps track of what did and did not load by "modules", so the build system may have support for, say, the UTF-8 entry points, but these can be missing on the end-user system...the basic Xlib entry points will still work in this case, but the code can check SDL_X11_HAVE_UTF8 to see if it's safe to call the functions in this module. For SDL builds linked directly against Xlib, these module checks are always true.
- Current moudles are: "BASEXLIB" for all the general, must-have functionality...the X11 target will gracefully fail to initialize if any of those symbols are missing. "UTF8" for the Unicode stuff and XIM support (we gracefully fallback to single-byte char handling if this is missing). "SHM" for the MIT Shared Memory extension support (we do without if it's not there). There are some other dummy modules for internal symbols that aren't called if they don't exist on a system, like the 32-bit IO fallbacks on amd64, etc.
- Future modules will be "XRANDR", and whatever else we don't want to link against directly. We could possibly jettison some of the included code for things like xme and Xinerama and such, too.

Let me know what you think.

--ryan.
Comment 1 Ryan C. Gordon 2006-03-21 19:34:49 UTC
Created attachment 87 [details]
Updated dynamic X11 patch.
Comment 2 Sam Lantinga 2006-03-21 23:56:19 UTC
Looks good, go for it!
Comment 3 Ryan C. Gordon 2006-03-22 00:01:57 UTC
Committed to CVS.

--ryan.

Comment 4 Sam Lantinga 2006-03-22 00:17:42 UTC
This doesn't build on 32-bit systems:
In file included from ./src/video/x11/SDL_x11dyn.c:88:
./src/video/x11/SDL_x11sym.h:164: error: syntax error before '(' token
./src/video/x11/SDL_x11sym.h:164: error: conflicting types for '_XRead'
./src/video/x11/SDL_x11sym.h:121: error: previous definition of '_XRead' was here
./src/video/x11/SDL_x11sym.h:164: error: syntax error before "char"
Comment 5 Ryan C. Gordon 2006-03-22 03:55:19 UTC
Checking..

--ryan.

Comment 6 Ryan C. Gordon 2006-03-22 03:57:53 UTC
Should be fixed in CVS now. Let me know if it's still broken.

--ryan.