Commit Graph

477 Commits

Author SHA1 Message Date
Mike Frysinger b482d0364e localedef: improve error message [BZ #16985]
If you pass in a path that fails to be opened, then output_path is set to
NULL, and an error is flagged.  Then at the end, we use both of those:
	cannot write output files to `(null)': No such file or directory

Tweak the message to use the user's input when output_path is NULL.
2015-09-11 23:25:06 -04:00
Marko Myllynen fc5771e43c Remove unused PREDEFINED_CLASSES code
Hi,

AFAICS PREDEFINED_CLASSES is never defined thus the code is unused. It would seem that the code is related to LO_LTYPE which was discussed in the past but there are no any recent references:

http://pubs.opengroup.org/onlinepubs/9638399/loltype.htm

Patch below, compiles and passes make check.

2015-05-12 Marko Myllynen  <myllynen@redhat.com>

	* locale/C-ctype.c (PREDEFINED_CLASSES): Remove.
	* locale/programs/ld-ctype.c: Likewise.
2015-06-09 09:34:06 +02:00
Leonhard Holz f13c2a8dff Improve strcoll with strdiff.
This patch improves strcoll hot case by finding first byte that
mismatches. That is in likely case enough to determine comparison
result.
2015-05-12 11:37:52 +02:00
Roland McGrath 1c6e6f2315 Remove some references to bcopy/bcmp/bzero. 2015-01-13 11:12:55 -08:00
Joseph Myers 9706dc5f53 Update copyright dates not handled by scripts/update-copyrights.
I've updated copyright dates in glibc for 2015.  This is the patch for
the changes not generated by scripts/update-copyrights and subsequent
build / regeneration of generated files.  Apart from the files updated
last time (of which sotruss.ksh had moved to sotruss.sh during the
year) this also updates nptl/version.c (missed from 2006 until
October) and sysdeps/unix/sysv/linux/lddlibc4.c (missed since 2009).

	* NEWS: Update copyright dates.
	* catgets/gencat.c (print_version): Likewise.
	* csu/version.c (banner): Likewise.
	* debug/catchsegv.sh: Likewise.
	* debug/pcprofiledump.c (print_version): Likewise.
	* debug/xtrace.sh (do_version): Likewise.
	* elf/ldconfig.c (print_version): Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/pldd.c (print_version): Likewise.
	* elf/sotruss.sh: Likewise.
	* elf/sprof.c (print_version): Likewise.
	* iconv/iconv_prog.c (print_version): Likewise.
	* iconv/iconvconfig.c (print_version): Likewise.
	* locale/programs/locale.c (print_version): Likewise.
	* locale/programs/localedef.c (print_version): Likewise.
	* login/programs/pt_chown.c (print_version): Likewise.
	* malloc/memusage.sh (do_version): Likewise.
	* malloc/memusagestat.c (print_version): Likewise.
	* malloc/mtrace.pl: Likewise.
	* manual/libc.texinfo: Likewise.
	* nptl/version.c (banner): Likewise.
	* nscd/nscd.c (print_version): Likewise.
	* nss/getent.c (print_version): Likewise.
	* nss/makedb.c (print_version): Likewise.
	* posix/getconf.c (main): Likewise.
	* scripts/test-installation.pl: Likewise.
	* sysdeps/unix/sysv/linux/lddlibc4.c (main): Likewise.
2015-01-02 16:54:45 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Ondřej Bílka 363a989918 Return allocated array instead of unallocated.
In locale/programs/ld-ctype.c we returned array that was on stack.
Fixed by returning static array instead.
2014-12-16 00:09:50 +01:00
Stefan Liebler 40e53917ea Get rid of warning inlining failed in call to maybe_swap_uint32 2014-12-11 17:04:40 +01:00
Roland McGrath a62b3c15de Minor cleanup in locale.c 2014-09-12 16:07:23 -07:00
Roland McGrath d7e49b19d3 Minor cleanup in ld-ctype.c 2014-09-12 15:59:10 -07:00
Siddhesh Poyarekar c3c7c3604f Fix -Wundef warning for HAVE_OBSTACK
Remove the HAVE_OBSTACK macro check and include obstack check in
include path order since we don't have a copy of obstack.h in the
current directory.
2014-07-10 14:18:13 +05:30
Andreas Schwab b60ea6fff5 Fix searching localedef input on I18NPATH (BZ #16984) 2014-05-26 12:32:57 +02:00
Allan McRae 88726d48af Update remaining copyright dates
Update copyright years that are not handled by scripts/update-copyright.
2014-01-01 22:02:55 +10:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Siddhesh Poyarekar 4712799fbb Fix build warning in locarchive.c 2013-11-20 18:19:57 +05:30
Andreas Schwab b5449b1296 Complete display of LC_MONETARY 2013-11-19 11:53:00 +01:00
Andreas Schwab a7931fcfba Properly handle unavailable elements in LC_MONETARY category 2013-11-18 12:50:09 +01:00
Carlos O'Donell 484c12fb1e Enhance localedef --list-archive option.
The localedef --list-archive option claims that it can
accept a [file] argument and list the contents of that
archive. The support was never implemented. This patch
adds that support and allows --list-archive to work as
expected. You can now use localedef to list the contents
of arbitrary locale archives by using:
./localedef --list-archive file
2013-10-18 23:44:35 -04:00
Richard Sandiford 5abe068233 Fix localedef collation handling of <U0000> (bug 15948). 2013-10-18 20:58:31 +00:00
Joseph Myers 7602d070dc Clean up locale file alignment handling. 2013-10-08 00:14:08 +00:00
Joseph Myers d3d237560b Hardcode locale archive page size as 4096. 2013-10-03 22:00:05 +00:00
Joseph Myers 975569d0d9 Remove locale file dependence on int32_t alignment. 2013-10-03 21:51:32 +00:00
Joseph Myers 6055173a0f Add localedef --big-endian and --little-endian options. 2013-09-24 22:07:47 +00:00
Richard Sandiford 08ffcf34d9 Fix some types in localedef. 2013-09-13 23:31:10 +00:00
Richard Sandiford 1ecbb381ae Make localedef output generation use more logical interfaces. 2013-09-06 17:20:45 +00:00
Ondřej Bílka f24a6d086b Fix then/than typos. 2013-08-30 18:10:31 +02:00
Richard Henderson 1d17fa5f8e Fix missing libc-internal.h include.
* locale/programs/locarchive.c: Include <libc-internal.h>
2013-06-25 11:21:20 -07:00
Mike Frysinger 17db6e8d6b [BZ #10283] localedef: align fixed maps to SHMLBA
Many Linux arches require fixed mmaps to be aligned higher than pagesize,
so use the SHMLBA define as it represents this quantity exactly.

This fixes spurious errors seen on those arches like:
cannot map archive header: Invalid argument

URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10283
Reported-by: CHIKAMA Masaki <masaki.chikama@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-06-24 20:26:58 -04:00
Ondrej Bilka 350635a59a Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
Mike Frysinger 0e60d68ef0 localedef: include file name in error messages
When mkstemp fails, the error message the user gets back is:
cannot create temporary file: No such file or directory

That isn't terribly useful in figuring out why, so include the full
filename we tried to create in the error output.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-25 14:38:38 -04: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
Roland McGrath 912cc4b3e4 BZ#14812: Add missing N_ markers in localedef. 2013-03-20 14:26:58 -07: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
Roland McGrath f1d70dad53 Remove lots of inline keywords. 2013-02-07 14:44:18 -08:00
Allan McRae fd80f0b7a1 Fix "localedef --posix" description 2013-01-03 18:00:47 +10:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
David S. Miller 0549fbba96 Update copyright years.
* catgets/gencat.c: Update copyright year.
	* csu/version.c: Likewise.
	* debug/catchsegv.sh: Likewise.
	* debug/pcprofiledump.c: Likewise.
	* debug/xtrace.sh: Likewise.
	* elf/ldconfig.c: Likewise.
	* elf/ldd.bash.in: Likewise.
	* elf/pldd.c: Likewise.
	* elf/sotruss.ksh: Likewise.
	* elf/sprof.c: Likewise.
	* iconv/iconv_prog.c: Likewise.
	* iconv/iconvconfig.c: Likewise.
	* locale/programs/locale.c: Likewise.
	* locale/programs/localedef.c: Likewise.
	* login/programs/pt_chown.c: Likewise.
	* malloc/memusage.sh: Likewise.
	* malloc/memusagestat.c: Likewise.
	* malloc/mtrace.pl: Likewise.
	* nscd/nscd.c: Likewise.
	* nss/getent.c: Likewise.
	* nss/makedb.c: Likewise.
	* posix/getconf.c: Likewise.
2013-01-01 00:11:43 -08:00
Joseph Myers 8b748aed2a Support --with-pkgversion and --with-bugurl. 2012-11-09 22:13:45 +00:00
Paul Eggert 7b6235f261 Replace FSF snail mail address with URL in gperf input. 2012-03-10 00:45:34 +00:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Marek Polacek 69db4f8f46 Remove PARAMS macros. 2012-01-31 20:02:53 +00:00
Joseph Myers c8a89e7dd5 Remove miscellaneous __STDC__ conditionals. 2012-01-30 21:20:32 +00:00
Joseph Myers 965a54a4ee Remove __STDC__ conditionals from non-installed headers. 2012-01-26 23:31:37 +00:00
Marek Polacek a0bfc9c78f Add noreturn attribute 2012-01-10 18:49:31 -05: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 81fb02b046 Update copyright year 2012-01-01 05:50:05 -05:00
Roland McGrath 110946e473 Clean up locarchive mmap reservation code. 2011-10-08 15:28:52 -07:00
Roland McGrath 5615eaf264 Quash some new warnings from GCC 4.6. 2011-06-10 22:44:20 -07:00
Ulrich Drepper 13f1ab36a4 Fix typo in last patch to locarchive.c 2011-05-29 20:26:04 -04:00