DragonFly-2.3.0.601.g71602 master gnu/usr.bin/binutils217/libiberty config.h gnu/usr.bin/cc41/libiberty config.h gnu/usr.bin/gdb/libiberty config.h include string.h strings.h kerberos5/include config.h lib/libbind port_after.h lib/libc/locale Makefile.inc wcscoll.3 wcscoll.c wcsxfrm.3 wcsxfrm.c lib/libc/string Makefile.inc bcmp.3 bcmp.c bcopy.3 bcopy.c bstring.3 bzero.3 ffs.3 ffs.c ffsl.c ffsll.c fls.c flsl.c flsll.c index.3 index.c memccpy.3 memccpy.c memchr.3 memchr.c memcmp.3 memcmp.c memcpy.3 memmem.3 memmem.c memmove.3 memrchr.c memset.3 memset.c rindex.3 rindex.c stpcpy.c strcasecmp.3 strcasecmp.c strcasestr.c strcat.3 strcat.c strchr.3 strcmp.3 strcmp.c strcoll.3 strcpy.3 strcpy.c strcspn.3 strdup.3 strdup.c strerror.3 strerror.c string.3 strlcat.c strlcpy.3 strlcpy.c strlen.3 strlen.c strmode.3 strmode.c strncat.c strncmp.c strncpy.c strndup.c strnstr.c strpbrk.3 strpbrk.c strrchr.3 strsep.3 strsep.c strsignal.c strspn.3 strstr.3 strstr.c strtok.3 strtok.c strxfrm.3 strxfrm.c swab.3 swab.c wcscat.c wcscmp.c wcscoll.3 wcscoll.c wcscpy.c wcscspn.c wcsdup.c wcslcat.c wcslcpy.c wcslen.c wcsncat.c wcsncmp.c wcsncpy.c wcspbrk.c wcsrchr.c wcsspn.c wcsstr.c wcstok.3 wcstok.c wcswidth.3 wcswidth.c wcsxfrm.3 wcsxfrm.c wmemchr.3 wmemchr.c wmemcmp.c wmemcpy.c wmemmove.c wmemset.c lib/libmagic config.h

Peter Avalos pavalos at crater.dragonflybsd.org
Tue Apr 7 00:13:49 PDT 2009


commit 716024cd274740e5ee0a906854b489160f9f02f3
Author: Peter Avalos <pavalos at theshell.com>
Date:   Wed Jan 14 16:01:28 2009 -0500

    Sync lib/libc/string with FreeBSD:
    
    -Move legacy functions to strings.h.
    
    -A few WARNS and style cleanup.
    
    -Add ffsl(), fls(), flsl(), ffsll(), flsll().
    
    -Merge index.3 and rindex.3 since they are so similar.  Do the same for
    strrchr().
    
    -Add memrchr().
    
    -Remove advertising clause from copyrights.
    
    -Add memmem() which is basically the same as strstr().
    
    -Add stpcpy().
    
    -Add a SECURITY CONSIDERATIONS section to remind people about buffer
    overflows, etc.
    
    -Add restrict keyword where required.
    
    -Add strndup().
    
    -Correctly document the return value of strerror() and strerror_r() and
    the contents of the returned buffer for unknown error codes.
    
    -Add NLS catalogs support to strerror(), strerror_r() and strsignal().
    Controlled by NLS define.
    
    -For strl* files, use a less restrictive copyright (original author
    changed it).
    
    -strmode.3: strmode does not return 0.
    
    -Move swab()'s prototype to unistd.h IAW SUS.
    
    -Simplify by removing unneeded local variables and explicit
    null termination is wcs* functions.
    
    -Move wcscoll() and wcsxfrm() to string/ and do locale-sensitive
    collation for single-byte locales.
    
    -Add wcsdup().
    
    -Remove unneeded includes.
    
    -Reimplement wcsrchr(3) more efficiently, using a single forward scan
    (like strrchr(3)) instead of scanning forwards to find the end of the
    string then scanning backwards to find the character.
    
    -Slightly optimize wcswidth().
    
    -Tell contrib srcs that we have strndup now since some of them provide
    their own static definition which will blow up a buildworld.

Summary of changes:
 gnu/usr.bin/binutils217/libiberty/config.h |    2 +-
 gnu/usr.bin/cc41/libiberty/config.h        |    2 +-
 gnu/usr.bin/gdb/libiberty/config.h         |    2 +-
 include/string.h                           |  148 +++++++++++++++----------
 include/strings.h                          |   52 +++++++--
 kerberos5/include/config.h                 |    4 +-
 lib/libbind/port_after.h                   |    2 +-
 lib/libc/locale/Makefile.inc               |    6 +-
 lib/libc/locale/wcscoll.3                  |  113 ------------------
 lib/libc/locale/wcscoll.c                  |   40 -------
 lib/libc/locale/wcsxfrm.3                  |  108 -----------------
 lib/libc/locale/wcsxfrm.c                  |   56 ---------
 lib/libc/string/Makefile.inc               |   82 +++++++++-----
 lib/libc/string/bcmp.3                     |   15 ++-
 lib/libc/string/bcmp.c                     |   12 +--
 lib/libc/string/bcopy.3                    |   15 ++-
 lib/libc/string/bcopy.c                    |   39 +++----
 lib/libc/string/bstring.3                  |    6 +-
 lib/libc/string/bzero.3                    |   15 ++-
 lib/libc/string/ffs.3                      |   77 ++++++++++---
 lib/libc/string/ffs.c                      |   16 +--
 lib/libc/string/ffsl.c                     |   47 ++++++++
 lib/libc/string/ffsll.c                    |   47 ++++++++
 lib/libc/string/fls.c                      |   47 ++++++++
 lib/libc/string/flsl.c                     |   47 ++++++++
 lib/libc/string/flsll.c                    |   47 ++++++++
 lib/libc/string/index.3                    |   62 +++++++----
 lib/libc/string/index.c                    |   31 +++---
 lib/libc/string/memccpy.3                  |    6 +-
 lib/libc/string/memccpy.c                  |    7 +-
 lib/libc/string/memchr.3                   |   38 +++++--
 lib/libc/string/memchr.c                   |    7 +-
 lib/libc/string/memcmp.3                   |    6 +-
 lib/libc/string/memcmp.c                   |    7 +-
 lib/libc/string/memcpy.3                   |    6 +-
 lib/libc/string/memmem.3                   |   86 ++++++++++++++
 lib/libc/string/memmem.c                   |   64 +++++++++++
 lib/libc/string/memmove.3                  |    6 +-
 lib/libc/string/memrchr.c                  |   39 +++++++
 lib/libc/string/memset.3                   |    6 +-
 lib/libc/string/memset.c                   |   11 +-
 lib/libc/string/rindex.3                   |   86 --------------
 lib/libc/string/rindex.c                   |   25 +++--
 lib/libc/string/stpcpy.c                   |   43 +++++++
 lib/libc/string/strcasecmp.3               |   15 ++-
 lib/libc/string/strcasecmp.c               |    8 +-
 lib/libc/string/strcasestr.c               |    6 +-
 lib/libc/string/strcat.3                   |   68 ++++++++++-
 lib/libc/string/strcat.c                   |    8 +-
 lib/libc/string/strchr.3                   |   50 +++++----
 lib/libc/string/strcmp.3                   |    6 +-
 lib/libc/string/strcmp.c                   |    7 +-
 lib/libc/string/strcoll.3                  |   16 ++--
 lib/libc/string/strcpy.3                   |   73 +++++++++----
 lib/libc/string/strcpy.c                   |    9 +-
 lib/libc/string/strcspn.3                  |   13 ++-
 lib/libc/string/strdup.3                   |   32 ++++--
 lib/libc/string/strdup.c                   |    6 +-
 lib/libc/string/strerror.3                 |   27 ++---
 lib/libc/string/strerror.c                 |   68 ++++++++----
 lib/libc/string/string.3                   |   11 +-
 lib/libc/string/strlcat.c                  |   39 +++----
 lib/libc/string/strlcpy.3                  |   43 ++++----
 lib/libc/string/strlcpy.c                  |   48 +++-----
 lib/libc/string/strlen.3                   |    6 +-
 lib/libc/string/strlen.c                   |    7 +-
 lib/libc/string/strmode.3                  |   11 +--
 lib/libc/string/strmode.c                  |    6 +-
 lib/libc/string/strncat.c                  |    9 +-
 lib/libc/string/strncmp.c                  |    7 +-
 lib/libc/string/strncpy.c                  |    9 +-
 lib/libc/string/strndup.c                  |   51 ++++++++
 lib/libc/string/strnstr.c                  |    6 +-
 lib/libc/string/strpbrk.3                  |    6 +-
 lib/libc/string/strpbrk.c                  |    6 +-
 lib/libc/string/strrchr.3                  |   92 ---------------
 lib/libc/string/strsep.3                   |   29 ++++--
 lib/libc/string/strsep.c                   |    7 +-
 lib/libc/string/strsignal.c                |   69 +++++++++---
 lib/libc/string/strspn.3                   |   15 ++-
 lib/libc/string/strstr.3                   |    7 +-
 lib/libc/string/strstr.c                   |    6 +-
 lib/libc/string/strtok.3                   |   13 +--
 lib/libc/string/strtok.c                   |  171 +++++++++++----------------
 lib/libc/string/strxfrm.3                  |   11 +-
 lib/libc/string/strxfrm.c                  |   18 +---
 lib/libc/string/swab.3                     |   12 +--
 lib/libc/string/swab.c                     |   17 +--
 lib/libc/string/wcscat.c                   |   26 ++---
 lib/libc/string/wcscmp.c                   |    8 +-
 lib/libc/string/wcscoll.3                  |  108 +++++++++++++++++
 lib/libc/string/wcscoll.c                  |   97 ++++++++++++++++
 lib/libc/string/wcscpy.c                   |   19 +--
 lib/libc/string/wcscspn.c                  |    3 +-
 lib/libc/string/wcsdup.c                   |   42 +++++++
 lib/libc/string/wcslcat.c                  |    3 +-
 lib/libc/string/wcslcpy.c                  |    3 +-
 lib/libc/string/wcslen.c                   |    5 +-
 lib/libc/string/wcsncat.c                  |    5 +-
 lib/libc/string/wcsncmp.c                  |    8 +-
 lib/libc/string/wcsncpy.c                  |    8 +-
 lib/libc/string/wcspbrk.c                  |    2 +-
 lib/libc/string/wcsrchr.c                  |   27 ++---
 lib/libc/string/wcsspn.c                   |    3 +-
 lib/libc/string/wcsstr.c                   |    8 +-
 lib/libc/string/wcstok.3                   |  133 +++++++++++++++++++++
 lib/libc/string/wcstok.c                   |   85 ++++++++++++++
 lib/libc/string/wcswidth.3                 |    6 +-
 lib/libc/string/wcswidth.c                 |   46 ++++----
 lib/libc/string/wcsxfrm.3                  |  122 ++++++++++++++++++++
 lib/libc/string/wcsxfrm.c                  |  113 ++++++++++++++++++
 lib/libc/string/wmemchr.3                  |   17 ++--
 lib/libc/string/wmemchr.c                  |    4 +-
 lib/libc/string/wmemcmp.c                  |    7 +-
 lib/libc/string/wmemcpy.c                  |    5 +-
 lib/libc/string/wmemmove.c                 |    3 +-
 lib/libc/string/wmemset.c                  |    3 +-
 lib/libmagic/config.h                      |    2 +-
 118 files changed, 2249 insertions(+), 1399 deletions(-)
 delete mode 100644 lib/libc/locale/wcscoll.3
 delete mode 100644 lib/libc/locale/wcscoll.c
 delete mode 100644 lib/libc/locale/wcsxfrm.3
 delete mode 100644 lib/libc/locale/wcsxfrm.c
 create mode 100644 lib/libc/string/ffsl.c
 create mode 100644 lib/libc/string/ffsll.c
 create mode 100644 lib/libc/string/fls.c
 create mode 100644 lib/libc/string/flsl.c
 create mode 100644 lib/libc/string/flsll.c
 create mode 100644 lib/libc/string/memmem.3
 create mode 100644 lib/libc/string/memmem.c
 create mode 100644 lib/libc/string/memrchr.c
 delete mode 100644 lib/libc/string/rindex.3
 create mode 100644 lib/libc/string/stpcpy.c
 create mode 100644 lib/libc/string/strndup.c
 delete mode 100644 lib/libc/string/strrchr.3
 create mode 100644 lib/libc/string/wcscoll.3
 create mode 100644 lib/libc/string/wcscoll.c
 create mode 100644 lib/libc/string/wcsdup.c
 create mode 100644 lib/libc/string/wcstok.3
 create mode 100644 lib/libc/string/wcstok.c
 create mode 100644 lib/libc/string/wcsxfrm.3
 create mode 100644 lib/libc/string/wcsxfrm.c

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/716024cd274740e5ee0a906854b489160f9f02f3


-- 
DragonFly BSD source repository





More information about the Commits mailing list