Commit Graph

33 Commits

Author SHA1 Message Date
Adhemerval Zanella Netto de477abcaa Use '%z' instead of '%Z' on printf functions
The Z modifier is a nonstandard synonymn for z (that predates z
itself) and compiler might issue an warning for in invalid
conversion specifier.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2022-09-22 08:48:04 -03:00
Paul Eggert 581c785bf3 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 7061 files FOO.

I then removed trailing white space from math/tgmath.h,
support/tst-support-open-dev-null-range.c, and
sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following
obscure pre-commit check failure diagnostics from Savannah.  I don't
know why I run into these diagnostics whereas others evidently do not.

remote: *** 912-#endif
remote: *** 913:
remote: *** 914-
remote: *** error: lines with trailing whitespace found
...
remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
2022-01-01 11:40:24 -08: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
Siddhesh Poyarekar 1e0e6d656d iconv_charmap: Close output file when done
Reviewed-by: Arjun Shankar <arjun@redhat.com>
2021-08-03 21:10:29 +05:30
Siddhesh Poyarekar c8c3c5e89a charmap_conversion: Free conversion table on exit
The conversion table is allocated using xcalloc but never freed.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2021-05-18 09:25:40 +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
Roland McGrath 65b00b6c51 Clean up wchar_t conversion code in iconv program. 2014-10-30 12:56:51 -07:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Ondřej Bílka c0c3f78afb Fix typos. 2013-08-21 19:48:48 +02:00
Ryan S. Arnold e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Florian Weimer 4c0fe6fe42 Use *stat64 instead of *stat in installed programs
This ensures reliable operation on file systems with inode numbers
which do not fit into 32 bits.
2013-05-10 11:42:17 +02:00
Mike Frysinger 6ff444c418 unify xmalloc prototypes & friends
These prototypes are duplicated in many places.  Add a dedicated
header for holding prototypes for program-specific functions to
avoid that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-18 17:16:05 -05:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Roland McGrath bea9b19322 Fix lots of bitrot for stub configurations. 2012-07-30 16:34:33 -07:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper ec09c1c410 Optimize xmalloc, xcalloc, xrealloc, and xstrdup
Add alloc_size attribute and apply consistently the malloc attribute
to xmalloc, xcalloc, xrealloc, and xstrdup.
2012-01-08 21:19:43 -05:00
Ulrich Drepper 5484ff515e (charmap_conversion): Pass name of output file not stream for output file. Open output file here. 2008-03-11 20:12:16 +00:00
Roland McGrath 2e2efe652a * elf/ldconfig.c: Allow GPLv2 or any later version.
* elf/readlib.c: Likewise.
	* elf/chroot_canon.c: Likewise.
	* elf/cache.c: Likewise.
	* nscd/mem.c: Likewise.
	* nscd/getpwuid_r.c: Likewise.
	* nscd/grpcache.c: Likewise.
	* nscd/aicache.c: Likewise.
	* nscd/getsrvbynm_r.c: Likewise.
	* nscd/nscd.c: Likewise.
	* nscd/servicescache.c: Likewise.
	* nscd/getsrvbypt_r.c: Likewise.
	* nscd/initgrcache.c: Likewise.
	* nscd/gethstbyad_r.c: Likewise.
	* nscd/gethstbynm2_r.c: Likewise.
	* nscd/getgrnam_r.c: Likewise.
	* nscd/nscd_setup_thread.c: Likewise.
	* nscd/getpwnam_r.c: Likewise.
	* nscd/gai.c: Likewise.
	* nscd/connections.c: Likewise.
	* nscd/dbg_log.c: Likewise.
	* nscd/cache.c: Likewise.
	* nscd/hstcache.c: Likewise.
	* nscd/nscd_conf.c: Likewise.
	* nscd/getgrgid_r.c: Likewise.
	* nscd/pwdcache.c: Likewise.
	* catgets/gencat.c: Likewise.
	* locale/programs/linereader.h: Likewise.
	* locale/programs/locarchive.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/locfile-kw.h: Likewise.
	* locale/programs/ld-address.c: Likewise.
	* locale/programs/xmalloc.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* locale/programs/simple-hash.c: Likewise.
	* locale/programs/xstrdup.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/locfile-kw.gperf: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/charmap-kw.gperf: Likewise.
	* locale/programs/charmap.h: Likewise.
	* locale/programs/charmap-kw.h: Likewise.
	* locale/programs/config.h: Likewise.
	* locale/programs/locfile.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/repertoire.h: Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/linereader.c: Likewise.
	* locale/programs/locfile.h: Likewise.
	* locale/programs/3level.h: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/charmap-dir.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/localedef.h: Likewise.
	* locale/programs/charmap-dir.h: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/simple-hash.h: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/locale-spec.c: Likewise.
	* locale/programs/locfile-token.h: Likewise.
	* posix/getconf.c: Likewise.
	* iconv/dummy-repertoire.c: Likewise.
	* iconv/iconv_charmap.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise.
2007-07-16 00:56:07 +00:00
Ulrich Drepper 51e5926049 * nis/nis_defaults.c (searchXYX): New functions. Used by both
searchgroup and searchowner.  Significantly simplified.
	(__nis_default_owner): Remove duplication.  Do not locally copy the
	string before duplicating it.
	(__nis_default_group): Likewise.

	* nis/nis_lookup.c (nis_lookup): After calling nis_free_directory,
	we must clear the variable before calling __nisfind_server.

	* nis/nis_lookup.c (nis_lookup): Always free memory allocated with
	nis_getnames.  [Coverity CID 223]

	* locale/programs/locfile.c (locfile_read): Use alloca instead of
	xmalloc to allocate local repertoire name.  [Coverity CID 222]

	* iconv/iconv_charmap.c (use_to_charmap): No need to dynamically
	allocate memory for the input to add_bytes.  [Coverity CID 221]

	was allocated here.  [Coverity CID 219, 220]
2006-05-10 02:55:21 +00:00
Ulrich Drepper 053f7b2b47 * inet/rexec.c (rexec_af): If we have no canonical name don't
proceed further [Coverity CID 86].

	* iconv/iconv_charmap.c (process_fd): Initialize inptr from inbuf,
	not to NULL [Coverity CID 88].
2006-04-07 08:17:33 +00:00
Ulrich Drepper 43bc8ac6ea * catgets/gencat.c: Use GPL, not LGPL.
* elf/cache.c: Likewise.
	* elf/chroot_canon.c: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/readlib.c: Likewise.
	* iconv/dummy-repertoire.c: Likewise.
	* iconv/iconv_charmap.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* locale/programs/3level.h: Likewise.
	* locale/programs/charmap-dir.c: Likewise.
	* locale/programs/charmap-dir.h: Likewise.
	* locale/programs/charmap-kw.gperf: Likewise.
	* locale/programs/charmap.c: Likewise.
	* locale/programs/charmap.h: Likewise.
	* locale/programs/config.h: Likewise.
	* locale/programs/ld-address.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/linereader.c: Likewise.
	* locale/programs/linereader.h: Likewise.
	* locale/programs/locale-spec.c: Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* locale/programs/localedef.h: Likewise.
	* locale/programs/locarchive.c: Likewise.
	* locale/programs/locfile-kw.gperf: Likewise.
	* locale/programs/locfile-token.h: Likewise.
	* locale/programs/locfile.c: Likewise.
	* locale/programs/locfile.h: Likewise.
	* locale/programs/repertoire.c: Likewise.
	* locale/programs/repertoire.h: Likewise.
	* locale/programs/simple-hash.c: Likewise.
	* locale/programs/simple-hash.h: Likewise.
	* locale/programs/xmalloc.c: Likewise.
	* locale/programs/xstrdup.c: Likewise.
	* malloc/memusagestat.c: Likewise.
	* nscd/aicache.c: Likewise.
	* nscd/cache.c: Likewise.
	* nscd/connections.c: Likewise.
	* nscd/dbg_log.c: Likewise.
	* nscd/gai.c: Likewise.
	* nscd/getgrgid_r.c: Likewise.
	* nscd/getgrnam_r.c: Likewise.
	* nscd/gethstbyad_r.c: Likewise.
	* nscd/gethstbynm2_r.c: Likewise.
	* nscd/getpwnam_r.c: Likewise.
	* nscd/getpwuid_r.c: Likewise.
	* nscd/grpcache.c: Likewise.
	* nscd/hstcache.c: Likewise.
	* nscd/initgrcache.c: Likewise.
	* nscd/mem.c: Likewise.
	* nscd/nscd.c: Likewise.
	* nscd/nscd_conf.c: Likewise.
	* nscd/pwdcache.c: Likewise.
	* posix/getconf.c: Likewise.
	* sysdeps/generic/nscd_setup_thread.c: Likewise.
	* sysdeps/unix/sysv/linux/nscd_setup_thread.c: Likewise.
2005-12-07 05:49:17 +00:00
Ulrich Drepper a334319f65 (CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4. 2004-12-22 20:10:10 +00:00
Jakub Jelinek 0ecb606cb6 2.5-18.1 2007-07-12 18:26:36 +00:00
Ulrich Drepper d1dddedf78 Realloc error handling memory leak fix. 2001-12-29 15:57:15 +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 93693c4d82 Update.
2001-02-04  Ulrich Drepper  <drepper@redhat.com>

	* iconv/Makefile (iconv_prog-modules): Define.  Add vpath to find
	files in locale/programs.  Add CFLAGS definition to allow compiling
	localedef files.
	* iconv/dummy-repertoire.c: New file.
	* iconv/iconv_charmap.c: New file.
	* iconv/iconv_prog.h: New file.
	* iconv/iconv_prog.c: Make verbose and omit_invalid global.
	(main): If parameter for -f and -t contain slashes try first to resolve
	the strings as filenames of charmap files.  Use them for conversion
	in this case.
	* iconvdata/run-iconv-test.sh: If charmaps exist also run tests with
	iconv getting charmap names as parameters.
	* locale/programs/linereader.c (lr_token): Take extra parameters
	verbose and pass it to get_string.
	(get_string): Take extra parameters verbose.
	* locale/programs/charmap.c (parse_charmap): Take extra parameters
	verbose and be_quiet.  Change all callers of lr_token and
	parse_charmap.
	* locale/programs/charmap.h: Likewise.
	* locale/programs/ld-address.c: Likewise.
	* locale/programs/ld-collate.c: Likewise.
	* locale/programs/ld-ctype.c: Likewise.
	* locale/programs/ld-identification.c: Likewise.
	* locale/programs/ld-measurement.c: Likewise.
	* locale/programs/ld-messages.c: Likewise.
	* locale/programs/ld-monetary.c: Likewise.
	* locale/programs/ld-name.c: Likewise.
	* locale/programs/ld-numeric.c: Likewise.
	* locale/programs/ld-paper.c: Likewise.
	* locale/programs/ld-telephone.c: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/linereader.c: Likewise.
	* locale/programs/linereader.h: Likewise.
	* locale/programs/localedef.c: Likewise.
	* locale/programs/locfile.c: Likewise.
	* locale/programs/locfile.h: Likewise.
	* locale/programs/repertoire.c: Likewise.
2001-02-05 05:57:24 +00:00