Module: Mesa
Branch: master
Commit: bc98de4d14f9c099e47a7de6efc3766823ca3f54
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=bc98de4d14f9c099e47a7de6efc3766823ca3f54

Author: Daniel Stone <[email protected]>
Date:   Thu Mar 26 13:01:58 2020 +0000

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>

---

 src/util/process_test.c | 5 +++++
 1 file changed, 5 insertions(+)

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

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to