Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Jim Meyering
On Wed, May 21, 2014 at 9:54 PM, Paul Eggert wrote: > Kieran Colford wrote: >> >> I deliberately chose to use it as a macro and call it this because that >> is how it is done everywhere else in gnulib. > > > Sure, but let's take this opportunity to do a better API, while we're making > a module fo

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Kieran Colford
On 14-05-22 12:54 AM, Paul Eggert wrote: > Kieran Colford wrote: >> I deliberately chose to use it as a macro and call it this because that >> is how it is done everywhere else in gnulib. > > Sure, but let's take this opportunity to do a better API, while we're > making a module for it. So my s

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Paul Eggert
Kieran Colford wrote: I deliberately chose to use it as a macro and call it this because that is how it is done everywhere else in gnulib. Sure, but let's take this opportunity to do a better API, while we're making a module for it. So my suggestion would be to replace STREQ with streq unifo

[PATCH] stringops: add new module

2014-05-21 Thread Kieran Colford
maint.mk has long had a syntax-check rule that requests that users use STREQ (a, b) instead of open-coding (strcmp (a, b) == 0); but nothing in gnulib actually provided that macro. This adds a new module to provide it, and a counterpart STRNEQ. --- ChangeLog |7 +++ lib/stringops.

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Eric Blake
On 05/21/2014 10:31 PM, Eric Blake wrote: > On 05/21/2014 09:33 PM, Kieran Colford wrote: >> --- >> lib/stringops.h | 31 +++ >> modules/stringops | 22 ++ >> 2 files changed, 53 insertions(+) >> create mode 100644 lib/stringops.h >> create m

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Eric Blake
On 05/21/2014 09:33 PM, Kieran Colford wrote: > --- > lib/stringops.h | 31 +++ > modules/stringops | 22 ++ > 2 files changed, 53 insertions(+) > create mode 100644 lib/stringops.h > create mode 100644 modules/stringops Your commit message

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Kieran Colford
On 14-05-22 12:28 AM, Eric Blake wrote: > On 05/21/2014 10:14 PM, Paul Eggert wrote: >> Kieran Colford wrote: >>> +#define STRNEQ(X, Y) (strcmp (X, Y) != 0) >> >> 1. This name is poorly chosen (it looks too much like "strncmp", which >> means something quite different) and it's not needed (people

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Eric Blake
On 05/21/2014 10:14 PM, Paul Eggert wrote: > Kieran Colford wrote: >> +#define STRNEQ(X, Y) (strcmp (X, Y) != 0) > > 1. This name is poorly chosen (it looks too much like "strncmp", which > means something quite different) and it's not needed (people can just > use "!STREQ"). > > 2. STREQ shoul

Re: [PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Paul Eggert
Kieran Colford wrote: +#define STRNEQ(X, Y) (strcmp (X, Y) != 0) 1. This name is poorly chosen (it looks too much like "strncmp", which means something quite different) and it's not needed (people can just use "!STREQ"). 2. STREQ should be an inline function, not a macro. There's little

[PATCH] Added a module stringops that provides STREQ and STRNEQ

2014-05-21 Thread Kieran Colford
--- lib/stringops.h | 31 +++ modules/stringops | 22 ++ 2 files changed, 53 insertions(+) create mode 100644 lib/stringops.h create mode 100644 modules/stringops diff --git a/lib/stringops.h b/lib/stringops.h new file mode 100644 index

Re: [PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check

2014-05-21 Thread K Colford
Then that's how I'll re implement it. -Original Message- From: Eric Blake Date: Wed, 21 May 2014 14:08:50 To: Paul Eggert; Kieran Colford; Subject: Re: [PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check On 05/21/2014 01:58 PM, Paul Eggert wrote: > On 05/21/2014 11:54 AM, Ki

Re: [PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check

2014-05-21 Thread Eric Blake
On 05/21/2014 01:58 PM, Paul Eggert wrote: > On 05/21/2014 11:54 AM, Kieran Colford wrote: >> I definitely agree >> with your suggestion of having a module put them in config.h > > Why config.h? Can't it be put into a new include file, supplied by > Gnulib? stringops.h, say?We shouldn't bloat co

Re: [PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check

2014-05-21 Thread Paul Eggert
On 05/21/2014 11:54 AM, Kieran Colford wrote: I definitely agree with your suggestion of having a module put them in config.h Why config.h? Can't it be put into a new include file, supplied by Gnulib? stringops.h, say?We shouldn't bloat config.h unless we really need to.

Re: [PATCH] A new module called streq_macros that provides STREQ and STRNEQ

2014-05-21 Thread Eric Blake
On 05/21/2014 01:49 PM, Eric Blake wrote: > On 05/21/2014 01:15 PM, Kieran Colford wrote: >> --- >> modules/streq_macros | 24 >> 1 file changed, 24 insertions(+) >> create mode 100644 modules/streq_macros >> >> @@ -0,0 +1,24 @@ >> +Description: >> +Add the macros STRE

Re: [PATCH] A new module called streq_macros that provides STREQ and STRNEQ

2014-05-21 Thread Eric Blake
On 05/21/2014 01:15 PM, Kieran Colford wrote: > --- > modules/streq_macros | 24 > 1 file changed, 24 insertions(+) > create mode 100644 modules/streq_macros > > diff --git a/modules/streq_macros b/modules/streq_macros > new file mode 100644 > index 000..8a02ee9 >

Re: [PATCH] Added the core dumps signals to the list of caught signals.

2014-05-21 Thread Pádraig Brady
On 05/21/2014 06:28 PM, Kieran Colford wrote: > It is not mentioned anywhere why the signals which generate core dumps > are ignored by this module even though they are equally fatal to the > process. > > The only speculated reason for this is that the cleanup routine my > alter the state of the r

[PATCH] A new module called streq_macros that provides STREQ and STRNEQ

2014-05-21 Thread Kieran Colford
--- modules/streq_macros | 24 1 file changed, 24 insertions(+) create mode 100644 modules/streq_macros diff --git a/modules/streq_macros b/modules/streq_macros new file mode 100644 index 000..8a02ee9 --- /dev/null +++ b/modules/streq_macros @@ -0,0 +1,24 @@ +Descr

Re: [PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check

2014-05-21 Thread Kieran Colford
On 14-05-21 02:48 PM, Eric Blake wrote: > On 05/21/2014 12:00 PM, Kieran Colford wrote: >> With the removal of STREQ and STRNEQ from gnulib, this syntax test is >> no longer useful and simply generates a nuisance error message that >> can't be fixed by gnulib. > > STREQ and STRNEQ have never been

Re: [PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check

2014-05-21 Thread Eric Blake
On 05/21/2014 12:48 PM, Eric Blake wrote: > On 05/21/2014 12:00 PM, Kieran Colford wrote: >> With the removal of STREQ and STRNEQ from gnulib, this syntax test is >> no longer useful and simply generates a nuisance error message that >> can't be fixed by gnulib. > > STREQ and STRNEQ have never bee

Re: [PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check

2014-05-21 Thread Eric Blake
On 05/21/2014 12:00 PM, Kieran Colford wrote: > With the removal of STREQ and STRNEQ from gnulib, this syntax test is > no longer useful and simply generates a nuisance error message that > can't be fixed by gnulib. STREQ and STRNEQ have never been provided by a generic .h file in gnulib, to my kn

[PATCH 2/2] Removed sc_prohibit_strcmp from the syntax-check

2014-05-21 Thread Kieran Colford
With the removal of STREQ and STRNEQ from gnulib, this syntax test is no longer useful and simply generates a nuisance error message that can't be fixed by gnulib. --- top/maint.mk |8 1 file changed, 8 deletions(-) diff --git a/top/maint.mk b/top/maint.mk index b6cd5a2..5b345ad 1006

[PATCH] Added the core dumps signals to the list of caught signals.

2014-05-21 Thread Kieran Colford
It is not mentioned anywhere why the signals which generate core dumps are ignored by this module even though they are equally fatal to the process. The only speculated reason for this is that the cleanup routine my alter the state of the running process, making the core dump difficult to use in d