Skip to content

Commit 203e682

Browse files
committed
compat: extract and document MAX_PATH
1 parent b63ddb7 commit 203e682

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/compat/compat.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,14 @@ typedef unsigned int SOCKET;
6565
#define S_IRUSR 0400
6666
#define S_IWUSR 0200
6767
#endif
68-
#else
68+
#endif
69+
70+
// Windows defines MAX_PATH as it's maximum path length.
71+
// We define MAX_PATH for use on non-Windows systems.
72+
#ifndef WIN32
6973
#define MAX_PATH 1024
7074
#endif
75+
7176
#ifdef _MSC_VER
7277
#if !defined(ssize_t)
7378
#ifdef _WIN64

0 commit comments

Comments
 (0)