gsasl-commit
[Top][All Lists]
Advanced

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

[SCM] GNU gsasl branch, master, updated. gsasl-1-3-90-6-ged819d8


From: Simon Josefsson
Subject: [SCM] GNU gsasl branch, master, updated. gsasl-1-3-90-6-ged819d8
Date: Fri, 06 Nov 2009 11:39:34 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gsasl".

http://git.savannah.gnu.org/cgit/gsasl.git/commit/?id=ed819d8d904c958ec7596d8f2f0f3f951975659d

The branch, master has been updated
       via  ed819d8d904c958ec7596d8f2f0f3f951975659d (commit)
       via  f08a7c6bb80483446424a61fbcd8879b6c2d154a (commit)
       via  bcedb72c112ec3ed68bcb20af0d1647277e4c0fc (commit)
      from  98ac72bca7b29c93025f97d6d13986baffc792cb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ed819d8d904c958ec7596d8f2f0f3f951975659d
Author: Simon Josefsson <address@hidden>
Date:   Fri Nov 6 12:37:11 2009 +0100

    Add.

commit f08a7c6bb80483446424a61fbcd8879b6c2d154a
Author: Simon Josefsson <address@hidden>
Date:   Fri Nov 6 12:35:50 2009 +0100

    Bump versions.

commit bcedb72c112ec3ed68bcb20af0d1647277e4c0fc
Author: Simon Josefsson <address@hidden>
Date:   Fri Nov 6 12:22:15 2009 +0100

    Update gnulib files.

-----------------------------------------------------------------------

Summary of changes:
 NEWS                         |    2 +
 configure.ac                 |    2 +-
 lib/NEWS                     |    9 +++
 lib/configure.ac             |    4 +-
 lib/gl/Makefile.am           |   20 +------
 lib/gl/m4/gnulib-cache.m4    |    3 +-
 lib/gl/m4/gnulib-comp.m4     |   12 ----
 lib/gl/m4/rawmemchr.m4       |   21 ------
 lib/gl/m4/strchrnul.m4       |   21 ------
 lib/gl/rawmemchr.c           |  136 ----------------------------------------
 lib/gl/rawmemchr.valgrind    |   12 ----
 lib/gl/strchrnul.c           |  142 ------------------------------------------
 lib/gl/strchrnul.valgrind    |   12 ----
 lib/gltests/Makefile.am      |   16 -----
 lib/gltests/test-rawmemchr.c |   84 -------------------------
 lib/gltests/test-strchrnul.c |   94 ----------------------------
 lib/src/gsasl.h              |    6 +-
 17 files changed, 19 insertions(+), 577 deletions(-)
 delete mode 100644 lib/gl/m4/rawmemchr.m4
 delete mode 100644 lib/gl/m4/strchrnul.m4
 delete mode 100644 lib/gl/rawmemchr.c
 delete mode 100644 lib/gl/rawmemchr.valgrind
 delete mode 100644 lib/gl/strchrnul.c
 delete mode 100644 lib/gl/strchrnul.valgrind
 delete mode 100644 lib/gltests/test-rawmemchr.c
 delete mode 100644 lib/gltests/test-strchrnul.c

diff --git a/NEWS b/NEWS
index af6b489..066d06a 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,8 @@ Note that changes to the GNU SASL Library is documented in 
lib/NEWS.
 This file track changes to the remaining, non-library, parts of GNU
 SASL.  That include the manual, the command line tool, and self tests.
 
+* Version 1.3.91 (unreleased) [experimental]
+
 * Version 1.3.90 (released 2009-11-06) [experimental]
 
 ** tests/crypto: Also test newly added SHA-1 interfaces.
diff --git a/configure.ac b/configure.ac
index d2c0a06..bd8e383 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.61)
-AC_INIT([GNU SASL], [1.3.90], address@hidden, [gsasl])
+AC_INIT([GNU SASL], [1.3.91], address@hidden, [gsasl])
 AC_CONFIG_AUX_DIR([lib/build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
diff --git a/lib/NEWS b/lib/NEWS
index a2e34e0..229aa6b 100644
--- a/lib/NEWS
+++ b/lib/NEWS
@@ -2,6 +2,15 @@ GNU SASL LIBRARY NEWS -- History of user-visible changes.
 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson
 See the end for copying conditions.
 
+* Version 1.3.91 (unreleased) [experimental]
+
+** Fix Visual Studio project files to work with SCRAM.
+Suggested by Lothar May <address@hidden> in
+<http://thread.gmane.org/gmane.comp.gnu.gsasl.general/254>.
+
+** API and ABI modifications.
+No changes since last version.
+
 * Version 1.3.90 (released 2009-11-06) [experimental]
 
 ** libgsasl: Properly increment libtool version to reflect newly added ABIs.
diff --git a/lib/configure.ac b/lib/configure.ac
index 819eaeb..3fad058 100644
--- a/lib/configure.ac
+++ b/lib/configure.ac
@@ -20,7 +20,7 @@ dnl Process this file with autoconf to produce a configure 
script.
 # MA 02110-1301, USA.
 
 AC_PREREQ(2.61)
-AC_INIT([libgsasl], [1.3.90], address@hidden)
+AC_INIT([libgsasl], [1.3.91], address@hidden)
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -29,7 +29,7 @@ AC_CONFIG_MACRO_DIR([m4])
 # Interfaces added:                             AGE++
 # Interfaces removed:                           AGE=0
 AC_SUBST(LT_CURRENT, 14)
-AC_SUBST(LT_REVISION, 0)
+AC_SUBST(LT_REVISION, 1)
 AC_SUBST(LT_AGE, 7)
 
 # Used when creating libgsasl-XX.def.
diff --git a/lib/gl/Makefile.am b/lib/gl/Makefile.am
index 87951d4..e8a2d96 100644
--- a/lib/gl/Makefile.am
+++ b/lib/gl/Makefile.am
@@ -9,7 +9,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests 
--avoid=vc-list-files-tests --lgpl=2 --libtool --macro-prefix=gl --no-vc-files 
base64 crypto/gc crypto/gc-hmac-md5 crypto/gc-hmac-md5-tests 
crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-md5-tests crypto/gc-pbkdf2-sha1 
crypto/gc-random crypto/gc-sha1 crypto/gc-tests getline gettext lib-msvc-compat 
lib-symbol-versions lib-symbol-visibility maintainer-makefile memmem memxor 
minmax strchrnul strverscmp vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override 
--lib=libgl --source-base=gl --m4-base=gl/m4 --doc-base=doc 
--tests-base=gltests --aux-dir=build-aux --with-tests 
--avoid=vc-list-files-tests --lgpl=2 --libtool --macro-prefix=gl --no-vc-files 
base64 crypto/gc crypto/gc-hmac-md5 crypto/gc-hmac-md5-tests 
crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-md5-tests crypto/gc-pbkdf2-sha1 
crypto/gc-random crypto/gc-sha1 crypto/gc-tests getline gettext lib-msvc-compat 
lib-symbol-versions lib-symbol-visibility maintainer-makefile memmem memxor 
minmax strverscmp vasprintf
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -291,15 +291,6 @@ libgl_la_SOURCES += minmax.h
 
 ## end   gnulib module minmax
 
-## begin gnulib module rawmemchr
-
-
-EXTRA_DIST += rawmemchr.c rawmemchr.valgrind
-
-EXTRA_libgl_la_SOURCES += rawmemchr.c
-
-## end   gnulib module rawmemchr
-
 ## begin gnulib module realloc-posix
 
 
@@ -571,15 +562,6 @@ EXTRA_DIST += stdlib.in.h
 
 ## end   gnulib module stdlib
 
-## begin gnulib module strchrnul
-
-
-EXTRA_DIST += strchrnul.c strchrnul.valgrind
-
-EXTRA_libgl_la_SOURCES += strchrnul.c
-
-## end   gnulib module strchrnul
-
 ## begin gnulib module string
 
 BUILT_SOURCES += string.h
diff --git a/lib/gl/m4/gnulib-cache.m4 b/lib/gl/m4/gnulib-cache.m4
index eaa168d..29c8959 100644
--- a/lib/gl/m4/gnulib-cache.m4
+++ b/lib/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=vc-list-files-tests --lgpl=2 --libtool 
--macro-prefix=gl --no-vc-files base64 crypto/gc crypto/gc-hmac-md5 
crypto/gc-hmac-md5-tests crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-md5-tests 
crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-sha1 crypto/gc-tests getline 
gettext lib-msvc-compat lib-symbol-versions lib-symbol-visibility 
maintainer-makefile memmem memxor minmax strchrnul strverscmp vasprintf
+#   gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgl 
--source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gltests 
--aux-dir=build-aux --with-tests --avoid=vc-list-files-tests --lgpl=2 --libtool 
--macro-prefix=gl --no-vc-files base64 crypto/gc crypto/gc-hmac-md5 
crypto/gc-hmac-md5-tests crypto/gc-hmac-sha1 crypto/gc-md5 crypto/gc-md5-tests 
crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-sha1 crypto/gc-tests getline 
gettext lib-msvc-compat lib-symbol-versions lib-symbol-visibility 
maintainer-makefile memmem memxor minmax strverscmp vasprintf
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gl/override])
@@ -40,7 +40,6 @@ gl_MODULES([
   memmem
   memxor
   minmax
-  strchrnul
   strverscmp
   vasprintf
 ])
diff --git a/lib/gl/m4/gnulib-comp.m4 b/lib/gl/m4/gnulib-comp.m4
index a2f4486..dd7222e 100644
--- a/lib/gl/m4/gnulib-comp.m4
+++ b/lib/gl/m4/gnulib-comp.m4
@@ -92,8 +92,6 @@ AC_DEFUN([gl_INIT],
   gl_MEMXOR
   gl_MINMAX
   gl_MULTIARCH
-  gl_FUNC_RAWMEMCHR
-  gl_STRING_MODULE_INDICATOR([rawmemchr])
   gl_FUNC_REALLOC_POSIX
   gl_STDLIB_MODULE_INDICATOR([realloc-posix])
   gl_SIZE_MAX
@@ -102,8 +100,6 @@ AC_DEFUN([gl_INIT],
   gl_STDINT_H
   gl_STDIO_H
   gl_STDLIB_H
-  gl_FUNC_STRCHRNUL
-  gl_STRING_MODULE_INDICATOR([strchrnul])
   gl_HEADER_STRING_H
   gl_FUNC_STRVERSCMP
   gl_STRING_MODULE_INDICATOR([strverscmp])
@@ -287,8 +283,6 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/printf-args.h
   lib/printf-parse.c
   lib/printf-parse.h
-  lib/rawmemchr.c
-  lib/rawmemchr.valgrind
   lib/realloc.c
   lib/sha1.c
   lib/sha1.h
@@ -300,8 +294,6 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stdio.in.h
   lib/stdlib.in.h
   lib/str-two-way.h
-  lib/strchrnul.c
-  lib/strchrnul.valgrind
   lib/string.in.h
   lib/strverscmp.c
   lib/unistd.in.h
@@ -363,7 +355,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/po.m4
   m4/printf-posix.m4
   m4/progtest.m4
-  m4/rawmemchr.m4
   m4/realloc.m4
   m4/sha1.m4
   m4/size_max.m4
@@ -373,7 +364,6 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/stdint_h.m4
   m4/stdio_h.m4
   m4/stdlib_h.m4
-  m4/strchrnul.m4
   m4/string_h.m4
   m4/strverscmp.m4
   m4/threadlib.m4
@@ -399,13 +389,11 @@ AC_DEFUN([gl_FILE_LIST], [
   tests/test-getline.c
   tests/test-memchr.c
   tests/test-memmem.c
-  tests/test-rawmemchr.c
   tests/test-stdbool.c
   tests/test-stddef.c
   tests/test-stdint.c
   tests/test-stdio.c
   tests/test-stdlib.c
-  tests/test-strchrnul.c
   tests/test-string.c
   tests/test-strverscmp.c
   tests/test-unistd.c
diff --git a/lib/gl/m4/rawmemchr.m4 b/lib/gl/m4/rawmemchr.m4
deleted file mode 100644
index 1ac7b74..0000000
--- a/lib/gl/m4/rawmemchr.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-# rawmemchr.m4 serial 1
-dnl Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_RAWMEMCHR],
-[
-  dnl Persuade glibc <string.h> to declare rawmemchr().
-  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS([rawmemchr])
-  if test $ac_cv_func_rawmemchr = no; then
-    HAVE_RAWMEMCHR=0
-    gl_PREREQ_RAWMEMCHR
-  fi
-])
-
-# Prerequisites of lib/strchrnul.c.
-AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:])
diff --git a/lib/gl/m4/strchrnul.m4 b/lib/gl/m4/strchrnul.m4
deleted file mode 100644
index 7e270d0..0000000
--- a/lib/gl/m4/strchrnul.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-# strchrnul.m4 serial 7
-dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_STRCHRNUL],
-[
-  dnl Persuade glibc <string.h> to declare strchrnul().
-  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
-  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS([strchrnul])
-  if test $ac_cv_func_strchrnul = no; then
-    HAVE_STRCHRNUL=0
-    gl_PREREQ_STRCHRNUL
-  fi
-])
-
-# Prerequisites of lib/strchrnul.c.
-AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])
diff --git a/lib/gl/rawmemchr.c b/lib/gl/rawmemchr.c
deleted file mode 100644
index f749fe9..0000000
--- a/lib/gl/rawmemchr.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Searching in a string.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU Lesser General Public License as published by
-   the Free Software Foundation; either version 2.1 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-/* Specification.  */
-#include <string.h>
-
-/* Find the first occurrence of C in S.  */
-void *
-rawmemchr (const void *s, int c_in)
-{
-  /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
-     long instead of a 64-bit uintmax_t tends to give better
-     performance.  On 64-bit hardware, unsigned long is generally 64
-     bits already.  Change this typedef to experiment with
-     performance.  */
-  typedef unsigned long int longword;
-
-  const unsigned char *char_ptr;
-  const longword *longword_ptr;
-  longword repeated_one;
-  longword repeated_c;
-  unsigned char c;
-
-  c = (unsigned char) c_in;
-
-  /* Handle the first few bytes by reading one byte at a time.
-     Do this until CHAR_PTR is aligned on a longword boundary.  */
-  for (char_ptr = (const unsigned char *) s;
-       (size_t) char_ptr % sizeof (longword) != 0;
-       ++char_ptr)
-    if (*char_ptr == c)
-      return (void *) char_ptr;
-
-  longword_ptr = (const longword *) char_ptr;
-
-  /* All these elucidatory comments refer to 4-byte longwords,
-     but the theory applies equally well to any size longwords.  */
-
-  /* Compute auxiliary longword values:
-     repeated_one is a value which has a 1 in every byte.
-     repeated_c has c in every byte.  */
-  repeated_one = 0x01010101;
-  repeated_c = c | (c << 8);
-  repeated_c |= repeated_c << 16;
-  if (0xffffffffU < (longword) -1)
-    {
-      repeated_one |= repeated_one << 31 << 1;
-      repeated_c |= repeated_c << 31 << 1;
-      if (8 < sizeof (longword))
-        {
-          size_t i;
-
-          for (i = 64; i < sizeof (longword) * 8; i *= 2)
-            {
-              repeated_one |= repeated_one << i;
-              repeated_c |= repeated_c << i;
-            }
-        }
-    }
-
-  /* Instead of the traditional loop which tests each byte, we will
-     test a longword at a time.  The tricky part is testing if *any of
-     the four* bytes in the longword in question are equal to NUL or
-     c.  We first use an xor with repeated_c.  This reduces the task
-     to testing whether *any of the four* bytes in longword1 is zero.
-
-     We compute tmp =
-       ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
-     That is, we perform the following operations:
-       1. Subtract repeated_one.
-       2. & ~longword1.
-       3. & a mask consisting of 0x80 in every byte.
-     Consider what happens in each byte:
-       - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
-         and step 3 transforms it into 0x80.  A carry can also be propagated
-         to more significant bytes.
-       - If a byte of longword1 is nonzero, let its lowest 1 bit be at
-         position k (0 <= k <= 7); so the lowest k bits are 0.  After step 1,
-         the byte ends in a single bit of value 0 and k bits of value 1.
-         After step 2, the result is just k bits of value 1: 2^k - 1.  After
-         step 3, the result is 0.  And no carry is produced.
-     So, if longword1 has only non-zero bytes, tmp is zero.
-     Whereas if longword1 has a zero byte, call j the position of the least
-     significant zero byte.  Then the result has a zero at positions 0, ...,
-     j-1 and a 0x80 at position j.  We cannot predict the result at the more
-     significant bytes (positions j+1..3), but it does not matter since we
-     already have a non-zero bit at position 8*j+7.
-
-     The test whether any byte in longword1 is zero is equivalent
-     to testing whether tmp is nonzero.
-
-     This test can read beyond the end of a string, depending on where
-     C_IN is encountered.  However, this is considered safe since the
-     initialization phase ensured that the read will be aligned,
-     therefore, the read will not cross page boundaries and will not
-     cause a fault.  */
-
-  while (1)
-    {
-      longword longword1 = *longword_ptr ^ repeated_c;
-
-      if ((((longword1 - repeated_one) & ~longword1)
-           & (repeated_one << 7)) != 0)
-        break;
-      longword_ptr++;
-    }
-
-  char_ptr = (const unsigned char *) longword_ptr;
-
-  /* At this point, we know that one of the sizeof (longword) bytes
-     starting at char_ptr is == c.  On little-endian machines, we
-     could determine the first such byte without any further memory
-     accesses, just by looking at the tmp result from the last loop
-     iteration.  But this does not work on big-endian machines.
-     Choose code that works in both cases.  */
-
-  char_ptr = (unsigned char *) longword_ptr;
-  while (*char_ptr != c)
-    char_ptr++;
-  return (void *) char_ptr;
-}
diff --git a/lib/gl/rawmemchr.valgrind b/lib/gl/rawmemchr.valgrind
deleted file mode 100644
index 6363923..0000000
--- a/lib/gl/rawmemchr.valgrind
+++ /dev/null
@@ -1,12 +0,0 @@
-# Suppress a valgrind message about use of uninitialized memory in rawmemchr().
-# This use is OK because it provides only a speedup.
-{
-    rawmemchr-value4
-    Memcheck:Value4
-    fun:rawmemchr
-}
-{
-    rawmemchr-value8
-    Memcheck:Value8
-    fun:rawmemchr
-}
diff --git a/lib/gl/strchrnul.c b/lib/gl/strchrnul.c
deleted file mode 100644
index bd68515..0000000
--- a/lib/gl/strchrnul.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Searching in a string.
-   Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU Lesser General Public License as published by
-   the Free Software Foundation; either version 2.1 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-/* Specification.  */
-#include <string.h>
-
-/* Find the first occurrence of C in S or the final NUL byte.  */
-char *
-strchrnul (const char *s, int c_in)
-{
-  /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
-     long instead of a 64-bit uintmax_t tends to give better
-     performance.  On 64-bit hardware, unsigned long is generally 64
-     bits already.  Change this typedef to experiment with
-     performance.  */
-  typedef unsigned long int longword;
-
-  const unsigned char *char_ptr;
-  const longword *longword_ptr;
-  longword repeated_one;
-  longword repeated_c;
-  unsigned char c;
-
-  c = (unsigned char) c_in;
-  if (!c)
-    return rawmemchr (s, 0);
-
-  /* Handle the first few bytes by reading one byte at a time.
-     Do this until CHAR_PTR is aligned on a longword boundary.  */
-  for (char_ptr = (const unsigned char *) s;
-       (size_t) char_ptr % sizeof (longword) != 0;
-       ++char_ptr)
-    if (!*char_ptr || *char_ptr == c)
-      return (char *) char_ptr;
-
-  longword_ptr = (const longword *) char_ptr;
-
-  /* All these elucidatory comments refer to 4-byte longwords,
-     but the theory applies equally well to any size longwords.  */
-
-  /* Compute auxiliary longword values:
-     repeated_one is a value which has a 1 in every byte.
-     repeated_c has c in every byte.  */
-  repeated_one = 0x01010101;
-  repeated_c = c | (c << 8);
-  repeated_c |= repeated_c << 16;
-  if (0xffffffffU < (longword) -1)
-    {
-      repeated_one |= repeated_one << 31 << 1;
-      repeated_c |= repeated_c << 31 << 1;
-      if (8 < sizeof (longword))
-        {
-          size_t i;
-
-          for (i = 64; i < sizeof (longword) * 8; i *= 2)
-            {
-              repeated_one |= repeated_one << i;
-              repeated_c |= repeated_c << i;
-            }
-        }
-    }
-
-  /* Instead of the traditional loop which tests each byte, we will
-     test a longword at a time.  The tricky part is testing if *any of
-     the four* bytes in the longword in question are equal to NUL or
-     c.  We first use an xor with repeated_c.  This reduces the task
-     to testing whether *any of the four* bytes in longword1 or
-     longword2 is zero.
-
-     Let's consider longword1.  We compute tmp =
-       ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
-     That is, we perform the following operations:
-       1. Subtract repeated_one.
-       2. & ~longword1.
-       3. & a mask consisting of 0x80 in every byte.
-     Consider what happens in each byte:
-       - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
-         and step 3 transforms it into 0x80.  A carry can also be propagated
-         to more significant bytes.
-       - If a byte of longword1 is nonzero, let its lowest 1 bit be at
-         position k (0 <= k <= 7); so the lowest k bits are 0.  After step 1,
-         the byte ends in a single bit of value 0 and k bits of value 1.
-         After step 2, the result is just k bits of value 1: 2^k - 1.  After
-         step 3, the result is 0.  And no carry is produced.
-     So, if longword1 has only non-zero bytes, tmp is zero.
-     Whereas if longword1 has a zero byte, call j the position of the least
-     significant zero byte.  Then the result has a zero at positions 0, ...,
-     j-1 and a 0x80 at position j.  We cannot predict the result at the more
-     significant bytes (positions j+1..3), but it does not matter since we
-     already have a non-zero bit at position 8*j+7.
-
-     The test whether any byte in longword1 or longword2 is zero is equivalent
-     to testing whether tmp1 is nonzero or tmp2 is nonzero.  We can combine
-     this into a single test, whether (tmp1 | tmp2) is nonzero.
-
-     This test can read more than one byte beyond the end of a string,
-     depending on where the terminating NUL is encountered.  However,
-     this is considered safe since the initialization phase ensured
-     that the read will be aligned, therefore, the read will not cross
-     page boundaries and will not cause a fault.  */
-
-  while (1)
-    {
-      longword longword1 = *longword_ptr ^ repeated_c;
-      longword longword2 = *longword_ptr;
-
-      if (((((longword1 - repeated_one) & ~longword1)
-            | ((longword2 - repeated_one) & ~longword2))
-           & (repeated_one << 7)) != 0)
-        break;
-      longword_ptr++;
-    }
-
-  char_ptr = (const unsigned char *) longword_ptr;
-
-  /* At this point, we know that one of the sizeof (longword) bytes
-     starting at char_ptr is == 0 or == c.  On little-endian machines,
-     we could determine the first such byte without any further memory
-     accesses, just by looking at the tmp result from the last loop
-     iteration.  But this does not work on big-endian machines.
-     Choose code that works in both cases.  */
-
-  char_ptr = (unsigned char *) longword_ptr;
-  while (*char_ptr && (*char_ptr != c))
-    char_ptr++;
-  return (char *) char_ptr;
-}
diff --git a/lib/gl/strchrnul.valgrind b/lib/gl/strchrnul.valgrind
deleted file mode 100644
index b14fa13..0000000
--- a/lib/gl/strchrnul.valgrind
+++ /dev/null
@@ -1,12 +0,0 @@
-# Suppress a valgrind message about use of uninitialized memory in strchrnul().
-# This use is OK because it provides only a speedup.
-{
-    strchrnul-value4
-    Memcheck:Value4
-    fun:strchrnul
-}
-{
-    strchrnul-value8
-    Memcheck:Value8
-    fun:strchrnul
-}
diff --git a/lib/gltests/Makefile.am b/lib/gltests/Makefile.am
index 0cd919c..81a8621 100644
--- a/lib/gltests/Makefile.am
+++ b/lib/gltests/Makefile.am
@@ -145,14 +145,6 @@ EXTRA_DIST += test-memmem.c zerosize-ptr.h
 
 ## end   gnulib module memmem-tests
 
-## begin gnulib module rawmemchr-tests
-
-TESTS += test-rawmemchr
-check_PROGRAMS += test-rawmemchr
-EXTRA_DIST += test-rawmemchr.c
-
-## end   gnulib module rawmemchr-tests
-
 ## begin gnulib module stdbool-tests
 
 TESTS += test-stdbool
@@ -198,14 +190,6 @@ EXTRA_DIST += test-stdlib.c
 
 ## end   gnulib module stdlib-tests
 
-## begin gnulib module strchrnul-tests
-
-TESTS += test-strchrnul
-check_PROGRAMS += test-strchrnul
-EXTRA_DIST += test-strchrnul.c
-
-## end   gnulib module strchrnul-tests
-
 ## begin gnulib module string-tests
 
 TESTS += test-string
diff --git a/lib/gltests/test-rawmemchr.c b/lib/gltests/test-rawmemchr.c
deleted file mode 100644
index 963af39..0000000
--- a/lib/gltests/test-rawmemchr.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 Free Software Foundation
- * Written by Eric Blake and Bruno Haible
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
-  do                                                                        \
-    {                                                                       \
-      if (!(expr))                                                          \
-       {                                                                    \
-         fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-         fflush (stderr);                                                   \
-         abort ();                                                          \
-       }                                                                    \
-    }                                                                       \
-  while (0)
-
-/* Calculating void * + int is not portable, so this wrapper converts
-   to char * to make the tests easier to write.  */
-#define RAWMEMCHR (char *) rawmemchr
-
-int
-main (void)
-{
-  size_t n = 0x100000;
-  char *input = malloc (n + 1);
-  ASSERT (input);
-
-  input[0] = 'a';
-  input[1] = 'b';
-  memset (input + 2, 'c', 1024);
-  memset (input + 1026, 'd', n - 1028);
-  input[n - 2] = 'e';
-  input[n - 1] = 'a';
-  input[n] = '\0';
-
-  /* Basic behavior tests.  */
-  ASSERT (RAWMEMCHR (input, 'a') == input);
-  ASSERT (RAWMEMCHR (input, 'b') == input + 1);
-  ASSERT (RAWMEMCHR (input, 'c') == input + 2);
-  ASSERT (RAWMEMCHR (input, 'd') == input + 1026);
-
-  ASSERT (RAWMEMCHR (input + 1, 'a') == input + n - 1);
-  ASSERT (RAWMEMCHR (input + 1, 'e') == input + n - 2);
-
-  ASSERT (RAWMEMCHR (input, '\0') == input + n);
-
-  /* Alignment tests.  */
-  {
-    int i, j;
-    for (i = 0; i < 32; i++)
-      {
-        for (j = 0; j < 256; j++)
-          input[i + j] = j;
-        for (j = 0; j < 256; j++)
-          {
-            ASSERT (RAWMEMCHR (input + i, j) == input + i + j);
-          }
-      }
-  }
-
-  free (input);
-
-  return 0;
-}
diff --git a/lib/gltests/test-strchrnul.c b/lib/gltests/test-strchrnul.c
deleted file mode 100644
index ea882e5..0000000
--- a/lib/gltests/test-strchrnul.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 Free Software Foundation
- * Written by Eric Blake and Bruno Haible
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#include <config.h>
-
-#include <string.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define ASSERT(expr) \
-  do                                                                        \
-    {                                                                       \
-      if (!(expr))                                                      \
-        {                                                               \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                              \
-          abort ();                                                     \
-        }                                                               \
-    }                                                                   \
-  while (0)
-
-int
-main (void)
-{
-  size_t n = 0x100000;
-  char *input = malloc (n + 1);
-  ASSERT (input);
-
-  input[0] = 'a';
-  input[1] = 'b';
-  memset (input + 2, 'c', 1024);
-  memset (input + 1026, 'd', n - 1028);
-  input[n - 2] = 'e';
-  input[n - 1] = 'a';
-  input[n] = '\0';
-
-  /* Basic behavior tests.  */
-  ASSERT (strchrnul (input, 'a') == input);
-  ASSERT (strchrnul (input, 'b') == input + 1);
-  ASSERT (strchrnul (input, 'c') == input + 2);
-  ASSERT (strchrnul (input, 'd') == input + 1026);
-
-  ASSERT (strchrnul (input + 1, 'a') == input + n - 1);
-  ASSERT (strchrnul (input + 1, 'e') == input + n - 2);
-
-  ASSERT (strchrnul (input, 'f') == input + n);
-  ASSERT (strchrnul (input, '\0') == input + n);
-
-  /* Check that a very long haystack is handled quickly if the byte is
-     found near the beginning.  */
-  {
-    size_t repeat = 10000;
-    for (; repeat > 0; repeat--)
-      {
-        ASSERT (strchrnul (input, 'c') == input + 2);
-      }
-  }
-
-  /* Alignment tests.  */
-  {
-    int i, j;
-    for (i = 0; i < 32; i++)
-      {
-        for (j = 0; j < 256; j++)
-          input[i + j] = (j + 1) & 0xff;
-        for (j = 1; j < 256; j++)
-          {
-            ASSERT (strchrnul (input + i, j) == input + i + j - 1);
-            input[i + j - 1] = (j == 1 ? 2 : 1);
-            ASSERT (strchrnul (input + i, j) == input + i + 255);
-            input[i + j - 1] = j;
-          }
-      }
-  }
-
-  free (input);
-
-  return 0;
-}
diff --git a/lib/src/gsasl.h b/lib/src/gsasl.h
index 13b3691..287f057 100644
--- a/lib/src/gsasl.h
+++ b/lib/src/gsasl.h
@@ -51,7 +51,7 @@ extern "C"
    * version number.  Used together with gsasl_check_version() to
    * verify header file and run-time library consistency.
    */
-# define GSASL_VERSION "1.3.90"
+# define GSASL_VERSION "1.3.91"
 
   /**
    * GSASL_VERSION_MAJOR
@@ -84,7 +84,7 @@ extern "C"
    *
    * Since: 1.1
    */
-# define GSASL_VERSION_PATCH 90
+# define GSASL_VERSION_PATCH 91
 
   /**
    * GSASL_VERSION_NUMBER
@@ -95,7 +95,7 @@ extern "C"
    *
    * Since: 1.1
    */
-# define GSASL_VERSION_NUMBER 0x01035a
+# define GSASL_VERSION_NUMBER 0x01035b
 
   /* RFC 2222: SASL mechanisms are named by strings, from 1 to 20
    * characters in length, consisting of upper-case letters, digits,


hooks/post-receive
-- 
GNU gsasl




reply via email to

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