dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kylie McClain <somasissounds@gmail.com>
To: dash@vger.kernel.org
Cc: Kylie McClain <somasis@exherbo.org>
Subject: [PATCH 2/2] histedit: Remove non-glibc fallback code
Date: Thu,  4 Aug 2016 01:54:11 -0400	[thread overview]
Message-ID: <20160804055411.23558-2-somasissounds@gmail.com> (raw)
In-Reply-To: <20160804055411.23558-1-somasissounds@gmail.com>

From: Kylie McClain <somasis@exherbo.org>

This fallback code seems to go back the import of the repository back in 2005,
it fails on musl libc, and there aren't any comments explaining why this
difference is needed. Regardless, any compatibility ifdefs should probably be
checking macros defined on systems that need a different code path, rather than
just having fallback code for non-glibc.
---
 src/histedit.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/histedit.c b/src/histedit.c
index 94465d7..4498cf4 100644
--- a/src/histedit.c
+++ b/src/histedit.c
@@ -214,11 +214,7 @@ histcmd(int argc, char **argv)
 	if (argc == 1)
 		sh_error("missing history argument");
 
-#ifdef __GLIBC__
 	optind = 0;
-#else
-	optreset = 1; optind = 1; /* initialize getopt */
-#endif
 	while (not_fcnumber(argv[optind]) &&
 	      (ch = getopt(argc, argv, ":e:lnrs")) != -1)
 		switch ((char)ch) {
-- 
2.9.0


  reply	other threads:[~2016-08-04  6:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  5:54 [PATCH 1/2] mkbuiltins: Use a `while` loop rather than `nl` Kylie McClain
2016-08-04  5:54 ` Kylie McClain [this message]
2016-08-04 15:59   ` [PATCH 2/2] histedit: Remove non-glibc fallback code Jilles Tjoelker
2016-08-08 15:50     ` Jilles Tjoelker
2016-08-04 17:17 ` [PATCH 1/2] mkbuiltins: Use a `while` loop rather than `nl` Harald van Dijk
2016-08-06  9:02   ` Seb
2016-08-07 10:17     ` Seb
2016-08-06 16:51   ` Harald van Dijk
2016-08-08 15:33   ` Herbert Xu

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=20160804055411.23558-2-somasissounds@gmail.com \
    --to=somasissounds@gmail.com \
    --cc=dash@vger.kernel.org \
    --cc=somasis@exherbo.org \
    --subject='Re: [PATCH 2/2] histedit: Remove non-glibc fallback code' \
    /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

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).