Provide replacement value for PATH_MAX on platforms without it.

The buffer length is used in a static array returned from
Extra_FileNameGenericAppend(), used many places in the code, and a
more dynamic approach would require a huge refactoring.  There is no
guarantee that the 4096 value picked is large enough, but it matches
common values found on Linux.
This commit is contained in:
Petter Reinholdtsen 2026-04-19 07:20:00 +02:00
parent 64637b8395
commit 1ddb7a2352
1 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,9 @@
#define PATH_MAX MAX_PATH
#else
#include <limits.h>
# ifndef PATH_MAX
# define PATH_MAX 4096
# endif
#endif
#include "extra.h"