diff options
author | Peter Stephenson <pws@zsh.org> | 2017-01-27 10:26:34 +0000 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2017-01-27 10:26:34 +0000 |
commit | 8575e2ba57892b49654ebf3dfa502c90e2b765b5 (patch) | |
tree | cd13d3b5ae41b3487a0fe0a783daee92d8cc7d10 | |
parent | 1633b2800d3679e3b89a34bcafa03956ed310b61 (diff) | |
download | zsh-8575e2ba57892b49654ebf3dfa502c90e2b765b5.tar.gz zsh-8575e2ba57892b49654ebf3dfa502c90e2b765b5.tar.xz zsh-8575e2ba57892b49654ebf3dfa502c90e2b765b5.zip |
40425: HAVE_* tests for getutxent etc.
Not yet 100% clear where the #if's go, depends on how various systems implement the old or new formats.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/watch.c | 9 | ||||
-rw-r--r-- | configure.ac | 3 |
3 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 272311ca3..1a23573b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-01-27 Peter Stephenson <p.stephenson@samsung.com> + + * 40425: configure.ac, Src/watch.c: HAVE_* tests for getutxent + etc. + 2017-01-26 Peter Stephenson <p.w.stephenson@ntlworld.com> * 40423: Src/params.c, Test/E01options.ztst: similar for type diff --git a/Src/watch.c b/Src/watch.c index 7a6b930b9..6103ef15f 100644 --- a/Src/watch.c +++ b/Src/watch.c @@ -87,9 +87,12 @@ #if !defined(WATCH_STRUCT_UTMP) && defined(HAVE_STRUCT_UTMPX) && defined(REAL_UTMPX_FILE) # define WATCH_STRUCT_UTMP struct utmpx -# define setutent setutxent -# define getutent getutxent -# define endutent endutxent +# if defined(HAVE_SETUTXENT) && defined(HAVE_GETUTXENT) && defined(HAVE_ENDUTXENT) +# define setutent setutxent +# define getutent getutxent +# define endutent endutxent +# endif + /* * In utmpx, the ut_name field is replaced by ut_user. * Howver, on some systems ut_name may already be defined this diff --git a/configure.ac b/configure.ac index dda52bc98..c6ece6709 100644 --- a/configure.ac +++ b/configure.ac @@ -1324,7 +1324,8 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \ symlink getcwd \ cygwin_conv_path \ nanosleep \ - srand_deterministic) + srand_deterministic \ + setutxent getutxent endutxent) AC_FUNC_STRCOLL AH_TEMPLATE([REALPATH_ACCEPTS_NULL], |