Commit 540d8186 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

cmd: Fix compilation on systems that don't support nameless unions.

parent 868dd534
......@@ -632,9 +632,9 @@ void WCMD_pushd (char *command) {
curdir -> next = pushd_directories;
curdir -> strings = thisdir;
if (pushd_directories == NULL) {
curdir -> stackdepth = 1;
curdir -> u.stackdepth = 1;
} else {
curdir -> stackdepth = pushd_directories -> stackdepth + 1;
curdir -> u.stackdepth = pushd_directories -> u.stackdepth + 1;
}
pushd_directories = curdir;
}
......@@ -916,7 +916,7 @@ void WCMD_setlocal (const char *s) {
/* Save the current drive letter */
GetCurrentDirectory (MAX_PATH, cwd);
env_copy->cwd = cwd[0];
env_copy->u.cwd = cwd[0];
}
else
LocalFree (env_copy);
......@@ -990,10 +990,10 @@ void WCMD_endlocal (void) {
}
/* Restore current drive letter */
if (IsCharAlpha(temp->cwd)) {
if (IsCharAlpha(temp->u.cwd)) {
char envvar[4];
char cwd[MAX_PATH];
sprintf(envvar, "=%c:", temp->cwd);
sprintf(envvar, "=%c:", temp->u.cwd);
if (GetEnvironmentVariable(envvar, cwd, MAX_PATH)) {
WINE_TRACE("Resetting cwd to %s\n", cwd);
SetCurrentDirectory(cwd);
......
......@@ -104,7 +104,7 @@ struct env_stack
union {
int stackdepth; /* Only used for pushd and popd */
char cwd; /* Only used for set/endlocal */
};
} u;
WCHAR *strings;
};
......
......@@ -1028,8 +1028,8 @@ void WCMD_show_prompt (void) {
break;
case '+':
if (pushd_directories) {
memset(q, '+', pushd_directories->stackdepth);
q = q + pushd_directories->stackdepth;
memset(q, '+', pushd_directories->u.stackdepth);
q = q + pushd_directories->u.stackdepth;
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment