On 07/14/11 17:25, Pádraig Brady wrote:
I'm not sure about defining these to 0 in gnulib.
That will silently ignore the intent of a program on certain platforms.
Wouldn't it be better to fail to compile so that each program then does:
#ifndef SA_RESETHAND
/* do something else */
#endif
Paul Eggert wrote:
--- a/doc/posix-functions/sigaction.texi
+++ b/doc/posix-functions/sigaction.texi
A documentation update for the header file, in doc/posix-headers/signal.texi,
would also be useful.
Bruno
--
In memoriam Natalya Estemirova http://en.wikipedia.org/wiki/Natalya_Estemirova
On 15/07/11 08:50, Paul Eggert wrote:
On 07/14/11 17:25, Pádraig Brady wrote:
I'm not sure about defining these to 0 in gnulib.
That will silently ignore the intent of a program on certain platforms.
Wouldn't it be better to fail to compile so that each program then does:
#ifndef
On 07/15/2011 04:28 AM, Pádraig Brady wrote:
On 15/07/11 08:50, Paul Eggert wrote:
On 07/14/11 17:25, Pádraig Brady wrote:
I'm not sure about defining these to 0 in gnulib.
That will silently ignore the intent of a program on certain platforms.
Absolutely. What I was getting was that it's
Hello,
I've been working on pkgsrc for the Minix project and we've been
patching lib/spawni.c in several packages (bison, gettext, m4, ...)
because Minix lacks setpgid(). I lack the autotools and gnulib
knowledge to patch test gnulib itself, but in general the fix would
involve adding a check
* lib/ffs.c (ffs): Provide fallback for non-32-bit int.
* tests/test-ffs.c (naive, main): Avoid signed shifts.
Reported by Bruno Haible.
Signed-off-by: Eric Blake ebl...@redhat.com
---
ChangeLog|7 +++
lib/ffs.c| 31 +++
tests/test-ffs.c |
* m4/ffs.m4 (gl_FUNC_FFS): Require strings.h defaults.
Signed-off-by: Eric Blake ebl...@redhat.com
---
ChangeLog |3 +++
m4/ffs.m4 |3 ++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2a67a7e..49dcd7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@
* modules/ffsl: New file.
* modules/ffsll: Likewise.
* m4/ffsl.m4: Likewise.
* m4/ffsll.m4: Likewise.
* lib/ffsl.c: Likewise.
* lib/ffsl.h: Likewise.
* lib/ffsll.c: Likewise.
* m4/string_h.m4 (gl_HEADER_STRING_H_BODY)
(gl_HEADER_STRING_H_DEFAULTS): Add defaults.
* modules/string (Makefile.am):
Eric Blake wrote:
* modules/ffsl-tests: New test file.
* modules/ffsll-tests: Likewise.
* tests/test-ffsl.c: Likewise.
* tests/test-ffsll.c: Likewise.
It doesn't hurt to clarify how these functions work on bit patterns that
represent negative numbers and have more than one bit set.
On 07/15/11 03:28, Pádraig Brady wrote:
What I was getting was that it's probably better to leave
the following to the app too:
#ifndef SA_RESETHAND
# define SA_RESETHAND 0
/* Now the app writer knows they need to handle this case */
#endif
Yes, you're probably right. I'll send some
Eric Blake wrote:
+int
+FUNC (TYPE i)
+{
+ int result = 0;
+ unsigned TYPE j = i;
+
+ /* GCC has __builtin_ffs, but it is limited to int. */
+ if (!i)
+return 0;
+ while (1)
+{
+ if ((int) j)
+return result + ffs (j);
+ j = CHAR_BIT * sizeof (int);
+
On 07/15/11 03:28, Bruno Haible wrote:
Paul Eggert wrote:
--- a/doc/posix-functions/sigaction.texi
+++ b/doc/posix-functions/sigaction.texi
A documentation update for the header file, in doc/posix-headers/signal.texi,
would also be useful.
Thanks, I pushed this:
doc: Document NonStop
12 matches
Mail list logo