char *p = *ep, *q = string;
while (ok)
{
- if (*q != *p)
+ if (*p && *q != *p)
break;
if (*q == 0)
/* The string is a lone variable name; keep it for now, we
#ifdef WINDOWSNT
prepare_standard_handles (in, out, err, handles);
- set_process_dir (SDATA (current_dir));
+ set_process_dir (SSDATA (current_dir));
/* Spawn the child. (See w32proc.c:sys_spawnve). */
cpid = spawnve (_P_NOWAIT, new_argv[0], new_argv, env);
reset_standard_handles (in, out, err, handles);
&& SBYTES (entry) >= varlen
#ifdef WINDOWSNT
/* NT environment variables are case insensitive. */
- && ! strnicmp (SDATA (entry), var, varlen)
+ && ! strnicmp (SSDATA (entry), var, varlen)
#else /* not WINDOWSNT */
&& ! memcmp (SDATA (entry), var, varlen)
#endif /* not WINDOWSNT */
Vprocess_environment))
return *value ? 1 : 0;
+ /* On Windows we make some modifications to Emacs' enviroment
+ without recording them in Vprocess_environment. */
+#ifdef WINDOWSNT
+ {
+ char* tmpval = getenv (var);
+ if (tmpval)
+ {
+ *value = tmpval;
+ *valuelen = strlen (tmpval);
+ return 1;
+ }
+ }
+#endif
+
/* For DISPLAY try to get the values from the frame or the initial env. */
if (strcmp (var, "DISPLAY") == 0)
{