X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fsysfile.h;h=f573ce3eb2e685988c73361c1dd68c5a298637d1;hb=9816585ded614fa87be5a2ecfda6dc16c60beb2c;hp=69179b725d9cfe2d4c7ab8b3df4d405d3c4ef918;hpb=3e447015251ce6dcde843cbed10d9033d5538622;p=chise%2Fxemacs-chise.git- diff --git a/src/sysfile.h b/src/sysfile.h index 69179b7..f573ce3 100644 --- a/src/sysfile.h +++ b/src/sysfile.h @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ #define INCLUDED_sysfile_h_ #include +#include #ifndef WINDOWSNT #include /* does not always imply this */ @@ -206,10 +207,21 @@ Boston, MA 02111-1307, USA. */ #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) #endif +/* Client .c files should simply use `PATH_MAX'. */ +#ifndef PATH_MAX +# if defined (_POSIX_PATH_MAX) +# define PATH_MAX _POSIX_PATH_MAX +# elif defined (MAXPATHLEN) +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 1024 +# endif +#endif + +/* MAXPATHLEN is deprecated, but, as of this writing, still used. */ #ifndef MAXPATHLEN -/* in 4.1, param.h fails to define this. */ -#define MAXPATHLEN 1024 -#endif /* not MAXPATHLEN */ +# define MAXPATHLEN 1024 +#endif #ifndef X_OK # define X_OK 01