drop remains of cygwin support

Cygwin support doesn't seem to be used anymore, so it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-03-15 15:03:34 +01:00
parent 9741f0a256
commit 9a82f5c30b
31 changed files with 32 additions and 341 deletions

View File

@ -154,7 +154,7 @@ static ShmFuncs fbFuncs = { fbShmCreatePixmap, NULL };
} \
}
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
static Bool badSysCall = FALSE;

View File

@ -41,10 +41,6 @@
#ifdef SVR4
#include <sys/sysmacros.h>
#endif
#if defined(__CYGWIN__)
#include <sys/param.h>
#include <sys/sysmacros.h>
#endif
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/stat.h>
@ -88,7 +84,7 @@ static unsigned int pagesize;
static Bool badSysCall = FALSE;
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__)
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
static void
SigSysHandler(int signo)
@ -707,7 +703,7 @@ XFree86BigfontExtensionInit(void)
FontShmdescIndex = xfont2_allocate_font_private_index();
#if !defined(CSRG_BASED) && !defined(__CYGWIN__)
#if !defined(CSRG_BASED)
pagesize = SHMLBA;
#else
#ifdef _SC_PAGESIZE

View File

@ -48,13 +48,6 @@
#include "extension_string.h"
/* RTLD_LOCAL is not defined on Cygwin */
#ifdef __CYGWIN__
#ifndef RTLD_LOCAL
#define RTLD_LOCAL 0
#endif
#endif
typedef struct __GLXDRIscreen __GLXDRIscreen;
typedef struct __GLXDRIcontext __GLXDRIcontext;
typedef struct __GLXDRIdrawable __GLXDRIdrawable;

View File

@ -33,7 +33,7 @@
#include "indirect_reqsize.h"
#include "misc.h"
#if defined(__CYGWIN__) || defined(__MINGW32__)
#if defined(__MINGW32__)
#undef HAVE_ALIAS
#endif
#ifdef HAVE_ALIAS

View File

@ -44,7 +44,7 @@
#define PURE
#endif
#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__)
#define FASTCALL __attribute__((fastcall))
#else
#define FASTCALL

View File

@ -37,14 +37,14 @@
#define PURE
#endif
#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__)
#define FASTCALL __attribute__((fastcall))
#else
#define FASTCALL
#endif
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
#if defined(__MINGW32__) || defined(GLX_USE_APPLEGL)
#undef HAVE_ALIAS
#endif
#ifdef HAVE_ALIAS

View File

@ -44,7 +44,7 @@
#define PURE
#endif
#if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
#if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__)
#define FASTCALL __attribute__((fastcall))
#else
#define FASTCALL

View File

@ -117,11 +117,6 @@
static ModuleDefault ModuleDefaults[] = {
#ifdef GLXEXT
{.name = "glx",.toLoad = TRUE,.load_opt = NULL},
#endif
#ifdef __CYGWIN__
/* load DIX modules used by drivers first */
{.name = "fb",.toLoad = TRUE,.load_opt = NULL},
{.name = "shadow",.toLoad = TRUE,.load_opt = NULL},
#endif
{.name = NULL,.toLoad = FALSE,.load_opt = NULL}
};

View File

@ -191,15 +191,9 @@ static const char *stdSubdirs[] = {
* to port this DDX to, say, Darwin, we'll need to fix this.
*/
static PatternRec stdPatterns[] = {
#ifdef __CYGWIN__
{"^cyg(.*)\\.dll$",},
{"(.*)_drv\\.dll$",},
{"(.*)\\.dll$",},
#else
{"^lib(.*)\\.so$",},
{"(.*)_drv\\.so$",},
{"(.*)\\.so$",},
#endif
{NULL,}
};
@ -288,33 +282,21 @@ FindModuleInSubdir(const char *dirpath, const char *module)
continue;
}
#ifdef __CYGWIN__
snprintf(tmpBuf, PATH_MAX, "cyg%s.dll", module);
#else
snprintf(tmpBuf, PATH_MAX, "lib%s.so", module);
#endif
if (strcmp(direntry->d_name, tmpBuf) == 0) {
if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1)
ret = NULL;
break;
}
#ifdef __CYGWIN__
snprintf(tmpBuf, PATH_MAX, "%s_drv.dll", module);
#else
snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module);
#endif
if (strcmp(direntry->d_name, tmpBuf) == 0) {
if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1)
ret = NULL;
break;
}
#ifdef __CYGWIN__
snprintf(tmpBuf, PATH_MAX, "%s.dll", module);
#else
snprintf(tmpBuf, PATH_MAX, "%s.so", module);
#endif
if (strcmp(direntry->d_name, tmpBuf) == 0) {
if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1)
ret = NULL;

View File

@ -73,7 +73,7 @@ if build_dri2
xorg_link += xorg_dri2
endif
if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'
if host_machine.system() == 'windows'
linker_export_flags = '-Wl,--export-all-symbols'
elif host_machine.system() == 'sunos' or host_machine.system() == 'darwin'
linker_export_flags = []

View File

@ -106,7 +106,7 @@
/**************************************************************************/
/* Linux or Glibc-based system */
/**************************************************************************/
#if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__)
#if defined(__linux__) || defined(__GLIBC__)
#include <sys/ioctl.h>
#include <signal.h>
#include <stdlib.h>

View File

@ -75,18 +75,6 @@ DDXRingBell(int volume, int pitch, int duration)
return;
}
#ifdef HAS_DEVWINDOWS
static void
xwinDevWindowsHandlerNotify(int fd, int ready, void *data)
{
/* This should process Windows messages, but instead all of that is delayed
* until the wakeup handler is called.
*/
;
}
#endif
/* See Porting Layer Definition - p. 17 */
void
InitInput(int argc, char *argv[])

View File

@ -47,9 +47,6 @@ from The Open Group.
#ifdef DPMSExtension
#include "dpmsproc.h"
#endif
#ifdef __CYGWIN__
#include <mntent.h>
#endif
#ifdef RELOCATE_PROJECTROOT
#pragma push_macro("Status")
#undef Status
@ -211,17 +208,6 @@ ddxGiveUp(enum ExitCode error)
/* Notify the worker threads we're exiting */
winDeinitMultiWindowWM();
#ifdef HAS_DEVWINDOWS
/* Close our handle to our message queue */
if (g_fdMessageQueue != WIN_FD_INVALID) {
/* Close /dev/windows */
close(g_fdMessageQueue);
/* Set the file handle to invalid */
g_fdMessageQueue = WIN_FD_INVALID;
}
#endif
if (!g_fLogInited) {
g_pszLogFile = LogInit(g_pszLogFile, ".old");
g_fLogInited = TRUE;
@ -258,95 +244,6 @@ ddxGiveUp(enum ExitCode error)
winDebug("ddxGiveUp - End\n");
}
#ifdef __CYGWIN__
/* hasmntopt is currently not implemented for cygwin */
static const char *
winCheckMntOpt(const struct mntent *mnt, const char *opt)
{
const char *s;
size_t len;
if (mnt == NULL)
return NULL;
if (opt == NULL)
return NULL;
if (mnt->mnt_opts == NULL)
return NULL;
len = strlen(opt);
s = strstr(mnt->mnt_opts, opt);
if (s == NULL)
return NULL;
if ((s == mnt->mnt_opts || *(s - 1) == ',') &&
(s[len] == 0 || s[len] == ','))
return (char *) opt;
return NULL;
}
static void
winCheckMount(void)
{
FILE *mnt;
struct mntent *ent;
enum { none = 0, sys_root, user_root, sys_tmp, user_tmp }
level = none, curlevel;
BOOL binary = TRUE;
mnt = setmntent("/etc/mtab", "r");
if (mnt == NULL) {
ErrorF("setmntent failed");
return;
}
while ((ent = getmntent(mnt)) != NULL) {
BOOL sys = (winCheckMntOpt(ent, "user") != NULL);
BOOL root = (strcmp(ent->mnt_dir, "/") == 0);
BOOL tmp = (strcmp(ent->mnt_dir, "/tmp") == 0);
if (sys) {
if (root)
curlevel = sys_root;
else if (tmp)
curlevel = sys_tmp;
else
continue;
}
else {
if (root)
curlevel = user_root;
else if (tmp)
curlevel = user_tmp;
else
continue;
}
if (curlevel <= level)
continue;
level = curlevel;
if ((winCheckMntOpt(ent, "binary") == NULL) &&
(winCheckMntOpt(ent, "binmode") == NULL))
binary = FALSE;
else
binary = TRUE;
}
if (endmntent(mnt) != 1) {
ErrorF("endmntent failed");
return;
}
if (!binary)
winMsg(X_WARNING, "/tmp mounted in textmode\n");
}
#else
static void
winCheckMount(void)
{
}
#endif
#ifdef RELOCATE_PROJECTROOT
const char *
winGetBaseDir(void)
@ -643,8 +540,6 @@ OsVendorInit(void)
if (serverGeneration == 1)
winLogVersionInfo();
winCheckMount();
/* Add a default screen if no screens were specified */
if (g_iNumScreens == 0) {
winDebug("OsVendorInit - Creating default screen 0\n");

View File

@ -7,12 +7,8 @@ build_windowsdri = windowsdri_dep.found()
xwin_sys_libs = []
xwin_sys_libs += '-ldxguid'
if host_machine.system() == 'cygwin'
server_name = 'XWin'
else
server_name = 'Xming'
xwin_sys_libs += ['-lpthread', '-lws2_32']
endif
server_name = 'Xming'
xwin_sys_libs += ['-lpthread', '-lws2_32']
xwin_c_args = []
xwin_c_args += '-DHAVE_XWIN_CONFIG_H'

View File

@ -522,9 +522,6 @@ extern winScreenInfo *g_ScreenInfo;
extern miPointerScreenFuncRec g_winPointerCursorFuncs;
extern DWORD g_dwEvents;
#ifdef HAS_DEVWINDOWS
extern int g_fdMessageQueue;
#endif
extern DevPrivateKeyRec g_iScreenPrivateKeyRec;
#define g_iScreenPrivateKey (&g_iScreenPrivateKeyRec)

View File

@ -40,7 +40,6 @@ winBlockHandler(ScreenPtr pScreen, void *pTimeout)
{
winScreenPriv(pScreen);
#ifndef HAS_DEVWINDOWS
struct timeval **tvp = pTimeout;
if (*tvp != NULL) {
@ -60,7 +59,6 @@ winBlockHandler(ScreenPtr pScreen, void *pTimeout)
(*tvp)->tv_usec = 100;
}
}
#endif
/* Signal threaded modules to begin */
if (pScreenPriv != NULL && !pScreenPriv->fServerStarted) {

View File

@ -61,9 +61,6 @@
#define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip"
#define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip"
#ifdef HAS_DEVWINDOWS
#define WIN_MSG_QUEUE_FNAME "/dev/windows"
#endif
/*
* Global variables
@ -110,11 +107,7 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info)
int iReturn;
HWND hwnd = NULL;
int iConnectionNumber = 0;
#ifdef HAS_DEVWINDOWS
int fdMessageQueue = 0;
#else
struct timeval tvTimeout;
#endif
fd_set fdsRead;
int iMaxDescriptor;
xcb_connection_t *conn;
@ -139,19 +132,7 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info)
/* Get our connection number */
iConnectionNumber = xcb_get_file_descriptor(conn);
#ifdef HAS_DEVWINDOWS
/* Open a file descriptor for the windows message queue */
fdMessageQueue = open(WIN_MSG_QUEUE_FNAME, O_RDONLY);
if (fdMessageQueue == -1) {
ErrorF("winClipboardProc - Failed opening %s\n", WIN_MSG_QUEUE_FNAME);
goto winClipboardProc_Done;
}
/* Find max of our file descriptors */
iMaxDescriptor = MAX(fdMessageQueue, iConnectionNumber) + 1;
#else
iMaxDescriptor = iConnectionNumber + 1;
#endif
const xcb_query_extension_reply_t *xfixes_query;
xfixes_query = xcb_get_extension_data(conn, &xcb_xfixes_id);
@ -272,23 +253,15 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info)
*/
FD_ZERO(&fdsRead);
FD_SET(iConnectionNumber, &fdsRead);
#ifdef HAS_DEVWINDOWS
FD_SET(fdMessageQueue, &fdsRead);
#else
tvTimeout.tv_sec = 0;
tvTimeout.tv_usec = 100;
#endif
/* Wait for a Windows event or an X event */
iReturn = select(iMaxDescriptor, /* Highest fds number */
&fdsRead, /* Read mask */
NULL, /* No write mask */
NULL, /* No exception mask */
#ifdef HAS_DEVWINDOWS
NULL /* No timeout */
#else
&tvTimeout /* Set timeout */
#endif
);
#ifndef HAS_WINSOCK
@ -314,24 +287,6 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info)
winDebug
("winClipboardProc - X connection ready, pumping X event queue\n");
}
#ifdef HAS_DEVWINDOWS
/* Check for Windows event ready */
if (FD_ISSET(fdMessageQueue, &fdsRead))
#else
if (1)
#endif
{
winDebug
("winClipboardProc - /dev/windows ready, pumping Windows message queue\n");
}
#ifdef HAS_DEVWINDOWS
if (!(FD_ISSET(iConnectionNumber, &fdsRead)) &&
!(FD_ISSET(fdMessageQueue, &fdsRead))) {
winDebug("winClipboardProc - Spurious wake, select() returned %d\n", iReturn);
}
#endif
}
/* broke out of while loop on a shutdown message */
@ -353,12 +308,6 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info)
free(error);
}
#ifdef HAS_DEVWINDOWS
/* Close our Win32 message handle */
if (fdMessageQueue)
close(fdMessageQueue);
#endif
/*
* xcb_disconnect() does not sync, so is safe to call even when we are built
* into the server. Unlike XCloseDisplay() there will be no deadlock if the

View File

@ -42,9 +42,6 @@
int g_iNumScreens = 0;
winScreenInfo *g_ScreenInfo = 0;
#ifdef HAS_DEVWINDOWS
int g_fdMessageQueue = WIN_FD_INVALID;
#endif
DevPrivateKeyRec g_iScreenPrivateKeyRec;
DevPrivateKeyRec g_iCmapPrivateKeyRec;
DevPrivateKeyRec g_iGCPrivateKeyRec;

View File

@ -470,12 +470,6 @@ winKeybdReleaseKeys(void)
{
int i;
#ifdef HAS_DEVWINDOWS
/* Verify that the mi input system has been initialized */
if (g_fdMessageQueue == WIN_FD_INVALID)
return;
#endif
/* Loop through all keys */
for (i = 0; i < NUM_KEYCODES; ++i) {
/* Pop key if pressed */

View File

@ -37,9 +37,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#ifdef __CYGWIN__
#include <sys/select.h>
#endif
#include <fcntl.h>
#include <setjmp.h>
#define HANDLE void *
@ -87,9 +84,6 @@ extern void winUpdateRgnMultiWindow(WindowPtr pWin);
#define WIN_CONNECT_RETRIES 5
#define WIN_CONNECT_DELAY 5
#ifdef HAS_DEVWINDOWS
#define WIN_MSG_QUEUE_FNAME "/dev/windows"
#endif
/*
* Local structures

View File

@ -35,10 +35,6 @@
#endif
#include <stdio.h>
#include <stdlib.h>
#ifdef __CYGWIN__
#include <sys/resource.h>
#include <sys/cygwin.h>
#endif
#include "win.h"
#include <X11/Xwindows.h>
@ -313,28 +309,6 @@ HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv)
if (command == m->menuItem[j].commandID) {
/* Match! */
switch (m->menuItem[j].cmd) {
#ifdef __CYGWIN__
case CMD_EXEC:
if (fork() == 0) {
struct rlimit rl;
int fd;
/* Close any open descriptors except for STD* */
getrlimit(RLIMIT_NOFILE, &rl);
for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++)
close(fd);
/* Disassociate any TTYs */
setsid();
execl("/bin/sh",
"/bin/sh", "-c", m->menuItem[j].param, NULL);
exit(0);
}
else
return TRUE;
break;
#else
case CMD_EXEC:
{
/* Start process without console window */
@ -360,7 +334,6 @@ HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv)
MB_OK | MB_ICONEXCLAMATION);
}
return TRUE;
#endif
case CMD_ALWAYSONTOP:
if (!hwnd)
return FALSE;
@ -542,9 +515,6 @@ LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags)
}
else {
char *file = calloc(1, PATH_MAX + NAME_MAX + 2);
#ifdef __CYGWIN__
Bool convert = FALSE;
#endif
if (!file)
return NULL;
@ -553,14 +523,6 @@ LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags)
/* If fname starts 'X:\', it's an absolute Windows path, do nothing */
if (!(fname[0] && fname[1] == ':' && fname[2] == '\\')) {
#ifdef __CYGWIN__
/* If fname starts with '/', it's an absolute cygwin path, we'll
need to convert it */
if (fname[0] == '/') {
convert = TRUE;
}
else
#endif
if (iconDirectory) {
/* Otherwise, prepend the default icon directory, which
currently must be in absolute Windows path form */
@ -581,17 +543,6 @@ LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags)
i = -1;
}
#ifdef __CYGWIN__
/* Convert from Cygwin path to Windows path */
if (convert) {
char *converted_file = cygwin_create_path(CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, file);
if (converted_file) {
free(file);
file = converted_file;
}
}
#endif
if (i >= 0) {
/* Specified as <fname>,<index> */
hicon = ExtractIcon(g_hInstance, file, i);
@ -669,19 +620,6 @@ winPrefsLoadPreferences(const char *path)
if (path)
prefFile = fopen(path, "r");
#ifdef __CYGWIN__
else {
char defaultPrefs[] =
"MENU rmenu {\n"
" \"How to customize this menu\" EXEC \"xterm +tb -e man XWinrc\"\n"
" \"Launch xterm\" EXEC xterm\n"
" \"Load .XWinrc\" RELOAD\n"
" SEPARATOR\n" "}\n" "\n" "ROOTMENU rmenu\n";
path = "built-in default";
prefFile = fmemopen(defaultPrefs, strlen(defaultPrefs), "r");
}
#endif
if (!prefFile) {
ErrorF("LoadPreferences: %s not found\n", path);

View File

@ -52,9 +52,6 @@
#define WINDOW_CLASS_X_MSG "cygwin/x X msg"
#define WINDOW_TITLE_X PROJECT_NAME " X"
#define WIN_WINDOW_PROP "cyg_window_prop_rl"
#ifdef HAS_DEVWINDOWS
#define WIN_MSG_QUEUE_FNAME "/dev/windows"
#endif
#define WIN_WID_PROP "cyg_wid_prop_rl"
#define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl"

View File

@ -406,8 +406,6 @@ xwin_data = configuration_data()
xwin_data.set_quoted('DEFAULT_LOGDIR', log_dir)
xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows' ? '1' : false,
description: 'Use Windows sockets')
xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin' ? '1' : false,
description: 'Has /dev/windows for signaling new win32 messages')
xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false,
description: 'Make paths relative to the xserver installation location')
xwin_data.set10('ENABLE_DEBUG', enable_debugging)

View File

@ -345,7 +345,7 @@ xorg_backtrace(void);
#include <signal.h>
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(WIN32)
typedef _sigset_t sigset_t;
#endif

View File

@ -9,9 +9,6 @@
/* Winsock networking */
#mesondefine HAS_WINSOCK
/* Cygwin has /dev/windows for signaling new win32 messages */
#mesondefine HAS_DEVWINDOWS
/* Switch on debug messages */
#mesondefine ENABLE_DEBUG

View File

@ -186,7 +186,7 @@ endif
build_udev = get_option('udev')
build_udev_kms = get_option('udev_kms')
if ['windows', 'darwin', 'cygwin', 'freebsd', 'netbsd', 'openbsd', 'sunos'].contains(host_machine.system())
if ['windows', 'darwin', 'freebsd', 'netbsd', 'openbsd', 'sunos'].contains(host_machine.system())
build_udev = false
build_udev_kms = false
endif
@ -251,8 +251,7 @@ build_xnest = get_option('xnest') != 'false'
build_xwin = false
if get_option('xwin') == 'auto'
if (host_machine.system() == 'cygwin' or
host_machine.system() == 'windows')
if host_machine.system() == 'windows'
build_xwin = true
endif
else
@ -540,8 +539,7 @@ build_modesetting = libdrm_dep.found() and dri2proto_dep.found()
build_vgahw = false
if get_option('vgahw') == 'auto'
if (host_machine.system() != 'darwin' and
host_machine.system() != 'windows' and
host_machine.system() != 'cygwin')
host_machine.system() != 'windows')
build_vgahw = true
endif
else
@ -883,8 +881,7 @@ if build_xorg
# On Windows, modules built with the SDK will need to link with server and
# module implibs to resolve symbols
if (host_machine.system() == 'cygwin' or
host_machine.system() == 'windows')
if host_machine.system() == 'windows'
sdkconfig.set('XORG_DRIVER_LIBS', '-lXorg.exe -L\${moduledir} -lshadow -no-undefined')
endif

View File

@ -166,7 +166,7 @@ SOFTWARE.
#endif /* WIN32 */
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(WIN32)
#include <libgen.h>
#endif
@ -1084,7 +1084,7 @@ ComputeLocalClient(ClientPtr client)
*/
char *tok = strtok(cmd, ":");
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(WIN32)
ret = strcmp(basename(tok), "ssh") != 0;
#else
ret = strcmp(tok, "ssh") != 0;

View File

@ -92,7 +92,7 @@ OsRegisterSigWrapper(OsSigWrapperPtr newSigWrapper)
* OsSigHandler --
* Catch unexpected signals and exit or continue cleanly.
*/
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(WIN32)
static void
#ifdef SA_SIGINFO
OsSigHandler(int signo, siginfo_t * sip, void *unused)
@ -142,7 +142,7 @@ OsSigHandler(int signo)
FatalError("Caught signal %d (%s). Server aborting\n",
signo, strsignal(signo));
}
#endif /* !WIN32 || __CYGWIN__ */
#endif /* !WIN32 */
void
OsInit(void)
@ -150,7 +150,7 @@ OsInit(void)
static Bool been_here = FALSE;
if (!been_here) {
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(WIN32)
struct sigaction act, oact;
int i;
@ -178,7 +178,7 @@ OsInit(void)
siglist[i], strerror(errno));
}
}
#endif /* !WIN32 || __CYGWIN__ */
#endif /* !WIN32 */
busfault_init();
server_poll = ospoll_create();
if (!server_poll)
@ -208,7 +208,7 @@ OsInit(void)
}
#endif
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(WIN32)
if (getpgrp() == 0)
setpgid(0, 0);
#endif

View File

@ -50,17 +50,7 @@ OR PERFORMANCE OF THIS SOFTWARE.
#include <dix-config.h>
#ifdef __CYGWIN__
#include <stdlib.h>
#include <signal.h>
/*
Sigh... We really need a prototype for this to know it is stdcall,
but #include-ing <windows.h> here is not a good idea...
*/
__stdcall unsigned long GetTickCount(void);
#endif
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(WIN32)
#include <X11/Xwinsock.h>
#endif
#include <X11/Xos.h>
@ -148,7 +138,7 @@ static clockid_t clockid;
OsSigHandlerPtr
OsSignal(int sig, OsSigHandlerPtr handler)
{
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(WIN32)
return signal(sig, handler);
#else
struct sigaction act, oact;
@ -206,7 +196,7 @@ ForceClockId(clockid_t forced_clockid)
}
#endif
#if (defined WIN32 && defined __MINGW32__) || defined(__CYGWIN__)
#if (defined WIN32 && defined __MINGW32__)
CARD32
GetTimeInMillis(void)
{
@ -567,7 +557,7 @@ ProcessCommandLine(int argc, char *argv[])
}
#ifdef LOCK_SERVER
else if (strcmp(argv[i], "-nolock") == 0) {
#if !defined(WIN32) && !defined(__CYGWIN__)
#if !defined(WIN32)
if (getuid() != 0)
ErrorF
("Warning: the -nolock option can only be used by root\n");
@ -991,7 +981,7 @@ OsAbort(void)
#ifndef __APPLE__
OsBlockSignals();
#endif
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(WIN32)
/* abort() raises SIGABRT, so we have to stop handling that to prevent
* recursion
*/
@ -1429,7 +1419,7 @@ CheckUserAuthorization(void)
#endif
}
#if !defined(WIN32) || defined(__CYGWIN__)
#if !defined(WIN32)
/* Move a file descriptor out of the way of our select mask; this
* is useful for file descriptors which will never appear in the
* select mask to avoid reducing the number of clients that can

View File

@ -81,7 +81,7 @@
#include <assert.h> /* assertion macros */
#include <string.h> /* string functions */
#if defined(WIN32) && !defined(__CYGWIN__)
#if defined(WIN32)
#include <X11/Xwinsock.h>
#endif

View File

@ -738,7 +738,7 @@ XkbProcessArguments(int argc, char *argv[], int i)
{
if (strncmp(argv[i], "-xkbdir", 7) == 0) {
if (++i < argc) {
#if !defined(WIN32) && !defined(__CYGWIN__)
#if !defined(WIN32)
if (getuid() != geteuid()) {
LogMessage(X_WARNING,
"-xkbdir is not available for setuid X servers\n");