From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Re: UTF-8 locales on BSDs do not support collation correctly
Date: Fri, 27 Jan 2017 09:41:56 +0000 [thread overview]
Message-ID: <20170127094156.44b31dfd@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20170126175717.0b5c87c1@pwslap01u.europe.root.pri>
On Thu, 26 Jan 2017 17:57:17 +0000
Peter Stephenson <p.stephenson@samsung.com> wrote:
> (I will supply a patch that checks for setutxent etc., now I've noticed
> there aren't any yet, but that doesn't appear to be the problem here,
> modulo obscurities.)
Can't see any reason not to commit it anyway.
Are there systems that use utmpx but getutent, not getutxent (which I
think was the implication of the old code)? If so, we need the
following; otherwise, we need the #ifdef higher up.
pws
diff --git a/Src/watch.c b/Src/watch.c
index 7a6b930..6103ef1 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 dda52bc..c6ece67 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],
next prev parent reply other threads:[~2017-01-27 9:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 14:27 Jun T.
2017-01-25 18:02 ` Mikael Magnusson
2017-01-26 17:57 ` Peter Stephenson
2017-01-26 19:30 ` Jens Elkner
2017-01-27 9:41 ` Peter Stephenson [this message]
2017-01-28 20:26 ` Bart Schaefer
2017-01-28 20:42 ` Peter Stephenson
2017-01-28 23:27 ` Bart Schaefer
2017-01-30 10:46 ` Peter Stephenson
2017-01-30 3:59 ` Bart Schaefer
2017-01-30 9:49 ` Peter Stephenson
2017-01-31 10:09 ` Jun T.
2017-01-31 11:19 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170127094156.44b31dfd@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).