public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] tools/proftool: add missing definition
Date: Tue, 02 Jul 2013 08:39:24 +0200	[thread overview]
Message-ID: <51D2759C.4080407@googlemail.com> (raw)
In-Reply-To: <51D1E2AB.8070005@myspectrum.nl>

Hi Jeroen,

On 01.07.13 22:12, Jeroen Hofstee wrote:
> Hello Andreas,
> 
> On 07/01/2013 08:45 PM, Jeroen Hofstee wrote:
>> Hello Andreas,
>>
>> On 06/30/2013 01:15 PM, Andreas Bie?mann wrote:
>>> BSD (like OS X) variants of regex.h do not declare REG_NOERROR, add a
>>> simple
>>> define for them.
>>>
>>> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
>>> ---
>>>   +#ifndef REG_NOERROR
>>> +/* BSD regex.h do not expose REG_NOERROR */
>>> +# define REG_NOERROR 0
>>> +#endif
>>> +
>> I think a neater solutions is to actually remove the REG_NOERROR.
>> From man regexec, GNU 2011-09-27: "regexec() returns zero for a
>> successful match or REG_NOMATCH for failure.". Opengroup specs
>> will mention the same. REG_NOERROR is not mentioned at all.
>>
>> e.g.:
>>
>>         if (err) {
>>             regex_report_error(&item->regex, err, "match",
>>                        item->name);
>>             break;
>>         }
>>
>> should do the job in a portable way (and reads a bit better,
>> as well). But this is only a cosmetic comment, the patch by
>> itself should do the job.
>>
> Just realized this is more then cosmetic. Also GNU will not have
> REG_NOERROR defined since it is an enum, so it will always
> take the #ifndef REG_NOERROR road, which boils down to !! 0.
> 
> So this needs a new version instead of hiding how this works.

you are right, v2 is on the way ...

> p.s. Simon, Andreas sorry for spamming, selected the wrong email...

Ouch, sorry! Just realized that I took the wrong mail too.

Best regards

Andreas Bie?mann

  reply	other threads:[~2013-07-02  6:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30 11:15 [U-Boot] [PATCH 0/3] Adopt u-boot build to OS X Andreas Bießmann
2013-06-30 11:15 ` [U-Boot] [PATCH 1/3] lib/rsa/rsa-sig.c: compile on " Andreas Bießmann
2013-07-01 18:58   ` Lubomir Popov
2013-07-03 14:15   ` Simon Glass
2013-06-30 11:15 ` [U-Boot] [PATCH 2/3] tools/proftool: add missing definition Andreas Bießmann
2013-07-01 18:45   ` Jeroen Hofstee
2013-07-01 20:12     ` Jeroen Hofstee
2013-07-02  6:39       ` Andreas Bießmann [this message]
2013-07-01 18:59   ` Lubomir Popov
2013-06-30 11:15 ` [U-Boot] [PATCH 3/3] Makefile: fix readelf usage Andreas Bießmann
2013-07-01 19:00   ` Lubomir Popov
2013-07-04 12:09   ` Albert ARIBAUD
2013-07-04 13:25     ` Andreas Bießmann
2013-07-04 14:02       ` Albert ARIBAUD

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=51D2759C.4080407@googlemail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox