From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Piotr Krukowiecki <piotr.krukowiecki@gmail.com>,
Junio C Hamano <junio@pobox.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Sebastian Schuberth <sschuberth@gmail.com>,
Git Mailing List <git@vger.kernel.org>,
Karsten Blees <karsten.blees@gmail.com>
Subject: Re: [PATCH] git-compat-util: Avoid strcasecmp() being inlined
Date: Thu, 19 Sep 2013 15:03:46 -0700 [thread overview]
Message-ID: <xmqqy56sqxj1.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20130919211659.GB16556@sigill.intra.peff.net> (Jeff King's message of "Thu, 19 Sep 2013 17:16:59 -0400")
Jeff King <peff@peff.net> writes:
> On Thu, Sep 19, 2013 at 11:47:51AM +0200, Piotr Krukowiecki wrote:
>
>> >> > it still ends up as a single function call). The downside is that it has
>> >> > to be remembered at each site that uses strcasecmp, but we do not use
>> >> > pointers to standard library functions very often.
>> >>
>> >> Is it possible to add a test which fails if wrapper is not used?
>> >
>> > No test needed for this, as compilation or linkage will fail, I think.
>>
>> But only when someone compiles on MinGW, no?
>
> Yeah. I think a more clear way to phrase the question would be: is there
> some trick we can use to booby-trap strcasecmp as a function pointer so
> that it fails to compile even on systems where it would otherwise work?
That line of thought nudges us toward the place Linus explicitly
said he didn't want to see us going, no? We do not particularly
want to care the exact nature of the breakage on MinGW. Do we
really want to set a booby-trap that intimately knows about how
their strcasecmp is broken, and possibly cover breakages of the same
kind but with other functions?
It isn't like "we are deliberately relying on this non-standard
behaviour we see on the system _we_ commonly use, and somebody on
a new strictly POSIX platform may be bitten by it", in which case it
would make sense to have a test that intimately knows about the
non-standard behaviour we rely on. This case is a total opposite.
next prev parent reply other threads:[~2013-09-19 22:03 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 16:06 [PATCH] git-compat-util: Avoid strcasecmp() being inlined Sebastian Schuberth
2013-09-11 18:29 ` Jonathan Nieder
2013-09-11 19:16 ` Jeff King
2013-09-19 6:04 ` Piotr Krukowiecki
[not found] ` <CAPc5daVt4Q9twub5KyOQqZHx9CwOnkuwA97sXV44fF2j1e5HVg@mail.gmail.com>
2013-09-19 9:47 ` Piotr Krukowiecki
2013-09-19 21:16 ` Jeff King
2013-09-19 22:03 ` Junio C Hamano [this message]
2013-09-19 22:05 ` Jeff King
2013-09-19 22:40 ` Junio C Hamano
2013-09-20 3:18 ` Jeff King
2013-09-20 6:21 ` Piotr Krukowiecki
2013-09-24 5:32 ` Jeff King
2013-09-11 19:59 ` Sebastian Schuberth
2013-09-11 21:41 ` Jeff King
2013-09-12 9:36 ` Sebastian Schuberth
2013-09-12 10:14 ` John Keeping
2013-09-12 15:37 ` Junio C Hamano
2013-09-12 18:20 ` Jeff King
2013-09-12 18:35 ` Junio C Hamano
2013-09-12 18:38 ` Jonathan Nieder
2013-09-12 19:51 ` Sebastian Schuberth
2013-09-12 20:08 ` Junio C Hamano
2013-09-13 12:33 ` Sebastian Schuberth
2013-09-13 14:26 ` Junio C Hamano
2013-09-13 19:34 ` Sebastian Schuberth
2013-09-12 21:36 ` Jonathan Nieder
2013-09-12 19:00 ` Jeff King
2013-09-12 19:46 ` Sebastian Schuberth
2013-09-12 20:22 ` Jeff King
2013-09-12 20:29 ` Junio C Hamano
2013-09-13 12:47 ` Sebastian Schuberth
2013-09-13 14:37 ` Junio C Hamano
2013-09-13 19:53 ` Sebastian Schuberth
2013-09-13 19:56 ` Linus Torvalds
2013-09-13 20:03 ` Sebastian Schuberth
2013-09-13 20:01 ` Junio C Hamano
2013-09-13 20:04 ` Sebastian Schuberth
2013-09-13 22:06 ` Junio C Hamano
2013-09-13 22:35 ` Junio C Hamano
2013-09-15 12:44 ` Sebastian Schuberth
2013-09-17 16:17 ` Junio C Hamano
2013-09-17 19:16 ` Sebastian Schuberth
2013-09-17 21:46 ` Junio C Hamano
2013-09-18 9:43 ` Sebastian Schuberth
2013-09-18 12:19 ` Linus Torvalds
2013-09-12 21:31 ` Jonathan Nieder
2013-09-19 13:47 ` Sebastian Schuberth
2013-09-11 18:39 ` Junio C Hamano
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=xmqqy56sqxj1.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=junio@pobox.com \
--cc=karsten.blees@gmail.com \
--cc=peff@peff.net \
--cc=piotr.krukowiecki@gmail.com \
--cc=sschuberth@gmail.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.