aboutsummaryrefslogtreecommitdiff
path: root/jimiocompat.h
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2025-02-24 09:14:09 +1000
committerSteve Bennett <steveb@workware.net.au>2025-02-24 09:14:09 +1000
commit2080ce323acd95b67218fc2c88e0d3fa8d28cc14 (patch)
treeabd3136ed252af6299ef99e550b9e90b401aa773 /jimiocompat.h
parentb0e7efa96c9868d1006af376cd699f17e7875e07 (diff)
downloadjimtcl-2080ce323acd95b67218fc2c88e0d3fa8d28cc14.zip
jimtcl-2080ce323acd95b67218fc2c88e0d3fa8d28cc14.tar.gz
jimtcl-2080ce323acd95b67218fc2c88e0d3fa8d28cc14.tar.bz2
Use PATH_MAX if it exists
Previously this was done in jim-file.c but no jim-aio.c Move to jimiocompat.h so it is done everywhere. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jimiocompat.h')
-rw-r--r--jimiocompat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/jimiocompat.h b/jimiocompat.h
index c384f81..0f807a0 100644
--- a/jimiocompat.h
+++ b/jimiocompat.h
@@ -124,6 +124,14 @@ int Jim_OpenForRead(const char *filename);
#endif
+# ifndef MAXPATHLEN
+# ifdef PATH_MAX
+# define MAXPATHLEN PATH_MAX
+# else
+# define MAXPATHLEN JIM_PATH_LEN
+# endif
+# endif
+
/* jim-file.c */
/* Note that this is currently an internal function only.
* It does not form part of the public Jim API