changeset 31115:42753ce203f8

(IsValidLocale): Extern missing from mingw32 headers. (compare_env): (find_child_console): Fix compile warning. (create_child): Remove reference to security descriptor, which isn't needed and doesn't compile with mingw32.
author Andrew Innes <andrewi@gnu.org>
date Tue, 22 Aug 2000 23:39:00 +0000
parents cd392fdf0e9f
children bbd7763673b6
files src/w32proc.c
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/w32proc.c	Tue Aug 22 23:37:05 2000 +0000
+++ b/src/w32proc.c	Tue Aug 22 23:39:00 2000 +0000
@@ -38,6 +38,10 @@
 #undef kill
 
 #include <windows.h>
+#ifdef __GNUC__
+/* This definition is missing from mingw32 headers. */
+extern BOOL WINAPI IsValidLocale(LCID, DWORD);
+#endif
 
 #include "lisp.h"
 #include "w32.h"
@@ -304,7 +308,9 @@
 {
   STARTUPINFO start;
   SECURITY_ATTRIBUTES sec_attrs;
+#if 0
   SECURITY_DESCRIPTOR sec_desc;
+#endif
   DWORD flags;
   char dir[ MAXPATHLEN ];
   
@@ -325,13 +331,15 @@
   start.hStdError = GetStdHandle (STD_ERROR_HANDLE);
 #endif /* HAVE_NTGUI */
 
+#if 0
   /* Explicitly specify no security */
   if (!InitializeSecurityDescriptor (&sec_desc, SECURITY_DESCRIPTOR_REVISION))
     goto EH_Fail;
   if (!SetSecurityDescriptorDacl (&sec_desc, TRUE, NULL, FALSE))
     goto EH_Fail;
+#endif
   sec_attrs.nLength = sizeof (sec_attrs);
-  sec_attrs.lpSecurityDescriptor = &sec_desc;
+  sec_attrs.lpSecurityDescriptor = NULL /* &sec_desc */;
   sec_attrs.bInheritHandle = FALSE;
   
   strcpy (dir, process_dir);
@@ -650,9 +658,9 @@
 }
 
 int
-compare_env (const char **strp1, const char **strp2)
+compare_env (const void *strp1, const void *strp2)
 {
-  const char *str1 = *strp1, *str2 = *strp2;
+  const char *str1 = *(const char **)strp1, *str2 = *(const char **)strp2;
 
   while (*str1 && *str2 && *str1 != '=' && *str2 != '=')
     {
@@ -1302,8 +1310,9 @@
 /* Substitute for certain kill () operations */
 
 static BOOL CALLBACK
-find_child_console (HWND hwnd, child_process * cp)
+find_child_console (HWND hwnd, LPARAM arg)
 {
+  child_process * cp = (child_process *) arg;
   DWORD thread_id;
   DWORD process_id;