1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-04-24 02:45:04 +02:00

50418: use setenv(3)/getenv(3) on newer macOS

This commit is contained in:
Jun-ichi Takimoto 2022-07-24 20:41:20 +09:00
parent 13c6b64838
commit ac6257f150
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2022-07-24 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 50418: Src/zsh_system.h, configure.ac: use setenv(3)/getenv(3)
on newer macOS
2022-07-16 Bart Schaefer <schaefer@Macadamia>
* users/27852: Completion/Unix/Command/_python: Make a local copy

View File

@ -783,7 +783,8 @@ extern char **environ;
* We always need setenv and unsetenv in pairs, because
* we don't know how to do memory management on the values set.
*/
#if defined(HAVE_SETENV) && defined(HAVE_UNSETENV) && !defined(__APPLE__)
#if defined(HAVE_SETENV) && defined(HAVE_UNSETENV) \
&& !defined(SETENV_MANGLES_EQUAL)
# define USE_SET_UNSET_ENV
#endif

View File

@ -1515,6 +1515,14 @@ else
zsh_cv_use_xattr=no
fi])
dnl We don't want to use setenv(3) on El Capitan or older OS X because it
dnl removes a leading '=' from the value of the environment variable
AH_TEMPLATE([SETENV_MANGLES_EQUAL],
[Define to 1 if setenv removes a leading =])
case $host_os in
darwin1[0-5]*) AC_DEFINE(SETENV_MANGLES_EQUAL) ;;
esac
dnl -------------
dnl CHECK SIGNALS
dnl -------------