diff options
author | Paul Smith <psmith@gnu.org> | 2022-10-22 19:42:07 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-10-22 22:40:26 -0400 |
commit | f364e0d8d6e03f1e8bc995641530e4df6598704c (patch) | |
tree | f7700f2873b0c5b1dd5dffbb741c6f5f3ce43f01 /src/job.c | |
parent | bb0c05a7f0329dd2ea38021e9c0b9e74e0cdb7de (diff) | |
download | make-git-f364e0d8d6e03f1e8bc995641530e4df6598704c.tar.gz |
Set PATH_MAX on systems without a default value
Some systems (HURD) use fully-dynamic pathnames, with no limit.
We can't support this without significant effort so for now set
PATH_MAX to a large value.
* src/makeint.h: Set PATH_MAX to 4096 if not set and MAXPATHLEN
is also not set. Remove MAXPATHLEN setting: we won't use it.
* src/misc.c (get_path_max): If we can't get the path max via
pathconf() use the default PATH_MAX.
* src/dir.c (find_directory) [W32]: Use MAX_PATH not MAXPATHLEN.
(local_stat) [W32]: Ditto.
* src/job.c (create_batch_file) [W32]: Ditto.
* src/remake.c (name_mtime) [W32]: Ditto.
* src/w32/w32os.c (os_anontmp) [W32]: Ditto.
Diffstat (limited to 'src/job.c')
-rw-r--r-- | src/job.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -283,7 +283,7 @@ create_batch_file (char const *base, int unixy, int *fd) { const char *const ext = unixy ? "sh" : "bat"; const char *error_string = NULL; - char temp_path[MAXPATHLEN]; /* need to know its length */ + char temp_path[MAX_PATH+1]; /* need to know its length */ unsigned path_size = GetTempPath (sizeof temp_path, temp_path); int path_is_dot = 0; /* The following variable is static so we won't try to reuse a name |