diff options
| author | Paul Eggert | 2019-06-25 15:54:37 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-06-25 15:56:58 -0700 |
| commit | 824f78418783ee0af1c804b0decb037a13a4365e (patch) | |
| tree | 7a4127256fa1117b609b1d5c50c8490b391708e1 /lib | |
| parent | 7dcefa7a2bb4d2531d23cbf51eb98ce7727b366c (diff) | |
| download | emacs-824f78418783ee0af1c804b0decb037a13a4365e.tar.gz emacs-824f78418783ee0af1c804b0decb037a13a4365e.zip | |
Prefer PATH_MAX to MAXPATHLEN
PATH_MAX is standardized, MAXPATHLEN is not.
Also, the Gnulib pathmax module fixes some rare bugs with PATH_MAX.
So prefer PATH_MAX to MAXPATHLEN unless we know the latter is
also correct (for some platform-specific code).
* admin/merge-gnulib (GNULIB_MODULES): Add pathmax.
This module was already present, as a dependency of canonicalize-lgpl,
but now Emacs is using it directly. Sort.
* lib-src/emacsclient.c: Include stdint.h, pathmax.h.
(get_current_dir_name): Sync to current src/sysdep.c.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* src/sysdep.c: Include pathmax.h.
(get_current_dir_name_or_unreachable):
Use PATH_MAX instead of MAXPATHLEN.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gnulib.mk.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index b4d510bd62e..6f978aeb0cc 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in | |||
| @@ -120,6 +120,7 @@ | |||
| 120 | # mkostemp \ | 120 | # mkostemp \ |
| 121 | # mktime \ | 121 | # mktime \ |
| 122 | # nstrftime \ | 122 | # nstrftime \ |
| 123 | # pathmax \ | ||
| 123 | # pipe2 \ | 124 | # pipe2 \ |
| 124 | # pselect \ | 125 | # pselect \ |
| 125 | # pthread_sigmask \ | 126 | # pthread_sigmask \ |
| @@ -1076,6 +1077,7 @@ gl_GNULIB_ENABLED_getdtablesize = @gl_GNULIB_ENABLED_getdtablesize@ | |||
| 1076 | gl_GNULIB_ENABLED_getgroups = @gl_GNULIB_ENABLED_getgroups@ | 1077 | gl_GNULIB_ENABLED_getgroups = @gl_GNULIB_ENABLED_getgroups@ |
| 1077 | gl_GNULIB_ENABLED_malloca = @gl_GNULIB_ENABLED_malloca@ | 1078 | gl_GNULIB_ENABLED_malloca = @gl_GNULIB_ENABLED_malloca@ |
| 1078 | gl_GNULIB_ENABLED_open = @gl_GNULIB_ENABLED_open@ | 1079 | gl_GNULIB_ENABLED_open = @gl_GNULIB_ENABLED_open@ |
| 1080 | gl_GNULIB_ENABLED_pathmax = @gl_GNULIB_ENABLED_pathmax@ | ||
| 1079 | gl_GNULIB_ENABLED_strtoll = @gl_GNULIB_ENABLED_strtoll@ | 1081 | gl_GNULIB_ENABLED_strtoll = @gl_GNULIB_ENABLED_strtoll@ |
| 1080 | gl_LIBOBJS = @gl_LIBOBJS@ | 1082 | gl_LIBOBJS = @gl_LIBOBJS@ |
| 1081 | gl_LTLIBOBJS = @gl_LTLIBOBJS@ | 1083 | gl_LTLIBOBJS = @gl_LTLIBOBJS@ |
| @@ -2110,9 +2112,7 @@ endif | |||
| 2110 | ## begin gnulib module pathmax | 2112 | ## begin gnulib module pathmax |
| 2111 | ifeq (,$(OMIT_GNULIB_MODULE_pathmax)) | 2113 | ifeq (,$(OMIT_GNULIB_MODULE_pathmax)) |
| 2112 | 2114 | ||
| 2113 | ifneq (,$(gl_GNULIB_ENABLED_pathmax)) | ||
| 2114 | 2115 | ||
| 2115 | endif | ||
| 2116 | EXTRA_DIST += pathmax.h | 2116 | EXTRA_DIST += pathmax.h |
| 2117 | 2117 | ||
| 2118 | endif | 2118 | endif |