bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MacOS problem with "checking whether strcasestr works in linear time


From: Eric Blake
Subject: Re: MacOS problem with "checking whether strcasestr works in linear time"
Date: Tue, 10 Jun 2008 06:27:56 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 6/10/2008 4:13 AM:
| Eric Blake wrote:
|> Go ahead and make the change if you feel better about it that way.
|
| Thanks. Yes, it feels safer this way. Applied:

But you forgot to include <signal.h>, and calling signal() without
prototype is not safe (function pointers aren't necessarily the same size
as int).  Applied:

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhOc0sACgkQ84KuGfSFAYAwywCfdEeSrJY+DR9g7Q8RwVuP8V+R
35IAoLH+QbeOaM3WWYls0Cc98gEnR/Uj
=QXni
-----END PGP SIGNATURE-----
>From cac66df291976a98238c75b5cb5989fb274998a1 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Tue, 10 Jun 2008 06:25:20 -0600
Subject: [PATCH] Add missing include.

* tests/test-strstr.c (includes): Add <signal.h>.
* tests/test-strcasestr.c (includes): Likewise.
* tests/test-memmem.c (includes): Likewise.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog               |    7 +++++++
 tests/test-memmem.c     |    1 +
 tests/test-strcasestr.c |    3 ++-
 tests/test-strstr.c     |    1 +
 4 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 97aec20..76c65d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-06-10  Eric Blake  <address@hidden>
+
+       Add missing include.
+       * tests/test-strstr.c (includes): Add <signal.h>.
+       * tests/test-strcasestr.c (includes): Likewise.
+       * tests/test-memmem.c (includes): Likewise.
+
 2008-06-10  Bruno Haible  <address@hidden>
 
        * tests/test-memmem.c (main): Reset SIGALRM to default handling before
diff --git a/tests/test-memmem.c b/tests/test-memmem.c
index 0061d54..e429ac0 100644
--- a/tests/test-memmem.c
+++ b/tests/test-memmem.c
@@ -19,6 +19,7 @@
 
 #include <string.h>
 
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/tests/test-strcasestr.c b/tests/test-strcasestr.c
index 5e7fd36..88798a5 100644
--- a/tests/test-strcasestr.c
+++ b/tests/test-strcasestr.c
@@ -20,6 +20,7 @@
 
 #include <string.h>
 
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -42,7 +43,7 @@ main ()
 #if HAVE_DECL_ALARM
   /* Declare failure if test takes too long, by using default abort
      caused by SIGALRM.  All known platforms that lack alarm also lack
-     memmem, and the replacement memmem is known to not take too
+     strcasestr, and the replacement memmem is known to not take too
      long.  */
   signal (SIGALRM, SIG_DFL);
   alarm (50);
diff --git a/tests/test-strstr.c b/tests/test-strstr.c
index 9f2ecde..8a05e88 100644
--- a/tests/test-strstr.c
+++ b/tests/test-strstr.c
@@ -19,6 +19,7 @@
 
 #include <string.h>
 
+#include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-- 
1.5.5.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]