diff src/ntproc.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3a7e78e1142d
children abe6d1db359e
line wrap: on
line diff
--- a/src/ntproc.c	Mon Aug 13 11:32:27 2007 +0200
+++ b/src/ntproc.c	Mon Aug 13 11:33:38 2007 +0200
@@ -32,7 +32,7 @@
 #include <signal.h>
 
 /* must include CRT headers *before* config.h */
-/* ### I don't believe it - martin */
+/* #### I don't believe it - martin */
 #include <config.h>
 #undef signal
 #undef wait
@@ -120,6 +120,13 @@
 
 DWORD WINAPI reader_thread (void *arg);
 
+/* Determine if running on Windows 9x and not NT */
+static int
+windows9x_p (void)
+{
+  return GetVersion () & 0x80000000;
+}
+
 /* Find an unused process slot.  */
 child_process *
 new_child (void)
@@ -668,7 +675,9 @@
 	  errno = EINVAL;
 	  return -1;
 	}
-      GET_C_STRING_FILENAME_DATA_ALLOCA (full, cmdname);
+      TO_EXTERNAL_FORMAT (LISP_STRING, full,
+			  C_STRING_ALLOCA, cmdname,
+			  Qfile_name);
     }
   else
     {
@@ -937,7 +946,7 @@
 
       GetClassName (hwnd, window_class, sizeof (window_class));
       if (strcmp (window_class,
-		  (os_subtype == OS_WIN95)
+		  windows9x_p()
 		  ? "tty"
 		  : "ConsoleWindowClass") == 0)
 	{
@@ -1030,7 +1039,7 @@
       if (NILP (Vwin32_start_process_share_console) && cp && cp->hwnd)
 	{
 #if 1
-	  if (os_subtype == OS_WIN95)
+	  if (windows9x_p())
 	    {
 /*
    Another possibility is to try terminating the VDM out-right by
@@ -1419,7 +1428,7 @@
 
 /* Sync with FSF Emacs 19.34.6 note: dwWinThreadId declared in
    w32term.h and defined in w32fns.c, both of which are not in current
-   XEmacs.  ### Check what we lose by ifdef'ing out these. --marcpa */
+   XEmacs.  #### Check what we lose by ifdef'ing out these. --marcpa */
 #if 0
   /* Need to set input thread locale if present.  */
   if (dwWinThreadId)