(submit/drop-cygwin) 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:
		
							parent
							
								
									96da907625
								
							
						
					
					
						commit
						5b21152f77
					
				|  | @ -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; | static Bool badSysCall = FALSE; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -41,10 +41,6 @@ | ||||||
| #ifdef SVR4 | #ifdef SVR4 | ||||||
| #include <sys/sysmacros.h> | #include <sys/sysmacros.h> | ||||||
| #endif | #endif | ||||||
| #if defined(__CYGWIN__) |  | ||||||
| #include <sys/param.h> |  | ||||||
| #include <sys/sysmacros.h> |  | ||||||
| #endif |  | ||||||
| #include <sys/ipc.h> | #include <sys/ipc.h> | ||||||
| #include <sys/shm.h> | #include <sys/shm.h> | ||||||
| #include <sys/stat.h> | #include <sys/stat.h> | ||||||
|  | @ -88,7 +84,7 @@ static unsigned int pagesize; | ||||||
| 
 | 
 | ||||||
| static Bool badSysCall = FALSE; | 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 | static void | ||||||
| SigSysHandler(int signo) | SigSysHandler(int signo) | ||||||
|  | @ -708,7 +704,7 @@ XFree86BigfontExtensionInit(void) | ||||||
| 
 | 
 | ||||||
|         FontShmdescIndex = xfont2_allocate_font_private_index(); |         FontShmdescIndex = xfont2_allocate_font_private_index(); | ||||||
| 
 | 
 | ||||||
| #if !defined(CSRG_BASED) && !defined(__CYGWIN__) | #if !defined(CSRG_BASED) | ||||||
|         pagesize = SHMLBA; |         pagesize = SHMLBA; | ||||||
| #else | #else | ||||||
| #ifdef _SC_PAGESIZE | #ifdef _SC_PAGESIZE | ||||||
|  |  | ||||||
|  | @ -48,13 +48,6 @@ | ||||||
| 
 | 
 | ||||||
| #include "extension_string.h" | #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 __GLXDRIscreen __GLXDRIscreen; | ||||||
| typedef struct __GLXDRIcontext __GLXDRIcontext; | typedef struct __GLXDRIcontext __GLXDRIcontext; | ||||||
| typedef struct __GLXDRIdrawable __GLXDRIdrawable; | typedef struct __GLXDRIdrawable __GLXDRIdrawable; | ||||||
|  |  | ||||||
|  | @ -31,7 +31,7 @@ | ||||||
| #include "indirect_size.h" | #include "indirect_size.h" | ||||||
| #include "indirect_reqsize.h" | #include "indirect_reqsize.h" | ||||||
| 
 | 
 | ||||||
| #if defined(__CYGWIN__) || defined(__MINGW32__) | #if defined(__MINGW32__) | ||||||
| #undef HAVE_ALIAS | #undef HAVE_ALIAS | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ALIAS | #ifdef HAVE_ALIAS | ||||||
|  |  | ||||||
|  | @ -44,7 +44,7 @@ | ||||||
| #define PURE | #define PURE | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) | #if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__) | ||||||
| #define FASTCALL __attribute__((fastcall)) | #define FASTCALL __attribute__((fastcall)) | ||||||
| #else | #else | ||||||
| #define FASTCALL | #define FASTCALL | ||||||
|  |  | ||||||
|  | @ -39,14 +39,14 @@ | ||||||
| #define PURE | #define PURE | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) | #if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__) | ||||||
| #define FASTCALL __attribute__((fastcall)) | #define FASTCALL __attribute__((fastcall)) | ||||||
| #else | #else | ||||||
| #define FASTCALL | #define FASTCALL | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL) | #if defined(__MINGW32__) || defined(GLX_USE_APPLEGL) | ||||||
| #undef HAVE_ALIAS | #undef HAVE_ALIAS | ||||||
| #endif | #endif | ||||||
| #ifdef HAVE_ALIAS | #ifdef HAVE_ALIAS | ||||||
|  |  | ||||||
|  | @ -44,7 +44,7 @@ | ||||||
| #define PURE | #define PURE | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) | #if defined(__i386__) && defined(__GNUC__) && !defined(__MINGW32__) | ||||||
| #define FASTCALL __attribute__((fastcall)) | #define FASTCALL __attribute__((fastcall)) | ||||||
| #else | #else | ||||||
| #define FASTCALL | #define FASTCALL | ||||||
|  |  | ||||||
|  | @ -116,11 +116,6 @@ | ||||||
| static ModuleDefault ModuleDefaults[] = { | static ModuleDefault ModuleDefaults[] = { | ||||||
| #ifdef GLXEXT | #ifdef GLXEXT | ||||||
|     {.name = "glx",.toLoad = TRUE,.load_opt = NULL}, |     {.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 | #endif | ||||||
|     {.name = NULL,.toLoad = FALSE,.load_opt = NULL} |     {.name = NULL,.toLoad = FALSE,.load_opt = NULL} | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -190,15 +190,9 @@ static const char *stdSubdirs[] = { | ||||||
|  * to port this DDX to, say, Darwin, we'll need to fix this. |  * to port this DDX to, say, Darwin, we'll need to fix this. | ||||||
|  */ |  */ | ||||||
| static PatternRec stdPatterns[] = { | static PatternRec stdPatterns[] = { | ||||||
| #ifdef __CYGWIN__ |  | ||||||
|     {"^cyg(.*)\\.dll$",}, |  | ||||||
|     {"(.*)_drv\\.dll$",}, |  | ||||||
|     {"(.*)\\.dll$",}, |  | ||||||
| #else |  | ||||||
|     {"^lib(.*)\\.so$",}, |     {"^lib(.*)\\.so$",}, | ||||||
|     {"(.*)_drv\\.so$",}, |     {"(.*)_drv\\.so$",}, | ||||||
|     {"(.*)\\.so$",}, |     {"(.*)\\.so$",}, | ||||||
| #endif |  | ||||||
|     {NULL,} |     {NULL,} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
|  | @ -287,33 +281,21 @@ FindModuleInSubdir(const char *dirpath, const char *module) | ||||||
|             continue; |             continue; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| #ifdef __CYGWIN__ |  | ||||||
|         snprintf(tmpBuf, PATH_MAX, "cyg%s.dll", module); |  | ||||||
| #else |  | ||||||
|         snprintf(tmpBuf, PATH_MAX, "lib%s.so", module); |         snprintf(tmpBuf, PATH_MAX, "lib%s.so", module); | ||||||
| #endif |  | ||||||
|         if (strcmp(direntry->d_name, tmpBuf) == 0) { |         if (strcmp(direntry->d_name, tmpBuf) == 0) { | ||||||
|             if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) |             if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) | ||||||
|                 ret = NULL; |                 ret = NULL; | ||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| #ifdef __CYGWIN__ |  | ||||||
|         snprintf(tmpBuf, PATH_MAX, "%s_drv.dll", module); |  | ||||||
| #else |  | ||||||
|         snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module); |         snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module); | ||||||
| #endif |  | ||||||
|         if (strcmp(direntry->d_name, tmpBuf) == 0) { |         if (strcmp(direntry->d_name, tmpBuf) == 0) { | ||||||
|             if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) |             if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) | ||||||
|                 ret = NULL; |                 ret = NULL; | ||||||
|             break; |             break; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| #ifdef __CYGWIN__ |  | ||||||
|         snprintf(tmpBuf, PATH_MAX, "%s.dll", module); |  | ||||||
| #else |  | ||||||
|         snprintf(tmpBuf, PATH_MAX, "%s.so", module); |         snprintf(tmpBuf, PATH_MAX, "%s.so", module); | ||||||
| #endif |  | ||||||
|         if (strcmp(direntry->d_name, tmpBuf) == 0) { |         if (strcmp(direntry->d_name, tmpBuf) == 0) { | ||||||
|             if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) |             if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) | ||||||
|                 ret = NULL; |                 ret = NULL; | ||||||
|  |  | ||||||
|  | @ -73,7 +73,7 @@ if build_dri2 | ||||||
|     xorg_link += xorg_dri2 |     xorg_link += xorg_dri2 | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' | if host_machine.system() == 'windows' | ||||||
|     linker_export_flags = '-Wl,--export-all-symbols' |     linker_export_flags = '-Wl,--export-all-symbols' | ||||||
| elif host_machine.system() == 'sunos' or host_machine.system() == 'darwin' | elif host_machine.system() == 'sunos' or host_machine.system() == 'darwin' | ||||||
|     linker_export_flags = [] |     linker_export_flags = [] | ||||||
|  |  | ||||||
|  | @ -106,7 +106,7 @@ | ||||||
| /**************************************************************************/ | /**************************************************************************/ | ||||||
| /* Linux or Glibc-based system                                            */ | /* Linux or Glibc-based system                                            */ | ||||||
| /**************************************************************************/ | /**************************************************************************/ | ||||||
| #if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__) | #if defined(__linux__) || defined(__GLIBC__) | ||||||
| #include <sys/ioctl.h> | #include <sys/ioctl.h> | ||||||
| #include <signal.h> | #include <signal.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
|  |  | ||||||
|  | @ -72,18 +72,6 @@ DDXRingBell(int volume, int pitch, int duration) | ||||||
|     return; |     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 */ | /* See Porting Layer Definition - p. 17 */ | ||||||
| void | void | ||||||
| InitInput(int argc, char *argv[]) | InitInput(int argc, char *argv[]) | ||||||
|  |  | ||||||
|  | @ -46,9 +46,6 @@ from The Open Group. | ||||||
| #ifdef DPMSExtension | #ifdef DPMSExtension | ||||||
| #include "dpmsproc.h" | #include "dpmsproc.h" | ||||||
| #endif | #endif | ||||||
| #ifdef __CYGWIN__ |  | ||||||
| #include <mntent.h> |  | ||||||
| #endif |  | ||||||
| #if defined(WIN32) | #if defined(WIN32) | ||||||
| #include "xkbsrv.h" | #include "xkbsrv.h" | ||||||
| #endif | #endif | ||||||
|  | @ -216,17 +213,6 @@ ddxGiveUp(enum ExitCode error) | ||||||
|     /* Notify the worker threads we're exiting */ |     /* Notify the worker threads we're exiting */ | ||||||
|     winDeinitMultiWindowWM(); |     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) { |     if (!g_fLogInited) { | ||||||
|         g_pszLogFile = LogInit(g_pszLogFile, ".old"); |         g_pszLogFile = LogInit(g_pszLogFile, ".old"); | ||||||
|         g_fLogInited = TRUE; |         g_fLogInited = TRUE; | ||||||
|  | @ -263,95 +249,6 @@ ddxGiveUp(enum ExitCode error) | ||||||
|     winDebug("ddxGiveUp - End\n"); |     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 | #ifdef RELOCATE_PROJECTROOT | ||||||
| const char * | const char * | ||||||
| winGetBaseDir(void) | winGetBaseDir(void) | ||||||
|  | @ -651,8 +548,6 @@ OsVendorInit(void) | ||||||
|     if (serverGeneration == 1) |     if (serverGeneration == 1) | ||||||
|         winLogVersionInfo(); |         winLogVersionInfo(); | ||||||
| 
 | 
 | ||||||
|     winCheckMount(); |  | ||||||
| 
 |  | ||||||
|     /* Add a default screen if no screens were specified */ |     /* Add a default screen if no screens were specified */ | ||||||
|     if (g_iNumScreens == 0) { |     if (g_iNumScreens == 0) { | ||||||
|         winDebug("OsVendorInit - Creating default screen 0\n"); |         winDebug("OsVendorInit - Creating default screen 0\n"); | ||||||
|  |  | ||||||
|  | @ -7,12 +7,8 @@ build_windowsdri = windowsdri_dep.found() | ||||||
| xwin_sys_libs = [] | xwin_sys_libs = [] | ||||||
| xwin_sys_libs += '-ldxguid' | xwin_sys_libs += '-ldxguid' | ||||||
| 
 | 
 | ||||||
| if host_machine.system() == 'cygwin' | server_name = 'Xming' | ||||||
|     server_name = 'XWin' | xwin_sys_libs += ['-lpthread', '-lws2_32'] | ||||||
| else |  | ||||||
|     server_name = 'Xming' |  | ||||||
|     xwin_sys_libs += ['-lpthread', '-lws2_32'] |  | ||||||
| endif |  | ||||||
| 
 | 
 | ||||||
| xwin_c_args = [] | xwin_c_args = [] | ||||||
| xwin_c_args += '-DHAVE_XWIN_CONFIG_H' | xwin_c_args += '-DHAVE_XWIN_CONFIG_H' | ||||||
|  |  | ||||||
|  | @ -524,9 +524,6 @@ extern winScreenInfo *g_ScreenInfo; | ||||||
| extern miPointerScreenFuncRec g_winPointerCursorFuncs; | extern miPointerScreenFuncRec g_winPointerCursorFuncs; | ||||||
| extern DWORD g_dwEvents; | extern DWORD g_dwEvents; | ||||||
| 
 | 
 | ||||||
| #ifdef HAS_DEVWINDOWS |  | ||||||
| extern int g_fdMessageQueue; |  | ||||||
| #endif |  | ||||||
| extern DevPrivateKeyRec g_iScreenPrivateKeyRec; | extern DevPrivateKeyRec g_iScreenPrivateKeyRec; | ||||||
| 
 | 
 | ||||||
| #define g_iScreenPrivateKey  	(&g_iScreenPrivateKeyRec) | #define g_iScreenPrivateKey  	(&g_iScreenPrivateKeyRec) | ||||||
|  |  | ||||||
|  | @ -40,7 +40,6 @@ winBlockHandler(ScreenPtr pScreen, void *pTimeout) | ||||||
| { | { | ||||||
|     winScreenPriv(pScreen); |     winScreenPriv(pScreen); | ||||||
| 
 | 
 | ||||||
| #ifndef HAS_DEVWINDOWS |  | ||||||
|     struct timeval **tvp = pTimeout; |     struct timeval **tvp = pTimeout; | ||||||
| 
 | 
 | ||||||
|     if (*tvp != NULL) { |     if (*tvp != NULL) { | ||||||
|  | @ -60,7 +59,6 @@ winBlockHandler(ScreenPtr pScreen, void *pTimeout) | ||||||
|         (*tvp)->tv_usec = 100; |         (*tvp)->tv_usec = 100; | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
|     /* Signal threaded modules to begin */ |     /* Signal threaded modules to begin */ | ||||||
|     if (pScreenPriv != NULL && !pScreenPriv->fServerStarted) { |     if (pScreenPriv != NULL && !pScreenPriv->fServerStarted) { | ||||||
|  |  | ||||||
|  | @ -61,9 +61,6 @@ | ||||||
| 
 | 
 | ||||||
| #define WIN_CLIPBOARD_WINDOW_CLASS		"xwinclip" | #define WIN_CLIPBOARD_WINDOW_CLASS		"xwinclip" | ||||||
| #define WIN_CLIPBOARD_WINDOW_TITLE		"xwinclip" | #define WIN_CLIPBOARD_WINDOW_TITLE		"xwinclip" | ||||||
| #ifdef HAS_DEVWINDOWS |  | ||||||
| #define WIN_MSG_QUEUE_FNAME "/dev/windows" |  | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * Global variables |  * Global variables | ||||||
|  | @ -110,11 +107,7 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info) | ||||||
|     int iReturn; |     int iReturn; | ||||||
|     HWND hwnd = NULL; |     HWND hwnd = NULL; | ||||||
|     int iConnectionNumber = 0; |     int iConnectionNumber = 0; | ||||||
| #ifdef HAS_DEVWINDOWS |  | ||||||
|     int fdMessageQueue = 0; |  | ||||||
| #else |  | ||||||
|     struct timeval tvTimeout; |     struct timeval tvTimeout; | ||||||
| #endif |  | ||||||
|     fd_set fdsRead; |     fd_set fdsRead; | ||||||
|     int iMaxDescriptor; |     int iMaxDescriptor; | ||||||
|     xcb_connection_t *conn; |     xcb_connection_t *conn; | ||||||
|  | @ -139,19 +132,7 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info) | ||||||
|     /* Get our connection number */ |     /* Get our connection number */ | ||||||
|     iConnectionNumber = xcb_get_file_descriptor(conn); |     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; |     iMaxDescriptor = iConnectionNumber + 1; | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
|     const xcb_query_extension_reply_t *xfixes_query; |     const xcb_query_extension_reply_t *xfixes_query; | ||||||
|     xfixes_query = xcb_get_extension_data(conn, &xcb_xfixes_id); |     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_ZERO(&fdsRead); | ||||||
|         FD_SET(iConnectionNumber, &fdsRead); |         FD_SET(iConnectionNumber, &fdsRead); | ||||||
| #ifdef HAS_DEVWINDOWS |  | ||||||
|         FD_SET(fdMessageQueue, &fdsRead); |  | ||||||
| #else |  | ||||||
|         tvTimeout.tv_sec = 0; |         tvTimeout.tv_sec = 0; | ||||||
|         tvTimeout.tv_usec = 100; |         tvTimeout.tv_usec = 100; | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
|         /* Wait for a Windows event or an X event */ |         /* Wait for a Windows event or an X event */ | ||||||
|         iReturn = select(iMaxDescriptor,        /* Highest fds number */ |         iReturn = select(iMaxDescriptor,        /* Highest fds number */ | ||||||
|                          &fdsRead,      /* Read mask */ |                          &fdsRead,      /* Read mask */ | ||||||
|                          NULL,  /* No write mask */ |                          NULL,  /* No write mask */ | ||||||
|                          NULL,  /* No exception mask */ |                          NULL,  /* No exception mask */ | ||||||
| #ifdef HAS_DEVWINDOWS |  | ||||||
|                          NULL   /* No timeout */ |  | ||||||
| #else |  | ||||||
|                          &tvTimeout     /* Set timeout */ |                          &tvTimeout     /* Set timeout */ | ||||||
| #endif |  | ||||||
|             ); |             ); | ||||||
| 
 | 
 | ||||||
| #ifndef HAS_WINSOCK | #ifndef HAS_WINSOCK | ||||||
|  | @ -314,24 +287,6 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info) | ||||||
|             winDebug |             winDebug | ||||||
|                 ("winClipboardProc - X connection ready, pumping X event queue\n"); |                 ("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 */ |     /* broke out of while loop on a shutdown message */ | ||||||
|  | @ -353,12 +308,6 @@ winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info) | ||||||
|         free(error); |         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 |      * 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 |      * into the server.  Unlike XCloseDisplay() there will be no deadlock if the | ||||||
|  |  | ||||||
|  | @ -42,9 +42,6 @@ | ||||||
| int g_iNumScreens = 0; | int g_iNumScreens = 0; | ||||||
| winScreenInfo *g_ScreenInfo = 0; | winScreenInfo *g_ScreenInfo = 0; | ||||||
| 
 | 
 | ||||||
| #ifdef HAS_DEVWINDOWS |  | ||||||
| int g_fdMessageQueue = WIN_FD_INVALID; |  | ||||||
| #endif |  | ||||||
| DevPrivateKeyRec g_iScreenPrivateKeyRec; | DevPrivateKeyRec g_iScreenPrivateKeyRec; | ||||||
| DevPrivateKeyRec g_iCmapPrivateKeyRec; | DevPrivateKeyRec g_iCmapPrivateKeyRec; | ||||||
| DevPrivateKeyRec g_iGCPrivateKeyRec; | DevPrivateKeyRec g_iGCPrivateKeyRec; | ||||||
|  |  | ||||||
|  | @ -467,12 +467,6 @@ winKeybdReleaseKeys(void) | ||||||
| { | { | ||||||
|     int i; |     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 */ |     /* Loop through all keys */ | ||||||
|     for (i = 0; i < NUM_KEYCODES; ++i) { |     for (i = 0; i < NUM_KEYCODES; ++i) { | ||||||
|         /* Pop key if pressed */ |         /* Pop key if pressed */ | ||||||
|  |  | ||||||
|  | @ -37,9 +37,6 @@ | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #include <unistd.h> | #include <unistd.h> | ||||||
| #ifdef __CYGWIN__ |  | ||||||
| #include <sys/select.h> |  | ||||||
| #endif |  | ||||||
| #include <fcntl.h> | #include <fcntl.h> | ||||||
| #include <setjmp.h> | #include <setjmp.h> | ||||||
| #define HANDLE void * | #define HANDLE void * | ||||||
|  | @ -87,9 +84,6 @@ extern void winUpdateRgnMultiWindow(WindowPtr pWin); | ||||||
| 
 | 
 | ||||||
| #define WIN_CONNECT_RETRIES	5 | #define WIN_CONNECT_RETRIES	5 | ||||||
| #define WIN_CONNECT_DELAY	5 | #define WIN_CONNECT_DELAY	5 | ||||||
| #ifdef HAS_DEVWINDOWS |  | ||||||
| #define WIN_MSG_QUEUE_FNAME	"/dev/windows" |  | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
| /*
 | /*
 | ||||||
|  * Local structures |  * Local structures | ||||||
|  |  | ||||||
|  | @ -35,10 +35,6 @@ | ||||||
| #endif | #endif | ||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <stdlib.h> | #include <stdlib.h> | ||||||
| #ifdef __CYGWIN__ |  | ||||||
| #include <sys/resource.h> |  | ||||||
| #include <sys/cygwin.h> |  | ||||||
| #endif |  | ||||||
| #include "win.h" | #include "win.h" | ||||||
| 
 | 
 | ||||||
| #include <X11/Xwindows.h> | #include <X11/Xwindows.h> | ||||||
|  | @ -313,28 +309,6 @@ HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv) | ||||||
|             if (command == m->menuItem[j].commandID) { |             if (command == m->menuItem[j].commandID) { | ||||||
|                 /* Match! */ |                 /* Match! */ | ||||||
|                 switch (m->menuItem[j].cmd) { |                 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: |                 case CMD_EXEC: | ||||||
|                 { |                 { | ||||||
|                     /* Start process without console window */ |                     /* Start process without console window */ | ||||||
|  | @ -360,7 +334,6 @@ HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv) | ||||||
|                                    MB_OK | MB_ICONEXCLAMATION); |                                    MB_OK | MB_ICONEXCLAMATION); | ||||||
|                 } |                 } | ||||||
|                     return TRUE; |                     return TRUE; | ||||||
| #endif |  | ||||||
|                 case CMD_ALWAYSONTOP: |                 case CMD_ALWAYSONTOP: | ||||||
|                     if (!hwnd) |                     if (!hwnd) | ||||||
|                         return FALSE; |                         return FALSE; | ||||||
|  | @ -542,9 +515,6 @@ LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags) | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|         char *file = malloc(PATH_MAX + NAME_MAX + 2); |         char *file = malloc(PATH_MAX + NAME_MAX + 2); | ||||||
| #ifdef  __CYGWIN__ |  | ||||||
|         Bool convert = FALSE; |  | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
|         if (!file) |         if (!file) | ||||||
|             return NULL; |             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 starts 'X:\', it's an absolute Windows path, do nothing */ | ||||||
|         if (!(fname[0] && fname[1] == ':' && fname[2] == '\\')) { |         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) { |             if (iconDirectory) { | ||||||
|                 /* Otherwise, prepend the default icon directory, which
 |                 /* Otherwise, prepend the default icon directory, which
 | ||||||
|                    currently must be in absolute Windows path form */ |                    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; |             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) { |         if (i >= 0) { | ||||||
|             /* Specified as <fname>,<index> */ |             /* Specified as <fname>,<index> */ | ||||||
|             hicon = ExtractIcon(g_hInstance, file, i); |             hicon = ExtractIcon(g_hInstance, file, i); | ||||||
|  | @ -669,19 +620,6 @@ winPrefsLoadPreferences(const char *path) | ||||||
| 
 | 
 | ||||||
|     if (path) |     if (path) | ||||||
|         prefFile = fopen(path, "r"); |         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) { |     if (!prefFile) { | ||||||
|         ErrorF("LoadPreferences: %s not found\n", path); |         ErrorF("LoadPreferences: %s not found\n", path); | ||||||
|  |  | ||||||
|  | @ -52,9 +52,6 @@ | ||||||
| #define WINDOW_CLASS_X_MSG      "cygwin/x X msg" | #define WINDOW_CLASS_X_MSG      "cygwin/x X msg" | ||||||
| #define WINDOW_TITLE_X		PROJECT_NAME " X" | #define WINDOW_TITLE_X		PROJECT_NAME " X" | ||||||
| #define WIN_WINDOW_PROP		"cyg_window_prop_rl" | #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_WID_PROP		"cyg_wid_prop_rl" | ||||||
| #define WIN_NEEDMANAGE_PROP	"cyg_override_redirect_prop_rl" | #define WIN_NEEDMANAGE_PROP	"cyg_override_redirect_prop_rl" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -404,8 +404,6 @@ xwin_data = configuration_data() | ||||||
| xwin_data.set_quoted('DEFAULT_LOGDIR', log_dir) | xwin_data.set_quoted('DEFAULT_LOGDIR', log_dir) | ||||||
| xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows' ? '1' : false, | xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows' ? '1' : false, | ||||||
|               description: 'Use Windows sockets') |               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, | xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false, | ||||||
|               description: 'Make paths relative to the xserver installation location') |               description: 'Make paths relative to the xserver installation location') | ||||||
| xwin_data.set10('ENABLE_DEBUG', enable_debugging) | xwin_data.set10('ENABLE_DEBUG', enable_debugging) | ||||||
|  |  | ||||||
|  | @ -411,7 +411,7 @@ xorg_backtrace(void); | ||||||
| 
 | 
 | ||||||
| #include <signal.h> | #include <signal.h> | ||||||
| 
 | 
 | ||||||
| #if defined(WIN32) && !defined(__CYGWIN__) | #if defined(WIN32) | ||||||
| typedef _sigset_t sigset_t; | typedef _sigset_t sigset_t; | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -9,9 +9,6 @@ | ||||||
| /* Winsock networking */ | /* Winsock networking */ | ||||||
| #mesondefine HAS_WINSOCK | #mesondefine HAS_WINSOCK | ||||||
| 
 | 
 | ||||||
| /* Cygwin has /dev/windows for signaling new win32 messages */ |  | ||||||
| #mesondefine HAS_DEVWINDOWS |  | ||||||
| 
 |  | ||||||
| /* Switch on debug messages */ | /* Switch on debug messages */ | ||||||
| #mesondefine ENABLE_DEBUG | #mesondefine ENABLE_DEBUG | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										11
									
								
								meson.build
								
								
								
								
							
							
						
						
									
										11
									
								
								meson.build
								
								
								
								
							|  | @ -184,7 +184,7 @@ endif | ||||||
| 
 | 
 | ||||||
| build_udev = get_option('udev') | build_udev = get_option('udev') | ||||||
| build_udev_kms = get_option('udev_kms') | 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 = false | ||||||
|     build_udev_kms = false |     build_udev_kms = false | ||||||
| endif | endif | ||||||
|  | @ -249,8 +249,7 @@ build_xnest = get_option('xnest') != 'false' | ||||||
| 
 | 
 | ||||||
| build_xwin = false | build_xwin = false | ||||||
| if get_option('xwin') == 'auto' | if get_option('xwin') == 'auto' | ||||||
|     if (host_machine.system() == 'cygwin' or |     if host_machine.system() == 'windows' | ||||||
|         host_machine.system() == 'windows') |  | ||||||
|             build_xwin = true |             build_xwin = true | ||||||
|     endif |     endif | ||||||
| else | else | ||||||
|  | @ -523,8 +522,7 @@ build_modesetting = libdrm_dep.found() and dri2proto_dep.found() | ||||||
| build_vgahw = false | build_vgahw = false | ||||||
| if get_option('vgahw') == 'auto' | if get_option('vgahw') == 'auto' | ||||||
|     if (host_machine.system() != 'darwin' and |     if (host_machine.system() != 'darwin' and | ||||||
|         host_machine.system() != 'windows' and |         host_machine.system() != 'windows') | ||||||
|         host_machine.system() != 'cygwin') |  | ||||||
|         build_vgahw = true |         build_vgahw = true | ||||||
|     endif |     endif | ||||||
| else | else | ||||||
|  | @ -866,8 +864,7 @@ if build_xorg | ||||||
| 
 | 
 | ||||||
|     # On Windows, modules built with the SDK will need to link with server and |     # On Windows, modules built with the SDK will need to link with server and | ||||||
|     # module implibs to resolve symbols |     # module implibs to resolve symbols | ||||||
|     if (host_machine.system() == 'cygwin' or |     if host_machine.system() == 'windows' | ||||||
|         host_machine.system() == 'windows') |  | ||||||
|         sdkconfig.set('XORG_DRIVER_LIBS', '-lXorg.exe -L\${moduledir} -lshadow -no-undefined') |         sdkconfig.set('XORG_DRIVER_LIBS', '-lXorg.exe -L\${moduledir} -lshadow -no-undefined') | ||||||
|     endif |     endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -166,7 +166,7 @@ SOFTWARE. | ||||||
| 
 | 
 | ||||||
| #endif                          /* WIN32 */ | #endif                          /* WIN32 */ | ||||||
| 
 | 
 | ||||||
| #if !defined(WIN32) || defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
| #include <libgen.h> | #include <libgen.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | @ -1081,7 +1081,7 @@ ComputeLocalClient(ClientPtr client) | ||||||
|          */ |          */ | ||||||
|         char *tok = strtok(cmd, ":"); |         char *tok = strtok(cmd, ":"); | ||||||
| 
 | 
 | ||||||
| #if !defined(WIN32) || defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
|         ret = strcmp(basename(tok), "ssh") != 0; |         ret = strcmp(basename(tok), "ssh") != 0; | ||||||
| #else | #else | ||||||
|         ret = strcmp(tok, "ssh") != 0; |         ret = strcmp(tok, "ssh") != 0; | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								os/osinit.c
								
								
								
								
							
							
						
						
									
										12
									
								
								os/osinit.c
								
								
								
								
							|  | @ -106,7 +106,7 @@ OsRegisterSigWrapper(OsSigWrapperPtr newSigWrapper) | ||||||
|  * OsSigHandler -- |  * OsSigHandler -- | ||||||
|  *    Catch unexpected signals and exit or continue cleanly. |  *    Catch unexpected signals and exit or continue cleanly. | ||||||
|  */ |  */ | ||||||
| #if !defined(WIN32) || defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
| static void | static void | ||||||
| #ifdef SA_SIGINFO | #ifdef SA_SIGINFO | ||||||
| OsSigHandler(int signo, siginfo_t * sip, void *unused) | OsSigHandler(int signo, siginfo_t * sip, void *unused) | ||||||
|  | @ -158,7 +158,7 @@ OsSigHandler(int signo) | ||||||
|     FatalError("Caught signal %d (%s). Server aborting\n", |     FatalError("Caught signal %d (%s). Server aborting\n", | ||||||
|                signo, strsignal(signo)); |                signo, strsignal(signo)); | ||||||
| } | } | ||||||
| #endif /* !WIN32 || __CYGWIN__ */ | #endif /* !WIN32 */ | ||||||
| 
 | 
 | ||||||
| void | void | ||||||
| OsInit(void) | OsInit(void) | ||||||
|  | @ -170,7 +170,7 @@ OsInit(void) | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|     if (!been_here) { |     if (!been_here) { | ||||||
| #if !defined(WIN32) || defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
|         struct sigaction act, oact; |         struct sigaction act, oact; | ||||||
|         int i; |         int i; | ||||||
| 
 | 
 | ||||||
|  | @ -198,7 +198,7 @@ OsInit(void) | ||||||
|                        siglist[i], strerror(errno)); |                        siglist[i], strerror(errno)); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| #endif /* !WIN32 || __CYGWIN__ */ | #endif /* !WIN32 */ | ||||||
|         busfault_init(); |         busfault_init(); | ||||||
|         server_poll = ospoll_create(); |         server_poll = ospoll_create(); | ||||||
|         if (!server_poll) |         if (!server_poll) | ||||||
|  | @ -252,7 +252,7 @@ OsInit(void) | ||||||
|                 dup2(fileno(err), 2); |                 dup2(fileno(err), 2); | ||||||
|                 fclose(err); |                 fclose(err); | ||||||
|             } |             } | ||||||
| #if defined(SVR4) || defined(WIN32) || defined(__CYGWIN__) | #if defined(SVR4) || defined(WIN32) | ||||||
|             { |             { | ||||||
|                 static char buf[BUFSIZ]; |                 static char buf[BUFSIZ]; | ||||||
| 
 | 
 | ||||||
|  | @ -264,7 +264,7 @@ OsInit(void) | ||||||
|         } |         } | ||||||
| #endif /* !XQUARTZ */ | #endif /* !XQUARTZ */ | ||||||
| 
 | 
 | ||||||
| #if !defined(WIN32) || defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
|         if (getpgrp() == 0) |         if (getpgrp() == 0) | ||||||
|             setpgid(0, 0); |             setpgid(0, 0); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
							
								
								
									
										22
									
								
								os/utils.c
								
								
								
								
							
							
						
						
									
										22
									
								
								os/utils.c
								
								
								
								
							|  | @ -50,17 +50,7 @@ OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| 
 | 
 | ||||||
| #include <dix-config.h> | #include <dix-config.h> | ||||||
| 
 | 
 | ||||||
| #ifdef __CYGWIN__ | #if defined(WIN32) | ||||||
| #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__) |  | ||||||
| #include <X11/Xwinsock.h> | #include <X11/Xwinsock.h> | ||||||
| #endif | #endif | ||||||
| #include <X11/Xos.h> | #include <X11/Xos.h> | ||||||
|  | @ -146,7 +136,7 @@ static clockid_t clockid; | ||||||
| OsSigHandlerPtr | OsSigHandlerPtr | ||||||
| OsSignal(int sig, OsSigHandlerPtr handler) | OsSignal(int sig, OsSigHandlerPtr handler) | ||||||
| { | { | ||||||
| #if defined(WIN32) && !defined(__CYGWIN__) | #if defined(WIN32) | ||||||
|     return signal(sig, handler); |     return signal(sig, handler); | ||||||
| #else | #else | ||||||
|     struct sigaction act, oact; |     struct sigaction act, oact; | ||||||
|  | @ -204,7 +194,7 @@ ForceClockId(clockid_t forced_clockid) | ||||||
| } | } | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #if (defined WIN32 && defined __MINGW32__) || defined(__CYGWIN__) | #if (defined WIN32 && defined __MINGW32__) | ||||||
| CARD32 | CARD32 | ||||||
| GetTimeInMillis(void) | GetTimeInMillis(void) | ||||||
| { | { | ||||||
|  | @ -605,7 +595,7 @@ ProcessCommandLine(int argc, char *argv[]) | ||||||
| #endif | #endif | ||||||
| #ifdef LOCK_SERVER | #ifdef LOCK_SERVER | ||||||
|         else if (strcmp(argv[i], "-nolock") == 0) { |         else if (strcmp(argv[i], "-nolock") == 0) { | ||||||
| #if !defined(WIN32) && !defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
|             if (getuid() != 0) |             if (getuid() != 0) | ||||||
|                 ErrorF |                 ErrorF | ||||||
|                     ("Warning: the -nolock option can only be used by root\n"); |                     ("Warning: the -nolock option can only be used by root\n"); | ||||||
|  | @ -1030,7 +1020,7 @@ OsAbort(void) | ||||||
| #ifndef __APPLE__ | #ifndef __APPLE__ | ||||||
|     OsBlockSignals(); |     OsBlockSignals(); | ||||||
| #endif | #endif | ||||||
| #if !defined(WIN32) || defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
|     /* abort() raises SIGABRT, so we have to stop handling that to prevent
 |     /* abort() raises SIGABRT, so we have to stop handling that to prevent
 | ||||||
|      * recursion |      * recursion | ||||||
|      */ |      */ | ||||||
|  | @ -1517,7 +1507,7 @@ CheckUserAuthorization(void) | ||||||
| #endif | #endif | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #if !defined(WIN32) || defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
| /* Move a file descriptor out of the way of our select mask; this
 | /* Move a file descriptor out of the way of our select mask; this
 | ||||||
|  * is useful for file descriptors which will never appear in the |  * is useful for file descriptors which will never appear in the | ||||||
|  * select mask to avoid reducing the number of clients that can |  * select mask to avoid reducing the number of clients that can | ||||||
|  |  | ||||||
|  | @ -81,7 +81,7 @@ | ||||||
| #include <assert.h>                          /* assertion macros */ | #include <assert.h>                          /* assertion macros */ | ||||||
| #include <string.h>                          /* string functions */ | #include <string.h>                          /* string functions */ | ||||||
| 
 | 
 | ||||||
| #if defined(WIN32) && !defined(__CYGWIN__) | #if defined(WIN32) | ||||||
| #include <X11/Xwinsock.h> | #include <X11/Xwinsock.h> | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -737,7 +737,7 @@ XkbProcessArguments(int argc, char *argv[], int i) | ||||||
| { | { | ||||||
|     if (strncmp(argv[i], "-xkbdir", 7) == 0) { |     if (strncmp(argv[i], "-xkbdir", 7) == 0) { | ||||||
|         if (++i < argc) { |         if (++i < argc) { | ||||||
| #if !defined(WIN32) && !defined(__CYGWIN__) | #if !defined(WIN32) | ||||||
|             if (getuid() != geteuid()) { |             if (getuid() != geteuid()) { | ||||||
|                 LogMessage(X_WARNING, |                 LogMessage(X_WARNING, | ||||||
|                            "-xkbdir is not available for setuid X servers\n"); |                            "-xkbdir is not available for setuid X servers\n"); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue