winetest.exe - Wine detect patch, take 3.

Jakob Eriksson jakov at vmlinux.org
Wed Apr 21 18:35:32 CDT 2004



New version implemented as Ferenc showed me.

I used cvs diff -u -b, is that okay?

I am still not quite friends with my emacs but adding -b to cvs diff
fixed the whitespace noise.


regards,
Jakob

-------------- next part --------------
Index: main.c
===================================================================
RCS file: /home/wine/wine/programs/winetest/main.c,v
retrieving revision 1.11
diff -u -b -r1.11 main.c
--- main.c	20 Apr 2004 04:00:07 -0000	1.11
+++ main.c	21 Apr 2004 23:24:43 -0000
@@ -1,7 +1,7 @@
 /*
  * Wine Conformance Test EXE
  *
- * Copyright 2003 Jakob Eriksson   (for Solid Form Sweden AB)
+ * Copyright 2003, 2004 Jakob Eriksson   (for Solid Form Sweden AB)
  * Copyright 2003 Dimitrie O. Paun
  * Copyright 2003 Ferenc Wagner
  *
@@ -59,6 +59,20 @@
 
 static const char *wineloader;
 
+static int running_under_wine ()
+{
+    HMODULE module = LoadLibrary("ntdll");
+    FARPROC proc;
+
+    if (!module)
+        return 0;
+
+    proc = GetProcAddress(module, "wine_get_unix_file_name");
+    FreeLibrary(module);
+
+    return proc != NULL;
+}
+
 void print_version ()
 {
     OSVERSIONINFOEX ver;


More information about the wine-patches mailing list