diff options
author | Daniel Stone <[email protected]> | 2020-03-26 13:01:58 +0000 |
---|---|---|
committer | Daniel Stone <[email protected]> | 2020-03-27 10:32:47 +0000 |
commit | bc98de4d14f9c099e47a7de6efc3766823ca3f54 (patch) | |
tree | 2408d7e13f71884b4b9819ceace43af2a0341c85 /src | |
parent | 8f573bdaaa7c41b19edf99e891665378b76d8fd4 (diff) |
util/test: Use MAX_PATH on Windows
Windows provides MAX_PATH rather than PATH_MAX for the maximum allowable
path length. This is not a limit on the length of filename which can
exist on the filesystem, but a length on the length of path which can be
passed to Win32 API calls.
Signed-off-by: Daniel Stone <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Fixes: f8f1413070a ("util/u_process: add util_get_process_exec_path")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4304>
Diffstat (limited to 'src')
-rw-r--r-- | src/util/process_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/process_test.c b/src/util/process_test.c index 708c2766eb9..00703df6034 100644 --- a/src/util/process_test.c +++ b/src/util/process_test.c @@ -31,6 +31,11 @@ #include <limits.h> #include <stdlib.h> +#if DETECT_OS_WINDOWS && !defined(PATH_MAX) +#include <windows.h> +#define PATH_MAX MAX_PATH +#endif + bool error = false; static void |