Commit graph

18 commits

Author SHA1 Message Date
Noah Goldstein 44829b3ddb String: Add support for __memcmpeq() ABI on all targets
No bug.

This commit adds support for __memcmpeq() as a new ABI for all
targets. In this commit __memcmpeq() is implemented only as an alias
to the corresponding targets memcmp() implementation. __memcmpeq() is
added as a new symbol starting with GLIBC_2.35 and defined in string.h
with comments explaining its behavior. Basic tests that it is callable
and works where added in string/tester.c

As discussed in the proposal "Add new ABI '__memcmpeq()' to libc"
__memcmpeq() is essentially a reserved namespace for bcmp(). The means
is shares the same specifications as memcmp() except the return value
for non-equal byte sequences is any non-zero value. This is less
strict than memcmp()'s return value specification and can be better
optimized when a boolean return is all that is needed.

__memcmpeq() is meant to only be called by compilers if they can prove
that the return value of a memcmp() call is only used for its boolean
value.

All tests in string/tester.c passed. As well build succeeds on
x86_64-linux-gnu target.
2021-10-26 16:51:29 -05:00
Siddhesh Poyarekar 30891f35fa Remove "Contributed by" lines
We stopped adding "Contributed by" or similar lines in sources in 2012
in favour of git logs and keeping the Contributors section of the
glibc manual up to date.  Removing these lines makes the license
header a bit more consistent across files and also removes the
possibility of error in attribution when license blocks or files are
copied across since the contributed-by lines don't actually reflect
reality in those cases.

Move all "Contributed by" and similar lines (Written by, Test by,
etc.) into a new file CONTRIBUTED-BY to retain record of these
contributions.  These contributors are also mentioned in
manual/contrib.texi, so we just maintain this additional record as a
courtesy to the earlier developers.

The following scripts were used to filter a list of files to edit in
place and to clean up the CONTRIBUTED-BY file respectively.  These
were not added to the glibc sources because they're not expected to be
of any use in future given that this is a one time task:

https://gist.github.com/siddhesh/b5ecac94eabfd72ed2916d6d8157e7dc
https://gist.github.com/siddhesh/15ea1f5e435ace9774f485030695ee02

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-09-03 22:06:44 +05:30
Paul Eggert 2b778ceb40 Update copyright dates with scripts/update-copyrights
I used these shell commands:

../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")

and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master
2021-01-02 12:17:34 -08:00
Joseph Myers d614a75396 Update copyright dates with scripts/update-copyrights. 2020-01-01 00:14:33 +00:00
Paul Eggert 5a82c74822 Prefer https to http for gnu.org and fsf.org URLs
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:

sed -ri '
  s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
  s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
  $(find $(git ls-files) -prune -type f \
      ! -name '*.po' \
      ! -name 'ChangeLog*' \
      ! -path COPYING ! -path COPYING.LIB \
      ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
      ! -path manual/texinfo.tex ! -path scripts/config.guess \
      ! -path scripts/config.sub ! -path scripts/install-sh \
      ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
      ! -path INSTALL ! -path  locale/programs/charmap-kw.h \
      ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
      ! '(' -name configure \
            -execdir test -f configure.ac -o -f configure.in ';' ')' \
      ! '(' -name preconfigure \
            -execdir test -f preconfigure.ac ';' ')' \
      -print)

and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:

  chmod a+x sysdeps/unix/sysv/linux/riscv/configure
  # Omit irrelevant whitespace and comment-only changes,
  # perhaps from a slightly-different Autoconf version.
  git checkout -f \
    sysdeps/csky/configure \
    sysdeps/hppa/configure \
    sysdeps/riscv/configure \
    sysdeps/unix/sysv/linux/csky/configure
  # Omit changes that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
  git checkout -f \
    sysdeps/powerpc/powerpc64/ppc-mcount.S \
    sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
  # Omit change that caused a pre-commit check to fail like this:
  # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
  git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
2019-09-07 02:43:31 -07:00
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Mike Frysinger c70a4b1db0 ia64: relocate out of ports/ subdir 2014-02-16 01:12:38 -05:00
Ulrich Drepper d75a0a62b1 Remove IA-64 support 2012-01-07 11:19:05 -05:00
Jim Meyering ded5b9b7c7 Remove doubled words. 2011-04-22 21:34:32 -04:00
Ulrich Drepper f532641db7 Update.
2004-03-26  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/unix/sysv/linux/wordsize-64/fxstat.c (__fxstat): Don't
	use "struct kernel_stat".

2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/ia64/memcmp.S: Fix symbol.
2004-04-17 23:14:52 +00:00
Ulrich Drepper 758b215383 Update.
* include/string.h: Add libc_hidden_builtin_proto for memcmp.
	* sysdeps/generic/memcmp.c: Add libc_hidden_builtin_def.
	* sysdeps/i386/memcmp.S: Likewise.
	* sysdeps/i386/i686/memcmp.S: Likewise.
	* sysdeps/ia64/memcmp.S: Likewise.
	* sysdeps/sparc/sparc64/memcmp.S: Likewise.

	* sysdeps/unix/sysv/linux/sigprocmask.c: Include <string.h>.
2004-04-01 23:29:52 +00:00
Andreas Jaeger 41bdb6e20c Update to LGPL v2.1.
2001-07-06  Paul Eggert  <eggert@twinsun.com>

	* manual/argp.texi: Remove ignored LGPL copyright notice; it's
	not appropriate for documentation anyway.
	* manual/libc-texinfo.sh: "Library General Public License" ->
	"Lesser General Public License".

2001-07-06  Andreas Jaeger  <aj@suse.de>

	* All files under GPL/LGPL version 2: Place under LGPL version
	2.1.
2001-07-06 04:58:11 +00:00
Ulrich Drepper 8ee3551551 Update.
2001-04-11  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/ia64/htonl.S: Drop superfluous "alloc".
	* sysdeps/ia64/htons.S: Likewise.

	* sysdeps/ia64/memset.S: Add unwind directives.
	* sysdeps/ia64/strncpy.S: Likewise.
	* sysdeps/ia64/strcat.S: Likewise.

	* sysdeps/ia64/memccpy.S: Add unwind directives.  Drop superfluous
	restore of ar.pfs.
	* sysdeps/ia64/strchr.S: Likewise.
	* sysdeps/ia64/memmove.S: Likewise.
	* sysdeps/ia64/memcpy.S: Likewise.
	* sysdeps/ia64/memcmp.S: Likewise.
	* sysdeps/ia64/memchr.S: Likewise.
	* sysdeps/ia64/strcmp.S: Likewise.
	* sysdeps/ia64/strlen.S: Likewise.
	* sysdeps/ia64/strcpy.S: Likewise.
	* sysdeps/ia64/strncmp.S: Likewise.
2001-04-11 19:57:49 +00:00
Ulrich Drepper 5bfc425236 Update.
* sysdeps/ia64/memccpy.S: New file.
	* sysdeps/ia64/memchr.S: New file.
	* sysdeps/ia64/memcmp.S: New file.
	* sysdeps/ia64/memcpy.S: New file.
	* sysdeps/ia64/memmove.S: New file.
	* sysdeps/ia64/memset.S: New file.
	* sysdeps/ia64/strcat.S: New file.
	* sysdeps/ia64/strchr.S: New file.
	* sysdeps/ia64/strcmp.S: New file.
	* sysdeps/ia64/strcpy.S: New file.
	* sysdeps/ia64/strlen.S: New file.
	* sysdeps/ia64/strncmp.S: New file.
	* sysdeps/ia64/strncpy.S: New file.
	* sysdeps/ia64/softpipe.h: New file.
	Patches by Dan Pop <Dan.Pop@cern.ch>.

	* manual/memory.texi: Document memory handling functions (mlock,
	munlock, mlockall, munlockall, brk, and sbrk)
2000-05-21 22:04:15 +00:00