AW: IPC/SHM is now supported by default in xoncygwin HEAD CVS tree
Harold L Hunt II
huntharo@msu.edu
Fri Sep 19 15:01:00 GMT 2003
Ralf,
Ralf Habacker wrote:
> Hi Harold,
>
>
>>I just checked in changes to the MIT-SHM
>>(xc/programs/Xserver/Xext/shm.c) and XFree86Bigfont
>>(xc/programs/Xserver/Xext/xf86bigfont.c) extensions that disable SHM
>>support when the Cygwin IPC daemon is not running. This allows IPC/SHM
>>support to be enabled by default in Cygwin/XFree86.
>>
>>I tried to define the functionality of an OS-specific SHM support check
>>as best I could, which resulted in adding a new function called
>>OsVendorShmCheck (). This new OsVendorShmCheck function is called from
>>shm.c and xf86bigfont.c when DDXOSSHMCHECK is defined. This system was
>>designed to work like DDXOSVERRORF and OsVendorVErrorF (), for example.
>
>
> this is obviously the right way, I have seen the related patches for ...BSD,
> but doesn't know who to deal with. Thanks for this efforts.
Well, I thought it was the right way too...
Unfortunately, I am starting to think it is not the right way.
The reason why is two-fold:
1) The OsVenderShmCheck has to be linked in a special manner when
linking XWin.exe so that the Xext lib can find it. Xext is linked after
the XWin lib, so XWin's OsVendorShmCheck gets dropped before Xext
requests it.
The way I found around this was to add an explicit object reference in
Xserver/Imakefile. This went in the same place as the XWin.res and
stubs.o references. This fixed the link problem, but it wasn't very clean.
2) Xext is compiled once for each of the servers being built (xnest,
xprt, xvfb, XWin, etc.), so if DDXOSSHMCHECK is defined for one, then it
is defined for all. The problem here is that OsVendorShmCheck is
defined in hw/xwin/winshmcheck.o, which would then have to be added to
the link lines for each of the servers being built. This is really
messy, especially when we think that other platforms are supposed to be
using this framework.
I have been thinking about this quite a bit and I can't see a reason why
we can't just use the existing check for the SHM syscalls in
xf86bigfont.c and shm.c. Ralf's new function seems to do almost exactly
the same thing and we were bailing at the same place as them, so it
would probably work just fine to add || defined(__CYGWIN__) to the
conditional definition of that function. I am going to try this and see
if I can get it working.
>>There will be a new Server Test Series release sometime tomorrow that
>>includes this new functionality.
>>
>
> I assume that the current xlib releases are linked without shm support ?
> Then the new features of the Xwin Test server will only be usable if at
> least the X11 and Xext libs are compiled with shm support.
Yes, I was going to release new libs, but then I discovered that xnest,
etc. were failing to link. I want to fix that before trying to
repackage the libs.
Harold
More information about the Cygwin-xfree
mailing list