Commit 6e14766a authored by Esme Povirk's avatar Esme Povirk Committed by Alexandre Julliard

localspl: Choose print environment based on architecture.

parent 0d05b01c
...@@ -256,6 +256,18 @@ static const printenv_t env_win40 = {L"Windows 4.0", L"win40", 0, ...@@ -256,6 +256,18 @@ static const printenv_t env_win40 = {L"Windows 4.0", L"win40", 0,
static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &env_ia64, &env_arm, &env_arm64, &env_win40}; static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &env_ia64, &env_arm, &env_arm64, &env_win40};
#ifdef __i386__
#define env_arch env_x86
#elif defined __x86_64__
#define env_arch env_x64
#elif defined __arm__
#define env_arch env_arm
#elif defined __aarch64__
#define env_arch env_arm64
#else
#error not defined for this cpu
#endif
static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_2W), static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_2W),
sizeof(DRIVER_INFO_3W), sizeof(DRIVER_INFO_4W), sizeof(DRIVER_INFO_3W), sizeof(DRIVER_INFO_4W),
...@@ -922,7 +934,7 @@ static const printenv_t * validate_envW(LPCWSTR env) ...@@ -922,7 +934,7 @@ static const printenv_t * validate_envW(LPCWSTR env)
} }
else else
{ {
result = (GetVersion() & 0x80000000) ? &env_win40 : &env_x86; result = (GetVersion() & 0x80000000) ? &env_win40 : &env_arch;
} }
TRACE("=> using %p: %s\n", result, debugstr_w(result ? result->envname : NULL)); TRACE("=> using %p: %s\n", result, debugstr_w(result ? result->envname : NULL));
......
...@@ -320,6 +320,18 @@ static const printenv_t env_win40 = {envname_win40W, subdir_win40W, 0, Version0_ ...@@ -320,6 +320,18 @@ static const printenv_t env_win40 = {envname_win40W, subdir_win40W, 0, Version0_
static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &env_arm, &env_arm64, &env_win40}; static const printenv_t * const all_printenv[] = {&env_x86, &env_x64, &env_arm, &env_arm64, &env_win40};
#ifdef __i386__
#define env_arch env_x86
#elif defined __x86_64__
#define env_arch env_x64
#elif defined __arm__
#define env_arch env_arm
#elif defined __aarch64__
#define env_arch env_arm64
#else
#error not defined for this cpu
#endif
/****************************************************************** /******************************************************************
* validate the user-supplied printing-environment [internal] * validate the user-supplied printing-environment [internal]
* *
...@@ -361,7 +373,7 @@ static const printenv_t * validate_envW(LPCWSTR env) ...@@ -361,7 +373,7 @@ static const printenv_t * validate_envW(LPCWSTR env)
} }
else else
{ {
result = (GetVersion() & 0x80000000) ? &env_win40 : &env_x86; result = (GetVersion() & 0x80000000) ? &env_win40 : &env_arch;
} }
TRACE("using %p: %s\n", result, debugstr_w(result ? result->envname : NULL)); TRACE("using %p: %s\n", result, debugstr_w(result ? result->envname : NULL));
......
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