Patch - stub and workaround to make wineserver compile on cygwin

Steven Edwards Steven_Ed4153 at yahoo.com
Sat Sep 21 22:29:57 CDT 2002


This will allow you to run wineserver on cygwin. We still lack tons of 
stuff before we can have a WINE that really works on Cygwin but over the 
next few months/years++ as I am learning, I will keep working on this.

Changelog:
    Wineserver -
    Stub get/set_thread_context in wineserver so it will build/run
    Change permission error to a Warning when running on Windows/Cygwin



Index: context_i386.c
===================================================================
RCS file: /home/wine/wine/server/context_i386.c,v
retrieving revision 1.23
diff -u -r1.23 context_i386.c
--- context_i386.c    14 Aug 2002 20:59:03 -0000    1.23
+++ context_i386.c    22 Sep 2002 03:19:41 -0000
@@ -460,9 +460,24 @@
     file_set_error();
 }
 
-#else  /* linux || __sun__ || __FreeBSD__ */
+#elif defined(__MINGW__) || defined(__CYGWIN__) || defined(_WINDOWS)
+
+/* retrieve a thread context */
+static void get_thread_context( struct thread *thread, unsigned int 
flags, CONTEXT *context )
+{
+    printf("get_thread_context is a stub on WINDOWS!\n");
+    return 0;
+}
+
+static void set_thread_context( struct thread *thread, unsigned int 
flags, const CONTEXT *context )
+{
+    printf("get_thread_context is a stub on WINDOWS!\n");
+    return 0;
+}
+
+#else  /* linux || __sun__ || __FreeBSD__ || _WINDOWS */
 #error You must implement get/set_thread_context for your platform
-#endif  /* linux || __sun__ || __FreeBSD__ */
+#endif  /* linux || __sun__ || __FreeBSD__ || _WINDOWS */
 
 
 /* copy a context structure according to the flags */


Index: request.c
===================================================================
RCS file: /home/wine/wine/server/request.c,v
retrieving revision 1.67
diff -u -r1.67 request.c
--- request.c    16 Aug 2002 20:02:15 -0000    1.67
+++ request.c    22 Sep 2002 03:21:04 -0000
@@ -483,7 +483,11 @@
     }
     if (!S_ISDIR(st->st_mode)) fatal_error( "%s is not a directory\n", 
name );
     if (st->st_uid != getuid()) fatal_error( "%s is not owned by 
you\n", name );
+#if defined(__MINGW__) || defined(__CYGWIN__) || defined(_WINDOWS)
+    fprintf( stderr, "Warning: %s is accessible by other users\n", name );
+#else
     if (st->st_mode & 077) fatal_error( "%s must not be accessible by 
other users\n", name );
+#endif /* defined(__MINGW__) || defined(__CYGWIN__) || defined(_WINDOWS) */
 }
 
 /* create the server directory and chdir to it */





More information about the wine-devel mailing list