bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH v2 0/5] Speed up uNN_chr and uNN_strchr with Boyer-Moore algo


From: Bruno Haible
Subject: Re: [PATCH v2 0/5] Speed up uNN_chr and uNN_strchr with Boyer-Moore algorithm
Date: Wed, 28 Jul 2010 23:01:55 +0200
User-agent: KMail/1.9.9

Hi Paolo,

> I pushed it now, thanks for the review!

I thought you were going to add ChangeLog entries right before pushing.
I added them for you (from the git commit messages).

When compiling a testdir like this:

  ./gnulib-tool --create-testdir --dir=$HOME/data/tmp/testdir1 --with-tests 
unistr/u8-chr unistr/u8-strchr
  ./configure CPPFLAGS="-Wall"

there were errors and warnings:

  unistr/u8-chr.c:31: warning: implicit declaration of function ‘memchr’
  unistr/u8-chr.c:31: warning: incompatible implicit declaration of built-in 
function ‘memchr’

  unistr/test-chr.h: In function ‘main’:
  unistr/test-chr.h:70: warning: implicit declaration of function ‘memcmp’

  /home/bruno/data/tmp/testdir1/gltests/unistr/test-chr.h:31: undefined 
reference to `u32_set'
  /home/bruno/data/tmp/testdir1/gltests/unistr/test-chr.h:38: undefined 
reference to `u32_set'
  collect2: ld returned 1 exit status

  unistr/test-strchr.h: In function ‘main’:
  unistr/test-strchr.h:67: warning: implicit declaration of function ‘memcmp’

I'm fixing them like this:


2010-07-28  Bruno Haible  <address@hidden>

        unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.
        * lib/unistr/u8-chr.c: Include <string.h>.
        * tests/unistr/test-u8-chr.c: Likewise.
        * tests/unistr/test-u16-chr.c: Likewise.
        * tests/unistr/test-u32-chr.c: Likewise.
        * tests/unistr/test-u8-strchr.c: Likewise.
        * tests/unistr/test-u16-strchr.c: Likewise.
        * tests/unistr/test-u32-strchr.c: Likewise.
        * modules/unistr/u8-chr-tests (Depends-on): Add unistr/u32-set.
        * modules/unistr/u16-chr-tests (Depends-on): Likewise.
        * modules/unistr/u8-strchr-tests (Depends-on): Likewise.
        * modules/unistr/u16-strchr-tests (Depends-on): Likewise.

--- lib/unistr/u8-chr.c.orig    Wed Jul 28 22:17:19 2010
+++ lib/unistr/u8-chr.c Wed Jul 28 22:04:58 2010
@@ -21,6 +21,8 @@
 /* Specification.  */
 #include "unistr.h"
 
+#include <string.h>
+
 uint8_t *
 u8_chr (const uint8_t *s, size_t n, ucs4_t uc)
 {
--- tests/unistr/test-u16-chr.c.orig    Wed Jul 28 22:17:19 2010
+++ tests/unistr/test-u16-chr.c Wed Jul 28 22:06:48 2010
@@ -21,6 +21,7 @@
 #include "unistr.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "zerosize-ptr.h"
 #include "macros.h"
--- tests/unistr/test-u16-strchr.c.orig Wed Jul 28 22:17:19 2010
+++ tests/unistr/test-u16-strchr.c      Wed Jul 28 22:16:56 2010
@@ -21,6 +21,7 @@
 #include "unistr.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "zerosize-ptr.h"
 #include "macros.h"
--- tests/unistr/test-u32-chr.c.orig    Wed Jul 28 22:17:19 2010
+++ tests/unistr/test-u32-chr.c Wed Jul 28 22:06:48 2010
@@ -21,6 +21,7 @@
 #include "unistr.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "zerosize-ptr.h"
 #include "macros.h"
--- tests/unistr/test-u32-strchr.c.orig Wed Jul 28 22:17:19 2010
+++ tests/unistr/test-u32-strchr.c      Wed Jul 28 22:16:56 2010
@@ -21,6 +21,7 @@
 #include "unistr.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "zerosize-ptr.h"
 #include "macros.h"
--- tests/unistr/test-u8-chr.c.orig     Wed Jul 28 22:17:20 2010
+++ tests/unistr/test-u8-chr.c  Wed Jul 28 22:06:48 2010
@@ -21,6 +21,7 @@
 #include "unistr.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "zerosize-ptr.h"
 #include "macros.h"
--- tests/unistr/test-u8-strchr.c.orig  Wed Jul 28 22:17:20 2010
+++ tests/unistr/test-u8-strchr.c       Wed Jul 28 22:16:56 2010
@@ -21,6 +21,7 @@
 #include "unistr.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "zerosize-ptr.h"
 #include "macros.h"
--- modules/unistr/u16-chr-tests.orig   Wed Jul 28 22:17:19 2010
+++ modules/unistr/u16-chr-tests        Wed Jul 28 22:13:54 2010
@@ -9,6 +9,7 @@
 extensions
 getpagesize
 unistr/u16-set
+unistr/u32-set
 unistr/u32-to-u16
 
 configure.ac:
--- modules/unistr/u16-strchr-tests.orig        Wed Jul 28 22:17:19 2010
+++ modules/unistr/u16-strchr-tests     Wed Jul 28 22:13:54 2010
@@ -9,6 +9,7 @@
 extensions
 getpagesize
 unistr/u16-set
+unistr/u32-set
 
 configure.ac:
 gl_FUNC_MMAP_ANON
--- modules/unistr/u8-chr-tests.orig    Wed Jul 28 22:17:19 2010
+++ modules/unistr/u8-chr-tests Wed Jul 28 22:13:54 2010
@@ -9,6 +9,7 @@
 extensions
 getpagesize
 unistr/u8-set
+unistr/u32-set
 unistr/u32-to-u8
 
 configure.ac:
--- modules/unistr/u8-strchr-tests.orig Wed Jul 28 22:17:19 2010
+++ modules/unistr/u8-strchr-tests      Wed Jul 28 22:13:54 2010
@@ -9,6 +9,7 @@
 extensions
 getpagesize
 unistr/u8-set
+unistr/u32-set
 
 configure.ac:
 gl_FUNC_MMAP_ANON



reply via email to

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