[PATCH xserver v2.1] os: Treat ssh as a non-local client (v2)

Jon Turney jon.turney at dronecode.org.uk
Fri Dec 11 07:47:48 PST 2015


On 11/12/2015 10:31, Emil Velikov wrote:
> On 11 December 2015 at 10:20, Martin Peres <martin.peres at free.fr> wrote:
>> On 11/12/15 11:30, Michel Dänzer wrote:
>>> On 11.12.2015 18:17, Martin Peres wrote:
>>>> On 11/12/15 04:34, Michel Dänzer wrote:
>>>>> From: Adam Jackson <ajax at redhat.com>
[...]
>>>>> +#ifndef WIN32

Side note:  WIN32 just means that the Win32 API is available, and may be 
defined even on Cygwin after including windows.h (so it doesn't really 
indicate what the target is)

This is why the circumlocution "!defined(WIN32) || defined(__CYGWIN__)" 
(or it's inverse) is used in places, and to be strictly correct should 
probably be used here.

>>>> Why add this ifndef?
>>>
>>> Because libgen.h and basename() aren't available on Windows AFAICT. I
>>> figured this use case probably isn't common enough on Windows anyway to
>>> bother making it work there as well.
>>
>> You are right, basename is a POSIX function and mingw does expose it, but it
>> turns out msvc does not. As you said, it is probably not worth the effort to
>> add msvc support that no-one will be able to test anyway.
>>
> There's no (intentional) MSVC or mingw support in xserver that I know
> of - only Cygwin. There is also the GNU version of the function
> (#define _GNU_SOURCE + #include <string.h>) although I'm not sure if
> Cygwin has either of them. I'd assume Jon can follow up as needed.

No, there should be support in the X server for building it for MinGW. 
doc/c-extension touches upon this subject briefly.

I suspect it may be broken in master due to recent changes, but I do try 
to upstream patches from Xming to keep it building for MinGW, even 
though my primary interest is building xserver for Cygwin.

(There also exists VcXsrv, which uses a much larger set of patches and 
some special tools to build the X.Org Xserver with MSVC)



More information about the xorg-devel mailing list