Compare commits

...
Author SHA1 Message Date
Roland McGrath b0d20a87b5 Sat Apr 20 18:13:00 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* Makerules (no-whole-archive): Test $(have-no-whole-archive), not
	$(libc_cv_ld_no_whole_archive).

Sat Apr 20 17:07:17 1996  Ulrich Drepper  <drepper@cygnus.com>

	* assert/assert.h, ctype/ctype.h, dirent/dirent.h, errno.h,
	grp/grp.h, io/fcntl.h, io/sys/stat.h, io/utime.h, locale/locale.h,
	math/math.h, misc/nlist.h, misc/sgtty.h, misc/sys/file.h,
	misc/sys/ioctl.h, misc/sys/uio.h, posix/sys/times.h,
	posix/sys/types.h, posix/sys/utsname.h, posix/sys/wait.h,
	posix/tar.h, posix/wordexp.h, pwd/pwd.h, resource/sys/vlimit.h,
	resource/sys/vtimes.h, setjmp/setjmp.h, signal/signal.h,
	stdio-common/printf.h, stdlib/alloca.h, stdlib/stdlib.h,
	string/string.h, sysdeps/generic/sigaction.h,
	sysdeps/generic/sigset.h, sysdeps/generic/sys/ptrace.h,
	sysdeps/generic/sys/ptrace.h, sysdeps/unix/bsd/osf/sigaction.h,
	sysdeps/unix/sysv/linux/sys/ptrace.h,
	sysdeps/unix/sysv/minix/sigaction.h,
	sysdeps/unix/sysv/sco3.2.4/sigaction.h,
	sysdeps/unix/sysv/sysv4/sigaction.h,
	sysdeps/unix/sysv/sysv4/sigset.h, termios/termios.h,
	time/sys/time.h, time/time.h: Fix copyright comment.

	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): If uids and gids are
	not given in stack aux vector, fetch them with syscalls.
1996-04-21 00:27:19 +00:00
Roland McGrath a641835acd Fri Apr 19 00:49:44 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* stdlib/rpmatch.c (rpmatch: try): Take new arg NOMATCH, return value
 	for nonmatching nonerror (instead of !MATCH).
	(rpmatch): Use it, so we return -1 when NOEXPR doesn't match either.

	* resolv/getnetnamadr.c (getnetbyaddr): Use u_int32_t instead of
	unsigned long for variable NET2.

	* time/etcetera, time/europe, time/solar89: Updated from ADO's 96e.

Tue Apr  9 14:37:31 1996  Ulrich Drepper  <drepper@cygnus.com>

	* catgets/Makefile, catgets/catgets.c, catgets/catgetsinfo.h,
	catgets/config.h, catgets/gencat.c, catgets/nl_types.h,
	catgets/open_catalog.c: New files.  Implementation of XPG4
	compliant catgets() function and needed tools.
	* Makefile (subdirs): Add catgets.

Thu Apr 18 23:36:11 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

	* math/Makefile (CPPFLAGS): Append -D__NO_MATH_INLINES.

Wed Apr 10 20:48:43 1996  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/vfprintf.c: Correct some typos.

	* sysdeps/libm-ieee754/w_gammaf.c, sysdeps/libm-ieee754/w_lgamma.c,
	sysdeps/libm-ieee754/w_lgammaf.c: Reference signgam instead of
	__signgam.

Thu Apr 18 21:07:27 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>

	* Makerules (no-whole-archive): New variable.
	(build-shlib): Use it.
	* elf/Makefile (libdl.so): Use it.
	* configure.in (libc_cv_ld_no_whole_archive): New check for
	--no-whole-archive.
	* config.make.in (have-no-whole-archive): New variable.

	* stdio-common/printf_fp.c: Increase fudge factor for BIGNUM_SIZE calc
	from 3 to 4.

	* Make-dist: Include version.mk.
	(version, release): Variables removed.
	* Makeconfig (version.mk): New target.

Fri Apr 19 01:42:18 1996  Ulrich Drepper  <drepper@cygnus.com>

	* locale/Makefile (headers): Add langinfo.h.
	(CPPFLAGS): Remove -Iliblib.
1996-04-20 00:05:25 +00:00
Roland McGrath f24f4dc82d Mon Apr 15 16:49:04 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* malloc/memalign.c, malloc/malloc.h [__DJGPP__ == 1]: Elide memalign
	function and its declaration.
1996-04-16 01:18:23 +00:00
Per Bothner 147e600987 * config.guess: Combine two OSF1 rules. Also recognize field test versions. From mjr@zk3.dec.com. * config.guess (dgux): Use /usr/bin/uname rather than uname, because GNU uname does not support -p. From pmr@pajato.com. 1996-04-13 00:06:54 +00:00
Miles Bader e2a501ab7c *** empty log message ***
Wed Apr 10 14:13:45 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Store
 	MACH_PORT_DEAD in the thread reply-port variable before destroying
 	the signal handler's reply port, to avoid infinite recursion.
1996-04-10 18:36:39 +00:00
Miles Bader 574ce5e4e4 (_hurdsig_longjmp_from_handler): Store MACH_PORT_DEAD in the thread reply-port variable before destroying the signal handler's reply port, to avoid infinite recursion. 1996-04-10 18:36:02 +00:00
Roland McGrath b84095feb4 Mon Apr 8 18:27:17 1996 Miles Bader <miles@gnu.ai.mit.edu>
* sysdeps/mach/gettimeofday.c (__gettimeofday): Don't fail if the
	user passes in TZ, just zero it (emacs passes in a dummy variable,
	and rms says the hurd should be the one to change).
1996-04-09 09:02:55 +00:00
Miles Bader a1a5fa67c6 (__gettimeofday): Don't fail if the user passes in TZ, just zero it (emacs passes in a dummy variable, and rms says the hurd should be the one to change). 1996-04-08 23:35:57 +00:00
Michael Meissner 2e6878f7b1 Add Solaris on PowerPC support 1996-04-08 20:19:10 +00:00
Roland McGrath 3125073e10 Sun Apr 7 10:37:30 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* sysdeps/mach/hurd/fork.c: Don't leak send rights to the child's proc
 	port in the parent.
Fri Apr  5 17:43:41 1996  Miles Bader  <miles@gnu.ai.mit.edu>
1996-04-07 17:44:31 +00:00
Roland McGrath d70576891e * sysdeps/mach/hurd/fork.c (__fork): Don't leak send-rights to the
child's proc port in the parent.
1996-04-06 10:03:22 +00:00
Miles Bader 786db2208e *** empty log message ***
Fri Apr  5 17:43:41 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/i386/sigreturn.c (__sigreturn): Store
	MACH_PORT_DEAD in the thread reply-port variable before destroying
	the signal handler's reply port to avoid infinite recursion.
	* sysdeps/mach/hurd/mig-reply.c (__mig_dealloc_reply_port): Only
	attempt to destroy PORT if it's a valid port name.
1996-04-06 01:51:07 +00:00
Miles Bader aa0e1b599c (__mig_dealloc_reply_port): Only attempt to destroy PORT if it's a valid port name. 1996-04-06 01:49:21 +00:00
Roland McGrath 2e516341fa Wed Apr 3 17:10:44 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* extra-lib.mk: Put libs in $(common-objpfx) instead of $(objpfx).
	* Makerules ($(install-lib) rules): Find libs with $(common-objpfx)
	instead of $(objpfx).
1996-04-04 01:18:10 +00:00
Roland McGrath 299a95b9f0 Tue Apr 2 21:27:01 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* posix/glob.c (glob_pattern_p): Avoid scanning past eos if
	the pattern ends with a backslash and quoting is enabled.
	* posix/fnmatch.c (fnmatch): Likewise; return FNM_NOMATCH for such
 	patterns.
1996-04-03 16:31:49 +00:00
Roland McGrath 30de3b18a5 Mon Apr 1 13:34:55 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* stdio-common/tst-printf.c (main): Add new test case.

	* sysdeps/generic/setenv.c (unsetenv): Use old-style definition.

Mon Apr  1 11:39:10  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* stdlib/strtod.c (STRTOD): Fix handling of American style FP
	numbers.

	* stdio-common/vfprintf.c (vfprintf): Don't increment format
	string pointer twice after seeing `*'.

Sun Mar 31 17:31:54 1996  Roland McGrath  <roland@whiz-bang.gnu.ai.mit.edu>

	* MakeTAGS (po/SYS_libc.pot): Prepend header processed from
 	po/header.pot.

Sun Mar 31 18:07:32 1996  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* locale/Makefile (others, install-bin): Compiling locale works
        again.
	(locale-modules): locale has no --dump option anymore.  Remove
	ctypedump.

	* locale/programs/config.h: Don't declare euidaccess.
	Use #include_next to get libc's config.h.

	* locale/programs/ctypedump.c: Not needed anymore.  Dump option
	of locale is removed.

	* locale/programs/locale.c: Adapt for new locale implementation.

	* stdio-common/_itoa.h (_itoa_word): Define as inline function.
	* stdio-common/_itoa.c (_itoa_lower_digits, _itoa_upper_digits):
	Don't declare static because used in _itoa_word inline function.

	* stdio-common/printf-parse.h: Prepare for use in wide-char
	stdio implementation.
	(find_spec): Take additional argument to work with mbrlen instead
	of mblen.
	(parse_one_spec): Ditto.

	* stdio-common/printf-prs.c: Prepare for use in wide-char
	stdio implementation.

	* stdio-common/printf.h: Mark change for wide-char handling.
	Changing it now would result in incompatibilities.

	* stdio-common/vfprintf.c: New and fast implementation.

	* wcsmbs/Makefile (routines): Remove pre-ISO C multibyte functions
	mbsadvance, mbscat, mbschr, mbscmp, mbscpy, mbsdup, mbslen,
	mbsncat, mbsncmp, mbsncpy, mbsrchr, mbstomb.
	Change wcswcs to wcsstr.
	Add wmemchr, wmemcmp, wmemcpy, wmemmove, wmemset, btowc, wctob,
	mbsinit, mbrlen, mbrtowc, wcrtomb, mbsrtowcs, wcsrtombs.

	* wcsmbs/btowc.c, wcsmbs/mbrlen.c, wcsmbs/mbrtowc.c,
        wcsmbs/mbsinit.c, wcsmbs/mbsrtowcs.c, wcsmbs/wchar.h,
        wcsmbs/wcrtomb.c, wcsmbs/wcsrtombs.c, wcsmbs/wcsstr.c,
        wcsmbs/wctob.c, wcsmbs/wmemchr.c, wcsmbs/wmemcmp.c,
        wcsmbs/wmemcpy.c, wcsmbs/wmemmove.c, wcsmbs/wmemset.c: New
        function according to ISO C amendment 1.
	* wchar.h: Wrapper around "wcsmbs/wchar.h".

	* wcsmbs/wcscat.c, wcsmbs/wcschr.c, wcsmbs/wcscmp.c,
        wcsmbs/wcscpy.c, wcsmbs/wcscspn.c, wcsmbs/wcsdup.c,
        wcsmbs/wcslen.c, wcsmbs/wcsncat.c, wcsmbs/wcsncmp.c,
        wcsmbs/wcsncpy.c, wcsmbs/wcspbrk.c, wcsmbs/wcsrchr.c,
        wcsmbs/wcsspn.c, wcsmbs/wcstok.c: Changed to conform with ISO C
        amendment 1.

	* wcsmbs/mbsadvance.c, wcsmbs/mbscat.c, wcsmbs/mbschr.c,
        wcsmbs/mbscmp.c, wcsmbs/mbscpy.c, wcsmbs/mbsdup.c,
        wcsmbs/mbslen.c, wcsmbs/mbsncat.c, wcsmbs/mbsncmp.c,
        wcsmbs/mbsncpy.c, wcsmbs/mbsrchr.c, wcsmbs/mbstomb.c,
        wcsmbs/mbstr.h, wcsmbs/wcstr.h, wcsmbs/wcswcs.c: Removed.
        Implement functions from early drafts, not part of final standard.

Sun Mar 31 16:50:41 1996  Roland McGrath  <roland@whiz-bang.gnu.ai.mit.edu>

	* setjmp/setjmp.h (jmp_buf): Change gratuitous struct tag name to
	__jmp_bug_tag so its C++ implicit typedef does not conflict with the
	__jmp_buf typedef.

	* Makerules (BUILD_CFLAGS) [! objdir]: Use $(..)config.h when
	compiling in the source directories.

Fri Mar 29 16:26:35 1996  Roland McGrath  <roland@whiz-bang.gnu.ai.mit.edu>

	* sysdeps/libm-ieee754/w_gamma.c: Use signgam instead of __signgam.
	* sysdeps/libm-ieee754/s_signgam.c: Undo last change.
1996-04-02 13:27:17 +00:00
Roland McGrath b80510574c Fri Mar 29 11:29:46 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/libm-ieee754/s_signgam.c (signgam): Renamed to __signgam,
	with weak alias signgam.
1996-03-29 21:23:58 +00:00
Roland McGrath 27e00f3f17 Thu Mar 28 18:32:34 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* Makeconfig (+cflags, +gcc-nowarn): Use gcc flags unconditionally.
1996-03-29 21:19:15 +00:00
Roland McGrath ac157523bd Thu Mar 28 18:32:34 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* Makeconfig (+cflags, +gcc-nowarn): Use gcc flags unconditionally.
1996-03-29 21:13:27 +00:00
Doug Evans 46a7c97679 (aux): Delete another duplicate entry. 1996-03-29 01:49:55 +00:00
Doug Evans 0daf278545 (aux): Delete duplicate entry. 1996-03-29 01:46:52 +00:00
Roland McGrath b7407d6362 wctype.h mention 1996-03-29 01:04:20 +00:00
Roland McGrath c475b8f594 * sunrpc/rpc_main.c (main): Call textdomain. 1996-03-28 21:00:28 +00:00
Roland McGrath 7a1c652d58 * MakeTAGS (XGETTEXTFLAGS-siglist.pot, XGETTEXTFLAGS-errlist.pot): Add
--no-location.
	(all-pot): Replace $(subdirs) files with $P/subdirs.pot.
	($P/subdirs.pot): New target.
	($P/SYS_libc.pot): Add -n switch.
1996-03-28 20:55:37 +00:00
Roland McGrath a141dd342d * locale/locale.h (LC_*): Values reordered to match Linux libc. 1996-03-28 19:34:47 +00:00
Roland McGrath 8c1442d02f Thu Mar 28 14:22:51 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/mach/hurd/kill.c: If proc_pid2task gives us MACH_PORT_NULL
	the process is a zombie; send no messages and return success.
1996-03-28 19:30:33 +00:00
Roland McGrath 43efc10333 Thu Mar 28 11:53:26 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* wctype/cname-lookup.h: Find localeinfo.h in ../locale.
	* wctype/wctype.c: Likewise.
	* wctype/wctrans.c: Likewise.
1996-03-28 17:19:40 +00:00
Roland McGrath ffcf96345f Thu Mar 28 03:00:43 1996 Roland McGrath <roland@whiz-bang.gnu.ai.mit.edu>
* locale/nl_langinfo.c (nl_langinfo): Use DATA->values instead of
	DATA->strings.

	* Makerules (BUILD_CFLAGS): Remove $(common-objpfx) from config.h.

	* configure.in (.weakext check): Fix asm code to use .weakext instead
	of .weak!  Fix bogus test calls.
	* configure: Regenerated.
1996-03-28 09:48:58 +00:00
Roland McGrath 0393dfd6c2 * locale/programs/xmalloc.c: Test _LIBC as well as STDC_HEADERS.
* locale/programs/ld-collate.c (collate_finish): Use error_at_line
	instead of error_with_loc.

	* locale/weight.h: Use u_int32_t instead of u32_t.
	* string/strxfrm.c: Likewise.

	* string/strxfrm.c: Find weight.h in ../locale; don't #include
	"localeinfo.h".
	* string/strcoll.c: Likewise.

	* locale/programs/simple-hash.c, locale/programs/simple-hash.h,
 	locale/programs/xmalloc.c, locale/programs/xstrdup.c: Helper functions
 	for locale related programs.
 	locale/programs/charmap.c, locale/programs/charset.c,
 	locale/programs/charset.h, locale/programs/config.h,
 	locale/programs/ctypedump.c, locale/programs/ld-collate.c,
 	locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
 	locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
 	locale/programs/ld-time.c, locale/programs/linereader.c,
 	locale/programs/linereader.h, locale/programs/locale.c,
 	locale/programs/localedef.c, locale/programs/locales.h,
 	locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
 	locale/programs/locfile-token.h, locale/programs/locfile.c,
 	locale/programs/locfile.h, locale/programs/stringtrans.c,
 	locale/programs/stringtrans.h: Implementation of locale related
 	programs.
1996-03-28 09:16:15 +00:00
Roland McGrath 19bc17a905 Thu Mar 28 03:25:10 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile (copysrc): Add missing > in sed cmd.

Sat Mar 23 17:52:49 1996  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* Makeconfig: Rename Makefile variable nlsdir to i18ndir and
	change value to $(datadir)/i18n.  `nls' is not an appropriate
	name.

	* Makefile (subdirs): Add new subdir wctype.

	* ctype/ctype-info.c: Add new global variable __ctype_names
	and initialize from _nl_C_LC_CTYPE.

	* ctype/ctype.h: In P1003.3b/D11 `alnum' is a separate character
        class.  Use bit 11.
	[_ISbit]: Protect definition of bitmasks because they are also
	used in wctype.h.

	* libio/genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag
	after successfully pushing back a character.

	Fundamental changes in locale implementation.  Almost nothing
	from the old code is used anymore.
	* locale/charmap.c, locale/collate.c, locale/config.h,
 	locale/ctypedump.c, locale/hash.h, locale/keyword.gperf,
 	locale/keyword.h, locale/loadlocale.c, locale/locale-ctype.c,
 	locale/locale.c locale/localeconv.c, locale/localedef.c,
 	locale/localedef.h, locale/locfile-hash.c, locale/locfile-lex.c,
 	locale/locfile-parse.c, locale/messages.c, locale/monetary.c,
 	locale/numeric.c, locale/setlocale.c, locale/token.h,
 	locale/xmalloc.c: Removed.

	* locale/Makefile: Update for new locale implementation with
	program source code distributed in subdir.

	* locale/categories.def, locale/iso-4217.def: Updated file
        for new locale implementation.

	* locale/langinfo.h: Updated for new locale implementation.
	(ERA_D_T_FMT, ERA_T_FMT): New official values according to
	P1003.2b/D11.
	(_NL_COLLATE_NRULES, _NL_COLLATE_RULES, _NL_COLLATE_HASH_SIZE,
	_NL_COLLATE_HASH_LAYERS, _NL_COLLATE_TABLE_EB,
	_NL_COLLATE_TABLE_EL, _NL_COLLATE_UNDEFINED, _NL_COLLATE_EXTRA_EB,
	_NL_COLLATE_EXTRA_EL, _NL_CTYPE_NAMES_EB, _NL_CTYPE_NAMES_EL,
	_NL_CTYPE_HASH_SIZE, _NL_CTYPE_HASH_LAYERS, _NL_CTYPE_CLASS_NAMES,
	_NL_CTYPE_MAP_NAMES, _NL_CTYPE_WIDTH): New internal values for
	extended LC_CTYPE and LC_COLLATE implementation.

	* locale/simple-hash.c, locale/simple-hash.h, locale/xmalloc.c,
 	locale/xstrdup.c: Helper functions for locale related programs.

	* locale/C-collate.c, locale/C-ctype.c,
        locale/C-messages.c, locale/C-monetary.c,
        locale/C-numeric.c, locale/C-time.c,
        locale/lc-collate.c, locale/lc-ctype.c,
        locale/lc-messages.c, locale/lc-monetary.c,
        locale/lc-numeric.c, locale/lc-time.c: New implementation of locale
        functions, and new generated "C" locale data.

	* locale/loadlocale.c: Now handles word fields in locale binary
        automatically by changing the endianess if necessary.

	* locale/localeinfo.h (LIMAGIC): Changed magic number because
	of incompatible changes.
	(locale_data): Changed definition to allow word as a value type.
	(coll_sort_rule): Values for collation sorting mode.
	(_NL_CURRENT_WORD): New macro to access word value of locale entry.
	(__collate_table, __collate_extra): Declare new global variables
	for collation tables.

	* locale/programs/charmap-kw.gperf, locale/programs/charmap-kw.h,
        locale/programs/charmap.c, locale/programs/charset.c,
        locale/programs/charset.h, locale/programs/config.h,
        locale/programs/ctypedump.c, locale/programs/ld-collate.c,
        locale/programs/ld-ctype.c, locale/programs/ld-messages.c,
        locale/programs/ld-monetary.c, locale/programs/ld-numeric.c,
        locale/programs/ld-time.c, locale/programs/linereader.c,
        locale/programs/linereader.h, locale/programs/locale.c,
        locale/programs/localedef.c, locale/programs/locales.h,
        locale/programs/locfile-kw.gperf, locale/programs/locfile-kw.h,
        locale/programs/locfile-token.h, locale/programs/locfile.c,
        locale/programs/locfile.h, locale/programs/stringtrans.c,
        locale/programs/stringtrans.h: Implementation of locale related
        programs.

	* locale/weight.h: Functions to access collation tables.

	* posix/unistd.h: Define _POSIX2_LOCALEDEF.

	* stdio-common/printf_fp.c: Fix bug with printing certain numbers
	< 10^-1.  Reported by Bill Metzenthen.

	* stdio-common/tfformat.c: Add new test for above bug.

	* string/strcoll.c, string/strxfrm.c: Real implementation of
        string collation according to ISO C.

	* wctype/Makefile, wctype/cname-lookup.h, wctype/iswctype.c,
        wctype/test_wctype.c, wctype/towctrans.c, wctype/wcfuncs.c,
        wctype/wctrans.c, wctype/wctype.c, wctype/wctype.h: New files.
        Implementation of wide character classes and mapping.
1996-03-28 08:30:38 +00:00
Roland McGrath 53f770e0f9 Wed Mar 27 14:52:11 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* elf/rtld.c (dl_main): Call _dl_sysdep_start_cleanup after
	_dl_relocate_object loop.  Avoid relocating RTLD_MAP in that loop, and
	do it individually if necessary after _dl_sysdep_start_cleanup call.

	* stdlib/Makefile (mpn-routines): Add divrem.

Tue Mar 26 22:54:14  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* stdio-common/printf_fp.c (__printf_fp): Use mpn_divmod
	instead of __mpn_divmod.

Wed Mar 27 10:26:21 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/alpha/setjmp.S: Must establish global pointer before
 	address of __sigsetjmp_aux can be loaded.

Wed Mar 27 02:23:19 1996 Ulrich Drepper <drepper@gnu.ai.mit.edu>

	* sysdeps/i386/i586/memset.S: New file.  Highly optimized
	version for i586 contributed by Torbjorn Granlund.
	Adapted for use as bzero.
	* sysdeps/i386/i586/bzero.S: Use sysdeps/i386/i586/memset.S
	code to implement bzero().

Tue Mar 26 20:01:17 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* stdlib/Makefile (mpn-routines): Remove divmod.
1996-03-27 23:23:59 +00:00
Roland McGrath 3ef987a23c Updated from /src/gmp-1.937 1996-03-27 20:18:04 +00:00
Brendan Kehoe c0621444ed * sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h (NO_UNDERSCORES): Use
wrapped with #ifndef, to avoid config.h defining it.
Tue Mar 26 15:40:14 1996  Brendan Kehoe  <brendan@zen.org>

	* sysdeps/unix/sysv/sysv4/solaris2/sparc/sysdep.h (NO_UNDERSCORES): Use
	wrapped with #ifndef, to avoid config.h defining it.
1996-03-27 00:46:37 +00:00
Roland McGrath 81e4d60c7b * malloc/realloc.c (_realloc_internal): In case of growing large
block, leave _heaplimit zero across _malloc_internal call.
1996-03-25 21:23:16 +00:00
Roland McGrath 5775972dec Mon Mar 25 13:10:04 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* intl/Makefile [gettext-srcdir]: Use gpl2lgpl.sed on copied sources.
1996-03-25 18:10:46 +00:00
Roland McGrath 857fa1b81d Mon Mar 25 03:35:16 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* malloc/malloc.c (morecore): Don't attempt recursive realloc of info
	table when _heaplimit==0 during realloc growing large block.

	* MakeTAGS (extract): Remove /dev/null from xgettext command line.
	(text-srcs): New variable: extract only C sources from $(tags_sources).
	(po/$(domain).pot): Depend on that.
	If it's empty, cp /dev/null $@ instead of $(extract).

	* misc/Makefile (headers): Add iovec.h.
	* sysdeps/unix/sysv/linux/iovec.h: New file.
	* sysdeps/generic/iovec.h: New file.
	* misc/sys/uio.h (struct iovec): Type replaced with #include <iovec.h>.

	* configure.in (NO_UNDERSCORES check): Use AC_TRY_LINK instead of
	AC_TRY_COMPILE.

	* misc/sys/cdefs.h [__USE_BSD] (const, signed, volatile): Move these
	macros inside [! __STDC__].

	* stdlib/rpmatch.c: New file.
	* stdlib/Makefile (routines): Add rpmatch.
	* stdlib/stdlib.h [__USE_SVID]: Declare rpmatch.

	* MakeTAGS (MSGJOIN): Variable removed.
	(po/SYS_libc.pot): Use $(XGETTEXT) instead of $(MSGJOIN).

Wed Mar 20 20:08:46 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysdep.h: Don't define C_SYMBOL_NAME.

	* sysdeps/unix/sysv/linux/m68k/sysdep.h: Don't define
	NO_UNDERSCORES.
1996-03-25 17:48:26 +00:00
Roland McGrath 25c931a18c Contents were duplicated by botched patching. 1996-03-25 06:26:06 +00:00
Doug Evans edc1601c51 (os): sunos[3456] -> sunos[34], sunos[56] have their own entries 1996-03-21 23:26:26 +00:00
Roland McGrath 036a272548 Thu Mar 21 11:19:15 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* mach/devstream.c (input): Translate \r to \n on input.
1996-03-21 16:23:21 +00:00
Roland McGrath ce563359af Wed Mar 20 11:28:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdio-common/printf.h, stdio-common/printf_fp.c,
	stdio-common/vfprintf.c: Place const in parameter list at
	correct place.

Wed Mar 20 23:58.12 1996  Ulrich Drepper <drepper@gnu.ai.mit.edu>

	* sysdeps/i386/ldbl2mpn.c: Copy of former version of
	sysdeps/ieee754/ldbl2mpn.c.
	* sysdeps/ieee754/ldbl2mpn.c: Remove i386 specific unification.
	Reported by Andreas Schwab.

Wed Mar 20 19:58:43 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* version.c: Include version.h to define RELEASE and VERSION macros.
	(__libc_release, __libc_version): Use them.
	* locale/SYS_libc.c (_libc_intl_domainname): Include ../version.h and
	use VERSION to define domainname as `SYS_GNU_libc-VERSION'.
	* Make-dist (rel+vers): Snarf the macro values from version.h.

	* MakeTAGS (extract): Pass $(XGETTEXTFLAGS-$(@F)).
	(XGETTEXTFLAGS-siglist.pot, XGETTEXTFLAGS-errlist.pot): New variables;
	pass -a for these files.

	* Makerules (po/%.pot): Depend on FORCE target so recursive make is
	always run.
1996-03-21 15:20:37 +00:00
Roland McGrath 38bb44bc19 Mon Mar 18 22:54:32 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/wait3.c: New file.
	* sysdeps/unix/sysv/linux/wait.c: Use the bsd4.4 wait, not the
	one from sysdeps/posix.
1996-03-21 00:37:31 +00:00
Roland McGrath d7193325fc * sysdeps/unix/bsd/waitflags.h (WNOREAP): New macro. 1996-03-20 17:01:27 +00:00
Roland McGrath 948c3e72ec Wed Mar 20 09:42:11 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* elf/dl-load.c (_dl_map_object_from_fd): Always set L->l_type; if not
	lt_executable, then lt_library.
	* elf/rtld.c (dl_main): Don't set NEW->l_type after _dl_map_object.

Wed Mar 20 00:08:23 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/syscalls.list: Remove gtty and stty.

Tue Mar 19 16:31:06 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/termbits.h (CRTSCTS, CBAUDEX, VEOL,
	VEOL2, VMIN, VTIME): Corrected.
	(PAGEOUT, WRAP, VDSUSP): Deleted.

	* sysdeps/unix/readdir.c: Test [! _DIRENT_HAVE_D_RECLEN] instead of
	(sizeof (DP->d_name) > 1) to detect fixed-size dir entries.
1996-03-20 14:50:57 +00:00
Roland McGrath 213afb94b6 Regenerated
Thu Mar 14 06:01:07 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
	calculation to include trailing invariant portion.  Don't use alloca;
	instead use a dynamic auto array for GCC, malloc for non-GCC.
	Handle nested braces properly.
1996-03-20 03:12:40 +00:00
Roland McGrath 4d58533340 * sysdeps/i386/fpu/__math.h (asinh): Call log1p instead of __log1p.
* math/math.h: Move M_* constants before __math.h include.
	[__NO_MATH_INLINES || __OPTIMIZE__]: Include __math.h only #if this.

	* misc/efgcvt_r.c (ecvt_r): Declare floor, log10, fabs as weak extern.
	If log10 is not defined (i.e. no -lm), use stupid loop instead.
1996-03-20 00:18:44 +00:00
Roland McGrath d3669add24 * features.h (__FAVOR_BSD): Define only if _BSD_SOURCE is defined
and no other _*_SOURCE macro is.
	(_GNU_SOURCE): Don't define by default.
	* libc-symbols.h (_GNU_SOURCE): Define it.
1996-03-19 21:59:41 +00:00
Roland McGrath c8cf0b14ed * configure.in (alpha*-*-linux*): Unset $gnu_ld and $elf. 1996-03-19 21:23:40 +00:00
Roland McGrath c224a18a90 * config.make.in (weak-symbols): Variable removed.
* configure.in (--with-weak-symbols): Option removed.
	(NO_UNDERSCORES, HAVE_ASM_WEAK_DIRECTIVE, HAVE_ASM_WEAKEXT_DIRECTIVE):
	New tests.
	* config.h.in (HAVE_WEAK_SYMBOLS): #undef removed.
	(NO_UNDERSCORES, HAVE_ASM_WEAK_DIRECTIVE, HAVE_ASM_WEAKEXT_DIRECTIVE):
	New #undefs.
	* libc-symbols.h: Use them instead of HAVE_WEAK_SYMBOLS.

	* inet/inet_lnaof.c: Use u_int32_t instead of u_long.
	* inet/inet_mkadr.c: Likewise.
	* inet/inet_net.c: Likewise.
	* inet/inet_netof.c: Likewise.
	* inet/rcmd.c: Likewise.
	* inet/arpa/inet.h: Likewise.
	* inet/netinet/in.h: Likewise.
	* inet/netinet/tcp.h: Likewise.
	* inet/protocols/rwhod.h: Likewise.
	* inet/protocols/talkd.h: Likewise.
	* resolv/inet_addr.c: Likewise.

	* sunrpc/rpc/xdr.h (IXDR_GET_LONG, IXDR_PUT_LONG): change casts to
 	u_int32_t (instead of u_long).
1996-03-19 21:10:11 +00:00
Roland McGrath b20e47cb14 Tue Mar 19 14:18:42 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/bsd/pause.c: Moved to sysdeps/unix/common/pause.c.

Mon Mar  4 20:17:28 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/unix/sysv/linux/adjtime.c: Use INT_MAX instead of LONG_MAX.

	* sysdeps/unix/sysv/Makefile (sysdep_routines): Don't add s_getdents.

	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Don't add mount,
	umount.

	* sysdeps/alpha/__math.h (atan, cabs): New functions.

	* sysdeps/unix/sysv/linux/alpha/sigsuspend.S: new file (syscall
 	expects set-value, not pointer to it).

Sun Feb 25 22:36:10 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/unix/sysv/linux/alpha/profil-counter.h: New file.

	* gmon/gmon.c (__bb_head): new variable.
	(write_hist, write_call_graph, write_bb_counts): new functions.
	(_mcleanup): modified to call above functions instead of directly
 	writing out gmon.out.
	* gmon/sys/gmon.h (struct __bb): New type.
	(struct gmonhdr): Type removed.
	(struct gmonparam): New member `log_hashfraction'.
	(GMONVERSION): Macro removed.

	* gmon/sys/gmon_out.h, gmon/bb_exit_func.c,
 	sysdeps/generic/bb_init_func.c, sysdeps/alpha/bb_init_func.S: new
 	files.
	* gmon/Makefile (headers): Add sys/gmon_out.h.
	(routines): Add bb_init_func, bb_exit_func.

	* gmon/mcount.c: Avoid integer division.

Wed Feb 21 23:56:41 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/alpha/setjmp.S: switched order in which sp and fp are
 	passed to match what __sigsetjmp_aux() expects.

Tue Feb 20 11:33:46 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/unix/sysv/linux/alpha/syscalls.list (select, bind,
 	connect, getpeername, getsockname, listen, recv, recvfrom,
 	recvmsg, send, sendmsg, sendto, setsockopt, shutdown, socketpair):
 	added to override same-name assembly file in the parent directory.

	* stdlib/stdlib.h: add include of sys/types.h in front of random
 	etc declarations to ensure int32_t is declared.

	* stdlib/random.c, stdlib/random_r.c: replaced "long int" by int32_t
	where 32 bit integers are required.  Also change LONG_MAX into
	0x7fffffff since the intent is to turn off the sign bit in a
	32 bit integer.

	* time/offtime.c (__offtime): Use Paul Eggert's code to deal
	with very large values for "days" (e.g., 64 bit values).

Mon Feb 19 22:22:12 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* stdlib/stdlib.h (__random, __random_r, random_r, struct
 	random_data): use int32_t instead of `long int'.

Sat Feb 17 11:29:29 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/unix/sysv/linux/alpha/ioperm.c: new file.

	* sysdeps/alpha/ffs.S: new file.

	* sysdeps/alpha/fabs.c: File removed.

	* time/tzfile.c (__tzfile_read): counter variable is i, *not*
	num_transitions!

	* time/offtime.c: make capable of dealing with very large (64 bit)
 	time_t values.  Use old algorithm until a year is reached that
	is an integer multiple of 400, then use DAYS_PER_400_YEARS to
	do the remainder in a single division.

	* sysdeps/generic/ffs.c (ffs): fix variable declarations to
	be unsigned int, not unsigned long.

	* string/test-ffs.c (main): add test case with all upper bits
	set.

	* stdlib/tst-strtol.c: add tests cases for machines where
	sizeof(long)==8.

	* stdlib/testrand.c (main): disallow rand() to return negative
 	integers.

	* stdlib/testmb.c (main): fix format to use %lx instead of %x.

	* stdlib/stdlib.h: on 64 bit machines, declare
	struct random_data, __random(),  __random_r, and random_r to
	return "int" instead of "long int".

	* stdlib/random_r.c: 64 bit machines use "int" instead of "long
 	int".  Similarly, use INT_MAX instead of LONG_MAX.

	* stdlib/random.c: on 64 bit machines, randtbl[] and __random[]
 	need to operate on "int" instead of "long int".

	* locale/locfile-hash.c (compute_hashval): make shifted constant
	a long to avoid loosing bits on 64 bit machines.

	* dirent/tst-seekdir.c (main): fix confusing comment; print
	a line to mark point where directory is rewound.

Fri Feb 16 15:01:49 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* time/strftime.c (strftime): any hour > 11 is PM (not > 12!).

Wed Feb 14 00:21:17 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/unix/sysv/linux/alpha/Makefile,
	sysdeps/unix/sysv/linux/alpha/brk.S,
	sysdeps/unix/sysv/linux/alpha/fpu_control.c,
	sysdeps/unix/sysv/linux/alpha/fpu_control.h,
	sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S,
	sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S,
	sysdeps/unix/sysv/linux/alpha/pipe.S,
	sysdeps/unix/sysv/linux/alpha/setfpucw.c,
	sysdeps/unix/sysv/linux/alpha/sigprocmask.c,
	sysdeps/unix/sysv/linux/alpha/speed.c,
	sysdeps/unix/sysv/linux/alpha/start.S,
	sysdeps/unix/sysv/linux/alpha/syscall.S,
	sysdeps/unix/sysv/linux/alpha/syscalls.list,
	sysdeps/unix/sysv/linux/alpha/alpha/regdef.h,
	sysdeps/unix/sysv/linux/alpha/sysdep.S,
	sysdeps/unix/sysv/linux/alpha/sysdep.h: New files.

	* sysdeps/alpha/setjmp_aux.c (__sigsetjmp_aux): restore return
 	address register before returning (gcc 2.7.1 doesn't do it,
 	presumably because $26 is declared as a global variable).

	* sysdeps/unix/sysv/linux/sys/mman.h: msync was missing "flags"
	argument.

	* sysdeps/unix/alarm.c (alarm): do roundup using test & increment
	instead of multiplication.

	* sysdeps/posix/sleep.c (sleep): initialize sa_mask to mask of
	currently blocked signals instead of the empty mask to ensure
	that execution of alarm handler occurs with none of the currently
	blocked signals enabled.

	* sysdeps/unix/alpha/sysdep.h: new file (adapted from OSF/1 version).

	* sysdeps/unix/bsd/osf/alpha/sysdep.h: include
 	sysdeps/unix/alpha/sysdep.h and removed definitions now in that file.

	* sysdeps/alpha/divrem.S, sysdeps/alpha/htonl.S,
	sysdeps/alpha/htons.S, sysdeps/alpha/machine-gmon.h,
	sysdeps/alpha/_mcount.S, sysdeps/alpha/ntohl.s, sysdeps/alpha/ntohs.s,
	sysdeps/alpha/strlen.S: New files.

	* sysdeps/alpha/divl.S, sysdeps/alpha/divlu.S, sysdeps/alpha/divq.S,
	sysdeps/alpha/divqu.S, sysdeps/alpha/divrem.m4,
	sysdeps/alpha/macros.m4, sysdeps/alpha/reml.S, sysdeps/alpha/remlu.S,
	sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S, sysdeps/alpha/strlen.c:
 	Removed.

	* sysdeps/generic/sbrk.c (__sbrk): argument is of type ptrdiff_t, not
	int.

	* sysdeps/alpha/__longjmp.c (__longjmp): moved dummy while loop
	to end of function to avoid a jump across NOPs.

	* sysdeps/alpha/Makefile (sysdep_routines): Removed all rules
 	pertaining to integer division/remainder routines since new code
 	doesn't require them.

	* sunrpc/xdr_mem.c, sunrpc/xdr_stdio.c: Use 4 instead of sizeof(long)
	where 32 bit quantities are consumed/stored.  Various other minor
	64-bit cleanups (casting).

	* sunrpc/xdr.c (xdr_int): test for sizeof(int)==4 to determine
 	whether xdr_long or xdr_short should be used to encode an int.
  	Notice that an xdr_long is 4 bytes independent of the architecture
	(otherwise no Alpha could interoperate with existing NFS servers,
 	for example).  Ditto for enums.

	* sunrpc/svc_udp.c (svcudp_recv): changed test from 4*sizeof(u_long)
	to 16 since it really wants 16 bytes.

	* sunrpc/svc.c (maskp): changed from u_long* to u_int32*.

	* sunrpc/rpc_cmsg.c (xdr_callmsg), sunrpc/svc_authux.c: increment
	"buf" pointer by casting it to a char* first since a long* may be 8
 	bytes or more and oa->oa_length may be any multiple of 4.

	* sunrpc/rpc/xdr.h (IXDR_GET_LONG, IXDR_PUT_LONG): change casts to
 	u_int32_t (instead of u_long).

	* sunrpc/clnt_udp.c (clntudp_call): replaced sizeof(u_long) by 4
	since it really is testing for 32 bits.  Fixed casts to use
	u_int32 instead of u_long.
	* sunrpc/xdr_rec.c: Likewise.

	* sunrpc/clnt_tcp.c (clnttcp_call): replaced u_long by u_int32.
	* sunrpc/rpc/auth.h: Likewise.

	* limits.h (LONG_MAX, LONG_MIN, ULONG_MAX): use 64 bit values
	for Alpha.

Tue Mar 19 13:27:49 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* sysdeps/i386/fpu/__math.h: New file.
	Contributed by John C. Bowman <bowman@hagar.ph.utexas.edu>.

Sun Mar 17 00:28:16 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/posix/clock.c: Don't multiply the return value by
	CLOCKS_PER_SEC or CLK_TCK.

	* sysdeps/mach/hurd/getcwd.c: Fail with ENOENT if a parent directory
	scan finds no match.

	* posix/unistd.h (setpgrp): Declare no-arg version unless __FAVOR_BSD.
	* misc/bsd-compat.c (setpgrp): New function, two arg version.
	* sysdeps/stub/setpgid.c: Remove setpgrp alias.
	* sysdeps/mach/hurd/setpgid.c: Likewise.
	* sysdeps/unix/sysv/sysv4/setpgid.c: Likewise.
	* sysdeps/unix/common/syscalls.list (setpgid): Remove setpgrp alias.
	* sysdeps/unix/sysv/irix4/syscalls.list: Likewise.
	* sysdeps/unix/sysv/linux/setpgrp.c: Obsolete file removed.
	* posix/setpgrp.c (setpgrp): New file.
	* posix/Makefile (routines): Add setpgrp.

Tue Feb  6 12:46:29 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* libc-symbols.h (weak_alias, weak_symbol): added definitions
	for ECOFF (HAVE_ECOFF).
1996-03-19 20:21:54 +00:00
Roland McGrath e384537164 Mon Mar 18 13:20:46 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* elf/Makefile (rtld-link): New canned sequence.
	(ld.so, ld-linux.so.1): Use it.  Pass -soname option.

	* sysdeps/i386/setjmp.S (__setjmp): Define compatibility entry point.

Sun Mar 17 23:15:32 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/tcgetpgrp.c,
	sysdeps/unix/sysv/linux/tcsetpgrp.c: New files.
1996-03-18 18:32:47 +00:00
Roland McGrath 9b431e31e1 Sun Mar 17 07:19:33 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* db/Makefile (CFLAGS-hash_func.c): New variable; pass -Wno-unused.
	(CFLAGS): Append -Wno-unitialized.

	* sysdeps/alpha/memchr.S: New file.
	* sysdeps/alpha/memchr.c: Obsolete file removed.
	* string/tester.c: Soup up memchr tests.
1996-03-17 12:36:52 +00:00
Roland McGrath 5aab07eb56 Sat Mar 16 20:58:43 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* stdlib/erand48_r.c: Use FP division by powers of two to distribute
	short bits into double.
1996-03-17 02:00:05 +00:00
Roland McGrath 6025c399e9 Sat Mar 16 20:08:22 1996 David Mosberger-Tang <davidm@azstarnet.com>
* sysdeps/alpha/memchr.S: new file.
	* sysdeps/alpha/memchr.c: obsolete file removed.

Sat Mar 16 16:26:09 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* misc/Makefile (headers): Add sysexits.h.
	* misc/sysexits.h: New file.

Thu Mar 14 15:20:45 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/libm-ieee754/e_atan2.c (__ieee754_atan2): Change atan
	call to __atan.
	* sysdeps/libm-ieee754/e_atan2f.c (__ieee754_atan2f): Change atanf
 	call to __atanf.

	* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_acosf.c,
	sysdeps/m68k/fpu/e_asin.c, sysdeps/m68k/fpu/e_asinf.c,
	sysdeps/m68k/fpu/e_atanh.c, sysdeps/m68k/fpu/e_atanhf.c,
	sysdeps/m68k/fpu/e_cosh.c, sysdeps/m68k/fpu/e_coshf.c,
	sysdeps/m68k/fpu/e_exp.c, sysdeps/m68k/fpu/e_expf.c,
	sysdeps/m68k/fpu/e_fmod.c, sysdeps/m68k/fpu/e_fmodf.c,
	sysdeps/m68k/fpu/e_log.c, sysdeps/m68k/fpu/e_log10.c,
	sysdeps/m68k/fpu/e_log10f.c, sysdeps/m68k/fpu/e_logf.c,
	sysdeps/m68k/fpu/e_pow.c, sysdeps/m68k/fpu/e_powf.c,
	sysdeps/m68k/fpu/e_remainder.c, sysdeps/m68k/fpu/e_remainderf.c,
	sysdeps/m68k/fpu/e_scalb.c, sysdeps/m68k/fpu/e_scalbf.c,
	sysdeps/m68k/fpu/e_sinh.c, sysdeps/m68k/fpu/e_sinhf.c,
	sysdeps/m68k/fpu/e_sqrt.c, sysdeps/m68k/fpu/e_sqrtf.c,
	sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_cosf.c,
	sysdeps/m68k/fpu/k_sin.c, sysdeps/m68k/fpu/k_sinf.c,
	sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/k_tanf.c,
	sysdeps/m68k/fpu/s_atan.c, sysdeps/m68k/fpu/s_atanf.c,
	sysdeps/m68k/fpu/s_ceil.c, sysdeps/m68k/fpu/s_ceilf.c,
	sysdeps/m68k/fpu/s_cos.c, sysdeps/m68k/fpu/s_cosf.c,
	sysdeps/m68k/fpu/s_expm1.c, sysdeps/m68k/fpu/s_expm1f.c,
	sysdeps/m68k/fpu/s_fabs.c, sysdeps/m68k/fpu/s_fabsf.c,
	sysdeps/m68k/fpu/s_finite.c, sysdeps/m68k/fpu/s_finitef.c,
	sysdeps/m68k/fpu/s_floor.c, sysdeps/m68k/fpu/s_floorf.c,
	sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_frexpf.c,
	sysdeps/m68k/fpu/s_ilogb.c, sysdeps/m68k/fpu/s_ilogbf.c,
	sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_isinff.c,
	sysdeps/m68k/fpu/s_isnan.c, sysdeps/m68k/fpu/s_isnanf.c,
	sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
	sysdeps/m68k/fpu/s_log1p.c, sysdeps/m68k/fpu/s_log1pf.c,
	sysdeps/m68k/fpu/s_logb.c, sysdeps/m68k/fpu/s_logbf.c,
	sysdeps/m68k/fpu/s_modf.c, sysdeps/m68k/fpu/s_modff.c,
	sysdeps/m68k/fpu/s_rint.c, sysdeps/m68k/fpu/s_rintf.c,
	sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
	sysdeps/m68k/fpu/s_significand.c,
	sysdeps/m68k/fpu/s_significandf.c, sysdeps/m68k/fpu/s_sin.c,
	sysdeps/m68k/fpu/s_sinf.c, sysdeps/m68k/fpu/s_tan.c,
	sysdeps/m68k/fpu/s_tanf.c, sysdeps/m68k/fpu/s_tanh.c,
	sysdeps/m68k/fpu/s_tanhf.c: New files, for m68881 port of fdlibm.

	* sysdeps/m68k/fpu/__math.h: Rewritten for fdlibm.

	* sysdeps/m68k/fpu/isinfl.c: Rewritten to get argument type right.
	* sysdeps/m68k/fpu/isnanl.c: Likewise.

Thu Mar 14 06:01:07 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* posix/glob.c (glob): In GLOB_BRACE brace expansion, fix buffer size
	calculation to include trailing invariant portion.  Don't use alloca;
	instead use a dynamic auto array for GCC, malloc for non-GCC.
	Handle nested braces properly.

	* elf/elf.h (Elf32_auxv_t): Specify prototype (void) for `a_un.a_fcn'.

	* libc-symbols.h (lint): New macro.

Fri Mar 15 01:18:00 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-17 01:58:17 +00:00
Roland McGrath d3b7d2ac93 Fri Mar 15 01:18:00 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* libio/iosetvbuf.c: Add weak alias setvbuf.
1996-03-16 21:08:20 +00:00
Ian e5ba41ce24 Recognize mips-*-sysv* 1996-03-15 00:14:04 +00:00
Roland McGrath 8d71c7b0e4 Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* string/strnlen.c: New file.
	* string/Makefile (routines): Add strnlen.
	* string/string.h [__USE_GNU] (strnlen): Declare new function.
	[__OPTIMIZE__]: Define extern inline implementation of it.
1996-03-14 11:20:23 +00:00
Roland McGrath 52e9a9d118 Thu Mar 14 06:01:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* string/strnlen.c: New file.
	* string/Makefile (routines): Add strnlen.
	* string/string.h [__USE_GNU] (strnlen): Declare new function.
	[__OPTIMIZE__]: Define extern inline implementation of it.

	* stdlib/erand48_r.c: Use __mpn_construct_double instead of ldexp and
	addition, to avoid using anything from -lm.

Mon Mar  4 21:57:14 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/m68k/Makefile: New file.

	* sysdeps/unix/sysv/linux/m68k/sysdep.h (SYS_ify): Redefine.
	(CALL_MCOUNT): New macro, empty unless [PROF].
	(ENTRY): Do CALL_MCOUNT just after the label.
	(JUMPTARGET): New macro.
	(SYSCALL_ERROR_HANDLER): Fix syntax.

Thu Mar 14 04:20:48 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* sysdeps/unix/sysv/linux/init-first.c (init): Call `__personality'
	function instead of using inline asm i386 syscall.
	* sysdeps/unix/sysv/linux/syscalls.list: Add personality syscall.

	* posix/unistd.h [__USE_BSD]: Declare usleep.

	* misc/efgcvt.c (MAXDIG): New macro computed from <floats.h> constants.
	(fcvt, ecvt): Use it for buffer size.

	* stdlib/drand48-iter.c (__drand48_iterate): Use u_int64_t instead of
	conditionalizing long vs long long.

	* stdlib/drand48-iter.c (__drand48_iterate): Don't check for null
	pointers; never return EFAULT.
	* stdlib/drand48_r.c (drand48_r): Likewise.
	* stdlib/erand48_r.c (erand48_r): Likewise.
1996-03-14 11:20:03 +00:00
Roland McGrath 6c46dada59 Tue Mar 12 04:57:57 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* setjmp/Makefile (tests): Add jmpbug.
	* setjmp/jmpbug.c: New file.
1996-03-12 10:01:41 +00:00
Roland McGrath 1177c8babf Tue Mar 12 04:42:01 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/sparc/jmp_buf.h: Rewritten; use array of ints, not struct.
	* sysdeps/sparc/setjmp.S: Rewritten; store %fp value as well.
	* sysdeps/sparc/__longjmp.S: Rewritten; unwind frames one by one with
	`restore' until the target frame is hit.

Sun Mar 10 20:29:40 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/sigsuspend.c: New file.
	* sysdeps/unix/sysv/linux/syscalls.list: Remove sigsuspend, add
	s_sigsuspend.

Thu Mar  7 21:30:58 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makerules (+make-deps, sed-remove-objpfx): Quote periods on the
	left side of sed substitutions.

Sun Mar 10 16:58:10 1996  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* stdio-common/printf_fp.c (hack_digit): __mpn_normal_size
	is not available anymore.  Do it ourselves.

	* sysdeps/unix/sysv/linux/i386/fpu_control.h (_FPU_SETCW):
	Correct GCC `asm' syntax.

	* stdio-common/Makefile (tests): Add tst-ungetc.
	* stdio-common/tst-ungetc.c: New test from drepper.
	* stdio-common/tstscanf.c (main): New %[ test case from drepper.

	* sysdeps/libm-ieee754/s_scalbn.c (scalbn): Rename to __scalbn;
	somehow this was missed, though the weak alias is already there.
1996-03-12 09:50:46 +00:00
Roland McGrath dd0e4e0c8b Tue Mar 12 03:15:02 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/i386/fpu_control.h (_FPU_DEFAULT): Change
	default to double precision, all interrupts masked; fdlibm requires.
1996-03-12 08:19:58 +00:00
Roland McGrath d25d5f6a50 Sat Mar 9 18:44:27 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/i386/setfpucw.c: Obsolete file removed.

Fri Mar  8 22:16:48 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* stdio-common/printf_fp.c (HAVE_ALLOCA): New macro.
1996-03-09 23:50:19 +00:00
Roland McGrath 3f92886a4c Fri Mar 8 22:16:48 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* stdio-common/printf_fp.c (HAVE_ALLOCA): New macro.
1996-03-09 03:16:59 +00:00
Miles Bader 45667a533a *** empty log message ***
Tue Mar  5 18:45:14 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/select.c (__select): Include LASTFD in the
	final loop.
1996-03-05 23:48:15 +00:00
Miles Bader 5ac0712ca5 (__select): Include LASTFD in the final loop. 1996-03-05 23:46:23 +00:00
Richard Kenner b49d86bd21 Add -apple and -aux. 1996-03-05 23:34:58 +00:00
Roland McGrath f7eac6eb50 Mon Mar 4 20:54:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makeconfig ($(common-objpfx)config.make): Depend on config.h.in.


Mon Mar  4 17:35:09 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* hurd/catch-signal.c (hurd_safe_memmove): New function.
	(hurd_safe_copyin, hurd_safe_copyout): New functions.
	* hurd/hurd/sigpreempt.h: Declare them.

Sun Mar  3 08:43:44 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	Replace math code with fdlibm from Sun as modified for netbsd by
	JT Conklin and Ian Taylor, including x86 FPU support.
	* sysdeps/libm-ieee754, sysdeps/libm-i387: New directories.
	* math/math_private.h: New file.
	* sysdeps/i386/fpu/Implies: New file.
	* sysdeps/ieee754/Implies: New file.
	* math/machine/asm.h, math/machine/endian.h: New files.
	* math/Makefile, math/math.h: Rewritten.
	* mathcalls.h, math/mathcalls.h: New file, broken out of math.h.
	* math/finite.c: File removed.
	* sysdeps/generic/Makefile [$(subdir)=math]: Frobnication removed.

	* math/test-math.c: Include errno.h and string.h.

	* sysdeps/unix/bsd/dirstream.h: File removed.
	* sysdeps/unix/bsd/readdir.c: File removed.
1996-03-05 21:41:30 +00:00
Roland McGrath 1521668f2a Sun Mar 3 08:43:44 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* math/test-math.c: Include errno.h and string.h.
1996-03-05 19:06:19 +00:00
Miles Bader 5d8a006d2c A bug fix for the previous select bug fix.
Tue Mar  5 12:14:57 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/select.c (__select): Also don't fault just
	because some fdmask is 0.
1996-03-05 17:35:49 +00:00
Miles Bader 3cf11a4b33 (__select): Don't fault when some fdmask is 0. 1996-03-05 17:15:44 +00:00
Roland McGrath d43e047895 Mon Mar 4 20:54:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makeconfig ($(common-objpfx)config.make): Depend on config.h.in.
1996-03-05 16:23:22 +00:00
Erik Sandberg 9a0d30bdb1 (moss): Fix previous change. 1996-03-05 03:02:45 +00:00
Miles Bader e9ef1cf37a (__select): Don't increment GOT only because READ/WRITE/EXCEPTFDS is 0! Don't return without frobbing the bitmasks after a timeout. When clearing the bitmasks, only loop from FIRSTFD to LASTFD. 1996-03-05 00:07:01 +00:00
Richard Kenner bba51ac77a Accept -moss* as op sys. 1996-03-04 23:03:15 +00:00
Miles Bader e49639955f Hurd select fixes.
Mon Mar  4 17:35:35 1996  Miles Bader  <miles@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/select.c (__select):
	Don't increment GOT only because READ/WRITE/EXCEPTFDS is 0!
	Don't return without frobbing the bitmasks after a timeout.
	When clearing the bitmasks, only loop from FIRSTFD to LASTFD.
1996-03-04 22:56:09 +00:00
Roland McGrath c3d3967cd2 Mon Mar 4 17:35:09 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* hurd/catch-signal.c (hurd_safe_memmove): New function.
	(hurd_safe_copyin, hurd_safe_copyout): New functions.
	* hurd/hurd/sigpreempt.h: Declare them.
1996-03-04 22:45:04 +00:00
Roland McGrath 661fa17673 Sat Mar 2 16:35:40 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/m68k/profil-counter.h: File removed.
	* sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: File
	removed.
	* sysdeps/generic/profil-counter.h: New file.
1996-03-02 21:38:05 +00:00
Roland McGrath 36ff88f69e Sat Mar 2 16:35:40 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/m68k/profil-counter.h: File removed.
	* sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: File
	removed.
	* sysdeps/generic/profil-counter.h: New file.
1996-03-02 21:37:50 +00:00
Brendan Kehoe 48a65a2993 * sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h: New file,
including <sysdeps/unix/bsd/sun/sparc/sigcontext.h>. 
* sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: New file, 
same as linux/m68k/profil-counter.h except the comment.
Fri Mar  1 17:11:59 1996  Brendan Kehoe  <brendan@zen.org>

	* sysdeps/unix/sysv/sysv4/solaris2/sparc/sigcontext.h: New file,
	including <sysdeps/unix/bsd/sun/sparc/sigcontext.h>.
	* sysdeps/unix/sysv/sysv4/solaris2/sparc/profil-counter.h: New file,
	same as linux/m68k/profil-counter.h except the comment.
1996-03-02 01:34:50 +00:00
Roland McGrath 6b628d3634 * stdlib/Makefile (mpn-stuff): New target.
(copy-mpn): Use it.

	* Code copied from GMP updated to 1.937 version.
	* stdlib/strtod.c (HAVE_ALLOCA): Define this for gmp headers.
1996-03-01 18:45:35 +00:00
Roland McGrath bc47d7a85b Regenerated
Fri Mar  1 10:09:46 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* posix/glob.c: Use canonical code from autoconf manual for dirent
 	include.
	[_D_NAMLEN]: Redefine NAMLEN using this.
	(glob_in_dir): Use NAMLEN macro.
1996-03-01 17:42:49 +00:00
Roland McGrath e9607dbeb9 Fri Mar 1 10:09:46 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* posix/glob.c: Use canonical code from autoconf manual for dirent
 	include.
	[_D_NAMLEN]: Redefine NAMLEN using this.
	(glob_in_dir): Use NAMLEN macro.

	* sysdeps/posix/profil.c: New file.

Thu Feb 29 20:55:57 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/m68k/profil-counter.h: New file.

	* libc-symbols.h [GCC >= 2.8] (strong_alias, weak_alias): Remove
	`extern' keyword.

	* time/zic.c, time/zdump.c, time/private.h: Updated from ADO 96e.
1996-03-01 17:40:28 +00:00
Roland McGrath 4a9af5c708 Regenerated
Fri Jan 19 13:28:59 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* posix/glob.c (glob): Use prototype in getlogin decl.

Thu Jan 18 00:32:43 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* posix/glob.c (_GNU_SOURCE): Define if undefined, so glob.h
	defines GNU extensions.
	* posix/fnmatch.c: Likewise.

Fri Jan 12 13:40:01 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* posix/glob.c (glob): Add parens in glob call flags arg for
	GLOB_BRACE case.
1996-03-01 17:07:03 +00:00
Roland McGrath 01fec49ca6 Recognize cpu-vendor [ctj]90-cray, default c90-cray-unicos. From tege. 1996-03-01 14:57:49 +00:00
Miles Bader d1c57d0c40 Updated from ../gpl2lgpl.sed /home/gd/gnu/lib/getopt.c 1996-02-29 01:05:13 +00:00
Roland McGrath b7459e56bd Tue Feb 27 12:14:59 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* time/strftime.c: Support - and _ flags to affect number padding.

	* sysdeps/unix/common/tcsendbrk.c: New file.
1996-02-27 19:19:12 +00:00
Roland McGrath 92777700d2 Mon Feb 26 10:22:30 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/dirstream.h: Rewritten.
	* sysdeps/unix/readdir.c: Rewritten.
	* sysdeps/unix/telldir.c: Rewritten.
	* sysdeps/unix/closedir.c: Use <...> instead of "..." for dirstream.h.
	Remove __ from DIR struct member names.
	* sysdeps/unix/dirfd.c: Likewise.
	* sysdeps/unix/seekdir.c: Likewise.
	* sysdeps/unix/rewinddir.c: Likewise.
	* sysdeps/unix/opendir.c: Likewise.  Don't allocate extra space after
	DIR structure.
	* sysdeps/stub/direct.h: File removed.
	* sysdeps/unix/bsd/bsd4.4/direct.h: File removed.
	* sysdeps/unix/bsd/direct.h: File removed.
	* sysdeps/unix/common/direct.h: File removed.
	* sysdeps/unix/sysv/irix4/direct.h: File removed.
	* sysdeps/unix/sysv/isc3/direct.h: File removed.
	* sysdeps/unix/sysv/sco3.2.4/direct.h: File removed.
	* sysdeps/unix/sysv/sysv4/solaris2/direct.h: File removed.
	* sysdeps/unix/common/direntry.h: New file.
	* sysdeps/unix/bsd/direntry.h: New file.
	* sysdeps/unix/bsd/bsd4.4/direntry.h: New file.
	* sysdeps/unix/sysv/direntry.h: New file.
	* sysdeps/stub/direntry.h: New file.
	* dirent/dirent.h (struct dirent): Type removed.  Include <direntry.h>
	to define it.
	(_D_EXACT_NAMLEN, _D_ALLOC_NAMLEN): New macros.
	* dirent/Makefile (headers): Add direntry.h.
	(distribute): Remove direct.h.
	* sysdeps/posix/getcwd.c: Use new macros instead of d_namlen.
	* dirent/scandir.c: Likewise.
	* io/fts.c (fts_build): Likewise.
	* io/ftw.c (ftw_dir): Likewise.
	* sysdeps/posix/ttyname.c: Likewise.

	* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: New file.

	* sysdeps/mach/hurd/profil.c (MAX_PC_SAMPLES): New macro.
	(collector_timeout): New static variable.
	(update_waiter): Actually call __task_enable_pc_sampling.
	Set collector_timeout based on the `tick' count returned.
	(profile_waiter): Use MAX_PC_SAMPLES.  Set nsamples before RPC.
	Use collector_timeout in __mach_msg call.

	* gmon/Makefile (noprof): New variable containing mcount.
	Append profil unless it is in $(unix-syscalls).
	(mcount.po): Use $(noprof) for list of targets in this rule.

	* libc-symbols.h: Define _LIBC before #include <config.h>.

Sun Feb 25 12:29:23 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* config.h.in [_LIBC] (HAVE_STRERROR): Define it.
	Protect 2nd page of #undef's for generator programs with #ifndef _LIBC.

	* time/zic.c, time/zdump.c, time/private.h: Updated from ADO's latest.

Fri Feb  9 12:40:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

 	* libio/cleanup.c (_IO_cleanup_registration_needed)
	[!_G_HAVE_ATEXIT]: Init to NULL.
	* libio/filedoalloc.c (_IO_cleanup_registration_needed): Remove decl.

Thu Feb  8 08:12:50 1996  Brendan Kehoe  <brendan@cygnus.com>

	* libio/filedoalloc.c (_IO_cleanup_registration_needed): Revert
	previous change, since cleanup.c only defines it if _G_HAVE_ATEXIT.

Wed Feb  7 15:10:17 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>

	* libio/filedoalloc.c (_IO_cleanup_registration_needed): Declare as
	extern.

Sat Feb 24 11:34:13 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* sysdeps/i386/memcmp.S: Fix argument %esp offsets.

	* time/sys/time.h (timeradd, timersub): New macros; BSD has these.
1996-02-27 00:55:03 +00:00
Roland McGrath a182affdd9 Wed Feb 21 02:25:07 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* Rules (others): Depend on $(extra-objs), $(install-lib),
	$(install-bin), $(install-sbin), in object directory.

	* Makeconfig (link-libc): Don't pass -rpath option with default
	path, since ld.so should use the same default.
	* Makerules (build-shlib): Likewise.

	* Makerules (make-target-directory): Use mkinstalldirs.

	* sysdeps/mach/i386/sysdep.h: Include unix/i386/sysdep.h to
	redefine ENTRY et al.

	* sysdeps/unix/sysv/linux/i386/sysdep.h (NO_UNDERSCORES, ENTRY):
	Macros removed.  The code in unix/i386/sysdep.h should now suffice.

	* sysdeps/unix/i386/sysdep.h (ALIGNARG): New macro, defns for
	[HAVE_ELF] and not.
	(ENTRY): Use it in .align directive.
	(CALL_MCOUNT): New macro, empty unless [PROF].
	(ENTRY): Do CALL_MCOUNT just after the label.

	* Makeconfig (CPPFLAGS-.po): New variable, use -DPROF so assembly
	code can call mcount.

Tue Feb 20 23:05:16 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* time/private.h, time/zdump.c, time/zic.c: Updated verbatim from ADO;
	translation markings are now integrated in his distribution.

	* stdlib/strtod.c (round_and_return): Add missing (mp_limb) 1 cast.

	* po: New directory where `LANG.po' files for message translations
	will reside.
	* po/SYS_libc.pot: New file, template of message strings as in source.
	* MakeTAGS: New rules to build po/SYS_libc.pot automatically from
	the source using xgettext.
	* Makerules ($(..)po/%.pot): New rule.
	* manual/Makefile (../po/manual.pot): New target, make it empty.

	* sysdeps/unix/bsd/alarm.c: Moved to sysdeps/unix/alarm.c.
	* sysdeps/unix/bsd/nice.c: Moved to sysdeps/unix/nice.c.
	* sysdeps/unix/bsd/stime.c: Moved to sysdeps/unix/stime.c.
	* sysdeps/unix/bsd/time.c: Moved to sysdeps/unix/time.c.
	* sysdeps/unix/bsd/utime.c: Moved to sysdeps/unix/utime.c.
1996-02-22 15:52:20 +00:00
Roland McGrath f2e235b9b8 Mon Feb 19 18:31:59 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* time/zic.c, time/scheck.c, time/private.h, time/tzfile.h:
	Updated from ADO 96d.
1996-02-19 23:34:46 +00:00
Roland McGrath 0ddc0d1604 Sun Feb 18 14:08:04 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* csu/initfini.c (_init): Remove bogus volatile declarations and
	extra variable, take the address of __gmon_start__ only implicitly
	to avoid the test being optimized out.
1996-02-19 23:25:15 +00:00
Roland McGrath bfc04a9ff1 Sun Feb 18 15:08:10 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/posix/utimes.c (__utimes): There are 1000000 usecs in a
	sec.

Sun Feb 18 13:56:00 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/Makefile, time/Makefile: Make `all' the default target.

Mon Feb 19 18:09:04 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* misc/sys/ptrace.h: Moved to ...
	* sysdeps/generic/sys/ptrace.h: ... here.
	* sys/ptrace.h: File removed.

Sun Feb 18 12:13:07 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/Makefile (headers): Add fpu_control.h.

	* sysdeps/unix/sysv/linux/i386/sysdep.S (errno): Put it into .bss
 	so that the symbol alias works.

	* sysdeps/unix/sysv/linux/m68k/fpu_control.h (_FPU_SETCW): Corrected.

	* sysdeps/unix/sysv/linux/resourcebits.h: New file.

	* sysdeps/unix/sysv/linux/sys/ptrace.h: New file.

	* sysdeps/unix/sysv/linux/syscalls.list: Add getegid, geteuid,
	getppid and reboot.

	* sysdeps/unix/sysv/linux/sysconf.c: Special version that does not
	use getdtablesize.

Sat Feb 17 10:30:21 1996  David Mosberger-Tang  <davidm@AZStarNet.com>

	* stdio-common/printf_fp.c, stdlib/strtod.c, sysdeps/ieee754/dbl2mpn.c,
	sysdeps/ieee754/ldbl2mpn.c, sysdeps/ieee754/mpn2dbl.c,
	sysdeps/ieee754/mpn2ldbl.c: Cast left operands of shift instructions
	to `long' where necessary.

Thu Feb 15 20:04:50 1996  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* stdlib/fpioconst.h: Introduce new constant _FPIO_CONST_OFFSET.
	* stdio-common/printf_fp.c, stdlib/strtod.c: Use _FPIO_CONST_OFFSET
	to correctly access MPN array depending on architecture.
1996-02-19 23:14:44 +00:00
Roland McGrath be10a86854 *** empty log message ***
Mon Feb 19 15:30:26 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* stdio-common/tstscanf.c (main): Add check for "0" as %d.

	* sysdeps/stub/msync.c: Undo change of Jan 29; just two args.
	Only some systems have three args; let them define their own stub.

	* sysdeps/generic/dl-sysdep.c: Declare _dl_secure.

	* sysdeps/generic/machine-gmon.h: New file.
	* gmon/Makefile (distribute): Add machine-gmon.h.
	* gmon/mcount.c: Undo changes of Feb 13.
	Include "machine-gmon.h".

Sun Feb 18 13:24:06 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* sysdeps/unix/sysv/linux/direct.h: File removed, since it is
	identical to unix/common/direct.h.

	* sysdeps/unix/Makefile [no_deps]: Don't include s-proto.d.

	* sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Don't add ipc.

	* stdio-common/Makefile (tests): Remove scanf6.

	* sysdeps/unix/sysv/linux/Makefile (non-lib.a): Append libieee.a.

	* time/mktime.c (mktime): Move static variable localtime_offset to
	file scope.

	* stdio-common/vfscanf.c: Put '0' in buffer before scanning for %i
	base indicator.

Thu Feb 15 16:56:17 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/dl-machine.h (elf_machine_load_address): Corrected.
	(ELF_MACHINE_BEFORE_RTLD_RELOC): Define.
	(_dl_runtime_resolve): Save %a1 as well.
	(ELF_MACHINE_RUNTIME_FIXUP_ARGS): Add second dummy arg.
	(elf_machine_relplt): Define.

	* elf/dl-runtime.c: Include possible extra args in declaration of
 	fixup.
1996-02-19 20:54:38 +00:00
Roland McGrath 1cbca0d93c Fri Feb 16 11:01:59 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* time/tzset.c: Limit hours to 23, not 12.  From jaffer.
1996-02-16 16:15:45 +00:00
Roland McGrath 7c97bb094e Fri Feb 16 10:14:05 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* Makeconfig (CFLAGS-.po): Use -pg instead of -p.
1996-02-16 15:14:24 +00:00
Roland McGrath 9b19f55dc8 Thu Feb 15 11:49:45 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/sysv4/Makefile [$(subdir)-signal]
	(sysdep_routines): Don't add sys-sig.

	* sysdeps/unix/sysv/sysv4/solaris2/syscalls.list: New file.
1996-02-16 14:47:21 +00:00
Roland McGrath 9e3db9cd59 Thu Feb 15 13:57:08 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* mach/Machrules: Use -include for $(*.ir).

	* hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS): Mask off type bits in
	request values.
	* sysdeps/mach/hurd/ioctls.h (_IOC_NOTYPE): New macro.
	(_IOT_COUNT2): Field is 3 bits, not 2.
	* sysdeps/mach/hurd/ioctl.c: Ignore handler if it fails with ENOTTY.
	* hurd/hurdioctl.c (_hurd_lookup_ioctl_handler): Mask off type
	bits before looking up handler.
	(fioctl): Use __hurd_dfail.
	(fioctl, fioclex): Use ENOTTY for bogus request instead of EGRATUITOUS.

Wed Feb 14 00:21:17 1996 David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/alpha/memchr.c (memchr): loop searching for matching
	character bailed out one too early; changed constant 6 to
	7 to fix this.
1996-02-16 02:19:52 +00:00
Roland McGrath a1c46301bb * posix/execvp.c: When executing shell on script, first arg is
full file name, not argv[0].

	* mach/Makefile [no_deps]: Inhibit inclusion of mach-syscalls.mk.
	* mach/Machrules [no_deps]: Inhibit interface rules.
1996-02-14 06:39:32 +00:00
Roland McGrath de1b40af73 Wed Feb 14 01:08:58 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* malloc/Makefile (distribute): Removed TODO.

	* sysdeps/unix/sysv/linux/syscalls.list (ipc): Specify msgget in
	caller column.
1996-02-14 06:09:19 +00:00
Miles Bader e335fa388a Updated from ../gpl2lgpl.sed /home/gd/gnu/lib/getopt.c 1996-02-13 18:28:59 +00:00
Roland McGrath c6de696871 (ipc): Specify msgget in caller column. 1996-02-13 16:09:47 +00:00
Roland McGrath ae4c4dae36 * sysdeps/unix/common/syscalls.list: Add sigaction syscall. 1996-02-13 11:53:03 +00:00
Roland McGrath d2c2312316 * elf/dl-runtime.c (fixup) [ELF_MACHINE_RUNTIME_FIXUP_ARGS]: Let
this macro declare extra leading args.

	* Makerules [$(elf)=yes] (ar-symtab-name): Define to empty.
1996-02-13 11:49:42 +00:00
Roland McGrath 13987e686c New file from Schwab
* sysdeps/unix/sysv/linux/m68k/fpu_control.h: New file.
1996-02-13 11:40:36 +00:00
Roland McGrath 46d7de1907 Sat Feb 10 13:09:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/m68k/brk.c,
	sysdeps/unix/sysv/linux/m68k/mmap.S,
	sysdeps/unix/sysv/linux/m68k/select.S,
	sysdeps/unix/sysv/linux/m68k/sigcontext.h,
	sysdeps/unix/sysv/linux/m68k/sigreturn.S,
	sysdeps/unix/sysv/linux/m68k/socket.S,
	sysdeps/unix/sysv/linux/m68k/syscall.S,
	sysdeps/unix/sysv/linux/m68k/sysdep.S,
	sysdeps/unix/sysv/linux/m68k/sysdep.h: New files.
	* sysdeps/unix/sysv/linux/m68k/brk.c,
	sysdeps/unix/sysv/linux/m68k/mmap.S,
	sysdeps/unix/sysv/linux/m68k/select.S,
	sysdeps/unix/sysv/linux/m68k/sigcontext.h,
	sysdeps/unix/sysv/linux/m68k/sigreturn.S,
	sysdeps/unix/sysv/linux/m68k/socket.S,
	sysdeps/unix/sysv/linux/m68k/syscall.S,
	sysdeps/unix/sysv/linux/m68k/sysdep.S,
	sysdeps/unix/sysv/linux/m68k/sysdep.h: New files.
1996-02-13 11:38:58 +00:00
Roland McGrath 4eea716e2d i386/gnu/types.h moved to top-level linux dir.
* sysdeps/unix/sysv/linux/gnu/types.h: Moved from linux/i386.
1996-02-13 11:35:47 +00:00
Roland McGrath 2a072de4a1 Tue Feb 13 05:12:02 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/Makefile [$(subdir)=math]
	(sysdep_routines): Append setfpucw.
	(extra-objs): Append ieee-fpucw.o.
	(install-lib): Append libieee.a.
	(libieee.a): New target.
	* sysdeps/unix/sysv/linux/ieee-fpucw.c: New file.
	* sysdeps/unix/sysv/linux/i386/fpu_control.h
	(_FPU_GETCW, _FPU_SETCW): New macros.
	(fpu_control_t): New typedef.
	(__setfpucw): Use fpu_control_t for argument type.
	* sysdeps/unix/sysv/linux/fpu_control.c: Moved from linux/i386.

	* sysdeps/unix/sysv/linux/init-first.c: Moved from linux/i386.
	* sysdeps/unix/sysv/linux/Makefile [$(subdir)=math]
	(sysdep_routines): Append setfpucw.
	(extra-objs): Append ieee-fpucw.o.
	(install-lib): Append libieee.a.
	(libieee.a): New target.
	* sysdeps/unix/sysv/linux/ieee-fpucw.c: New file.
	* sysdeps/unix/sysv/linux/i386/fpu_control.h
	(_FPU_GETCW, _FPU_SETCW): New macros.
	(fpu_control_t): New typedef.
	(__setfpucw): Use fpu_control_t for argument type.
	* sysdeps/unix/sysv/linux/fpu_control.c: Moved from linux/i386.

	* sysdeps/unix/sysv/linux/init-first.c: Moved from linux/i386.
1996-02-13 11:07:05 +00:00
Roland McGrath 363113d02a Tue Feb 13 05:12:02 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/syscalls.list: Add ipc syscall.
	* sysdeps/unix/sysv/linux/i386/syscalls.list: File removed.
Tue Feb 13 05:12:02 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* sysdeps/unix/sysv/linux/syscalls.list: Add ipc syscall.
	* sysdeps/unix/sysv/linux/i386/syscalls.list: File removed.
1996-02-13 10:16:25 +00:00
Roland McGrath 3585d6bf30 Sat Feb 10 13:09:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c,
	sysdeps/m68k/isinfl.c, sysdeps/m68k/isnanl.c: New files.
	* sysdeps/m68k/fpu/isinfl.c, sysdeps/m68k/fpu/isnanl.c,
	sysdeps/m68k/isinfl.c, sysdeps/m68k/isnanl.c: New files.
1996-02-13 09:51:13 +00:00
Roland McGrath 01f3e03bcd Sat Feb 10 13:09:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/sys/mman.h: Define MAP_ANON and
	MAP_FILE if not already defined.

	* elf/elf.h: Add m68k reloc definitions.
	* sysdeps/m68k/dl-machine.h, sysdeps/m68k/elf/start.S: New files.
Sat Feb 10 13:09:03 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/sys/mman.h: Define MAP_ANON and
	MAP_FILE if not already defined.

	* elf/elf.h: Add m68k reloc definitions.
	* sysdeps/m68k/dl-machine.h, sysdeps/m68k/elf/start.S: New files.
1996-02-13 09:26:53 +00:00
Roland McGrath 38334018ff Tue Feb 13 00:12:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/i386/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE,
	elf_machine_relplt): New macros.
	* elf/dl-runtime.c: New file.
	* sysdeps/i386/dl-runtime.c, sysdeps/stub/dl-runtime.c: Files removed.
	* sysdeps/i386/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE,
	elf_machine_relplt): New macros.
	* elf/dl-runtime.c: New file.
	* sysdeps/i386/dl-runtime.c, sysdeps/stub/dl-runtime.c: Files removed.
1996-02-13 07:05:16 +00:00
Roland McGrath dbdb6189d5 Tue Feb 13 00:12:12 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* gmon/Makefile (headers): Remove machine-gmon.h.
	* sysdeps/stub/machine-gmon.h, sysdeps/i386/machine-gmon.h: Removed.
	* gmon/mcount.c [! NO_UNDERSCORES] (_mcount): Specify "mcount" as
	the asm name.
	(_mcount): Define normally, taking no args.
	Use __builtin_return_address to fetch PC values of caller and caller's
	caller.
Tue Feb 13 00:12:12 1996  Roland McGrath  <roland@charlie-brown.gnu.ai.mit.edu>

	* gmon/Makefile (headers): Remove machine-gmon.h.
	* sysdeps/stub/machine-gmon.h, sysdeps/i386/machine-gmon.h: Removed.
	* gmon/mcount.c [! NO_UNDERSCORES] (_mcount): Specify "mcount" as
	the asm name.
	(_mcount): Define normally, taking no args.
	Use __builtin_return_address to fetch PC values of caller and caller's
	caller.

	* Makerules: Rewrote rules to update libc archives of all flavors.
	Define separate specific rules for each flavor using o-iterator.

	* sysdeps/unix/Makefile: Include s-proto.d only ifdef subdir.

Sat Feb 10 11:35:16 1996 Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makerules (ar-symtab-name): New macro.  Replace all occurences
	of __.SYMDEF by $(ar-symtab-name).
	* sysdeps/unix/sysv/Makefile (ar-symtab-name): Define as empty.

	* Makefile (configure, %/configure): Depend on aclocal.m4.
	* Make-dist (configure, %/configure): Likewise.

	* sysdeps/unix/Makefile: Include s-proto.d for its deps.

	* gmon/sys/gmon.h: Don't include machine-gmon.h; those defns are
	only needed in the implementation, not for any users.

	* time/northamerica: Updated from ADO 96c, new rules for Mexico in
	1996.
1996-02-13 05:46:59 +00:00
Roland McGrath afced61c8f Updated from ADO 96c, new rules for Mexico in 1996. 1996-02-13 03:56:17 +00:00
Doug Evans d592cd699d Recognize sparclet cpu. 1996-02-12 23:15:30 +00:00
Per Bothner a7cb7644cf * config.guess (UNAME_VERSION): Recognize X4.x as an OSF version. * config.guess (*:CYGWIN*): New 1996-02-12 20:55:56 +00:00
Per Bothner 889a9677fd * config.guess: Support m68k-cbm-sysv4. * config.guess (*:Linux:*:*): Guess m68k-unknown-linux 1996-02-12 20:44:56 +00:00
Roland McGrath 25f9784eb8 * sunrpc/pm_getport.c: #if 0 out gratuitous inclusion of <net/if.h>.
* sunrpc/pm_getmaps.c: Likewise.
1996-02-12 10:36:01 +00:00
Roland McGrath 1fe58993bc * sysdeps/unix/sysv/syscalls.list: Add setrlimit and settimeofday,
so real syscalls override unix/sysv/*.c on sysv-derived systems
 	that have them.
	* sysdeps/unix/common/syscalls.list: Add settimeofday here, to
	override unix/sysv/settimeofday.c since that overrides
	unix/syscalls.list.

	* Makeconfig (+link): Put $(link-libc) after deps from $^,
	regardless of where libc.a appears in the deps.
1996-02-12 10:23:47 +00:00
Roland McGrath 63f8940402 * hurd/hurdfault.c (_hurdsig_fault_init): Set qlimit on
FORWARD_SIGEXC to one.  Uncomment setting of thread exc port, and
 	move it to last thing.
1996-02-12 10:00:30 +00:00
Roland McGrath 808c413c90 Mon Feb 12 03:10:41 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/unix/sysv/sysv4/syscalls.list: Remove redundancies.
	Add __waitid.
	* sysdeps/unix/sysv/linux/syscalls.list: Remove redundancies.
	Define __ name for sigprocmask.
	* sysdeps/unix/bsd/ultrix4/syscalls.list: Remove redundancies.
	Add getsysinfo.
	* sysdeps/unix/bsd/sun/sunos4/syscalls.list: Remove redundancies.
	* sysdeps/unix/bsd/sun/syscalls.list: Remove redundancies.
	* sysdeps/unix/bsd/bsd4.4/syscalls.list: Remove redundancies.
	* sysdeps/unix/bsd/syscalls.list: Remove settimeofday, utimes.
	Add getdents, wait3, waitpid.
	* sysdeps/unix/syscalls.list: Add seteuid, setegid, setsid,
	settimeofday, sigsuspend, sstk, utimes.
	* sysdeps/unix/bsd/ultrix4/mips/sigvec.S: File removed.
	* sysdeps/unix/bsd/ultrix4/mips/syscalls.list: New file.
	* sysdeps/unix/bsd/ultrix4/mips/Makefile (sysdep_routines):
	Removed sigtramp.
	* sysdeps/unix/bsd/ultrix4/mips/sigvec.c: Renamed from sigtramp.c.
	* sysdeps/unix/bsd/bsd4.4/sstk.S: File removed.
	* sysdeps/unix/bsd/hp/m68k/syscalls.list: File removed.
	* sysdeps/unix/bsd/osf/alpha/getdents.S: File removed.
	* sysdeps/unix/bsd/ultrix4/getsysinfo.S: File removed.
	* sysdeps/unix/bsd/ultrix4/waitpid.S: File removed.
	* sysdeps/unix/bsd/ultrix4/mips/sigtramp.c: File removed.
	* sysdeps/unix/bsd/ultrix4/mips/sigvec.S: File removed.
	* sysdeps/unix/bsd/ultrix4/mips/sigvec.c: New file.
	* sysdeps/unix/bsd/ultrix4/mips/syscalls.list: New file.
	* sysdeps/unix/sysv/irix4/wait3.S: File removed.
	* sysdeps/unix/sysv/sysv4/__waitid.S: File removed.
	* sysdeps/unix/sysv/sysv4/fchdir.S: File removed.
	* sysdeps/unix/sysv/sysv4/setegid.S: File removed.
	* sysdeps/unix/sysv/sysv4/seteuid.S: File removed.
	* sysdeps/unix/sysv/sysv4/sigaltstack.S: File removed.
	* sysdeps/unix/sysv/sysv4/solaris2/utimes.S: File removed.
1996-02-12 08:37:31 +00:00
Roland McGrath 47665862cd (sysdep_routines): Removed sigtramp. 1996-02-12 08:11:19 +00:00
Richard M. Stallman bdf2af37da Fix typo in previous change. 1996-02-11 23:40:37 +00:00
Roland McGrath 186588d6bf Sat Feb 10 05:57:08 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
* sysdeps/generic/make_siglist.c: #undef _SIGNAL_H before defining it.

	* sysdeps/unix/sysv/linux/syscalls.list: Add sigprocmask, sigsuspend.
1996-02-11 10:00:24 +00:00
Richard Kenner 3038e60115 (-psos*): New case. 1996-02-10 13:26:26 +00:00
Roland McGrath 932be5efa3 #undef _SIGNAL_H before defining it. 1996-02-10 11:19:12 +00:00
Roland McGrath 6a032d8158 Sat Feb 10 04:18:48 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* posix/execvp.c: If execv fails with ENOEXEC, run the shell on
	the file.

Fri Feb  9 11:46:45 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* time/Makefile (CFLAGS-zdump.c, CFLAGS-zic.c, CFLAGS-ialloc.c,
	CFLAGS-scheck.c): Use -DNOID instead of -Wno-unused.

	* hurd/Makefile (user-interfaces): Added hurd/tioctl.
1996-02-10 10:00:27 +00:00
Roland McGrath 56f778c958 Thu Feb 8 18:55:27 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* hurd/hurdioctl.c (tiocsctty): Set the terminal's pgrp to our own.
1996-02-09 10:00:23 +00:00
Roland McGrath a482b5a595 * Makefile (subdirs): Added wcsmbs.
* wcsmbs: New directory of wide char/multibyte char functions from
	drepper.
1996-02-08 10:00:34 +00:00
Roland McGrath 4ca84cff3b Wed Feb 7 18:48:30 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* hurd/hurdmsg.c (_S_msg_report_wait): Function removed.
	* hurd/report-wait.c: New file.
	* hurd/Makefile (routines): Added report-wait.

	* sysdeps/mach/hurd/Makefile (inhibit-unix-syscalls): New variable.

	* sysdeps/mach/hurd/i386/intr-msg.h (struct mach_msg_trap_args):
	New type.
	(SYSCALL_EXAMINE, MSG_EXAMINE): New inline functions.
	* sysdeps/mach/hurd/i386/trampoline.c (struct mach_msg_trap_args):
	Structure moved to intr-msg.h; include that.

	* time/Makefile (CFLAGS-ialloc.c): Add -Wno-unused.
	(CFLAGS-scheck.c): New variable.

	* sysdeps/mach/hurd/dl-sysdep.c (__hurd_sigthread_stack_base,
	__hurd_sigthread_stack_end, __hurd_sigthread_variables,
	__hurd_threadvar_stack_mask): New variables.

	* sysdeps/mach/hurd/fork.c: Set the new task's exception port to
	its new message port.

	* misc/init-misc.c: Put __init_misc in the __libc_subinit set.

	* configure.in (uname): Add quoting.

	* sysdeps/mach/hurd/fchdir.c: Don't consult errno unless lookup fails.
	* hurd/fchroot.c: Likewise.

	* posix/sys/types.h [GCC >= 2.7]: Define intN_t/u_intN_t using
	__attribute__ ((__mode__ (__XX__))).

Wed Feb 7 03:24:05 1996 Torbjorn Granlund  <tege@tmg.se>

	* sysdeps/i386/i586/memcopy.h (WORD_COPY_FWD): Manually allocate
	destination cache lines.
	(WORD_COPY_BWD): Likewise.

Wed Feb  7 14:16:36 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* sysdeps/generic/Makefile (make_siglist): Get signum.h absolute
	file name first thing, before $(native-compile) changes directories.

	From Gord Matzigkeit <gord@enci.ucalgary.ca>:
	* sysdeps/unix/make_errlist.c: Use strerror if available.
	* sysdeps/unix/configure.in: New file

	* sysdeps/unix/bsd/sun/syscalls.list: Added sigvec.
	* sysdeps/unix/bsd/sun/sigvec.S: File removed.

	* sysdeps/stub/sendto.c: Make sockaddr arg pointer to const.
	* sysdeps/stub/connect.c: Likewise.
	* sysdeps/stub/bind.c: Likewise.

	* hurd/hurdlookup.c (__hurd_file_name_lookup_retry): RETRYNAME of
	"" is only special for FS_RETRY_NORMAL; for FS_RETRY_REAUTH, do
	another dir_lookup of "".
1996-02-08 02:10:15 +00:00
880 changed files with 47379 additions and 10515 deletions
+1571 -1
View File
File diff suppressed because it is too large Load Diff
+4 -8
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -105,11 +105,7 @@ foo:=$(shell echo '+tsrcs=$(+tsrcs)'>&2)
foo:=$(shell echo foobie, dammit! >&2)
ifndef tardir
rel+vers := $(shell sed -n -e 's/^.*libc_release.*\"\([^"]*\)";$$/\1/p' \
-e 's/^.*libc_version.*\"\([^"]*\)";$$/\1/p' \
< $(..)version.c)
release := $(word 1,$(rel+vers))
version := $(word 2,$(rel+vers))
-include $(common-objpfx)version.mk
export tardir := glibc-$(version)
endif
@@ -170,8 +166,8 @@ mv -f $@.new $@
test ! -d CVS || cvs commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
endef
configure: configure.in; $(autoconf-it)
%/configure: %/configure.in; $(autoconf-it)
configure: configure.in aclocal.m4; $(autoconf-it)
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
.PHONY: dist
dist: $(tardir).tar.gz $(tardir)-crypt.tar.gz
+63 -2
View File
@@ -1,6 +1,6 @@
# Make the TAGS files.
# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc.
# Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -98,7 +98,7 @@ ifdef subdir
ifdef tags_sources
$(ETAGS) -o $@ $^
else
# No sources. Create a dummy file.
# No sources. Create a dummy file.
touch $@
endif # tags_sources
else # parent
@@ -114,3 +114,64 @@ $(subdirs:%=%/TAGS):
$(MAKE) -C $(@D) no_deps=t $(@F)
endif # subdir
ifndef XGETTEXT
XGETTEXT = xgettext
endif
P = $(..)po
ifdef subdir
domain = $(subdir)
else
domain = libc-top
endif
define extract
@rm -f $@.new
$(XGETTEXT) --keyword=_ --keyword=N_ --sort-output -d - \
$(XGETTEXTFLAGS-$(@F)) > $@.new $^
mv -f $@.new $@
endef
text-srcs := $(filter %.c %.h %.cc %.C,$(tags_sources))
$P/$(domain).pot: $(text-srcs)
ifeq (,$(text-srcs))
cp /dev/null $@
else
$(extract)
endif
$P/siglist.pot: $(common-objpfx)siglist.c; $(extract)
$P/errlist.pot: $(..)sysdeps/mach/hurd/errlist.c; $(extract)
# Extract all strings from these files; their strings are not marked.
# Their surroundings are also not interesting.
XGETTEXTFLAGS-siglist.pot = -a --no-location
XGETTEXTFLAGS-errlist.pot = -a --no-location
all-pot = $P/libc-top.pot $P/subdirs.pot \
$P/siglist.pot $P/errlist.pot
ifndef subdir
# Collect all the subdir messages, massaging the file names in comments
# to include the subdir name.
$P/subdirs.pot: $(subdirs:%=$P/%.pot)
@rm -f $@.new
(for d in $(subdirs); \
do sed "s%^#: %&$$d/%" $P/$$d.pot; done) > $@.new
mv -f $@.new $@
# Combine all the messages into the final sorted template translation file.
$P/SYS_libc.pot: $(all-pot)
@rm -f $@.new
sed -e 's/VERSION/$(version)/' -e "s/DATE/`date +'%Y-%m-%d %k:%M'`" \
po/header.pot > $@.new
$(XGETTEXT) -d - -n -s --omit-header $^ >> $@.new
mv -f $@.new $@
test ! -d CVS || cvs ci -m'Regenerated from source files' $@
$(subdirs:%=$P/%.pot): $P/%.pot: FORCE
$(MAKE) -C $* no_deps=t ../$@
FORCE:
endif
+14 -11
View File
@@ -83,7 +83,7 @@ include $(common-objpfx)config.make
# changes and so config.status would be run every time; the dependence of
# config.make should suffice to force regeneration and re-exec, and the new
# image will notice if config.h changed.
$(common-objpfx)config.make: $(common-objpfx)config.status
$(common-objpfx)config.make: $(common-objpfx)config.status $(..)config.h.in
cd $(<D); $(SHELL) $(<F)
# Force the user to configure before making.
@@ -171,8 +171,8 @@ localedir = $(datadir)/locale
endif
# Where to install the locale charmap source files.
ifndef nlsdir
nlsdir = $(datadir)/nls
ifndef i18ndir
i18ndir = $(datadir)/i18n
endif
@@ -281,7 +281,7 @@ ifndef +link
+link = $(CC) -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
$(addprefix $(csu-objpfx),start.o $(+preinit)) \
$(^:$(common-objpfx)libc%=$(link-libc)) \
$(filter-out $(common-objpfx)libc%,$^) $(link-libc) \
$(addprefix $(csu-objpfx),$(+postinit))
endif
ifndef config-LDFLAGS
@@ -291,7 +291,7 @@ endif
endif
ifndef link-libc
ifeq (yes,$(build-shared))
link-libc = -Wl,-rpath-link=$(common-objdir) -Wl,-rpath=$(default-rpath) \
link-libc = -Wl,-rpath-link=$(common-objdir) \
$(common-objpfx)libc.so$(libc.so-version) $(gnulib)
# Choose the default search path for the dynamic linker based on
# where we will install libraries.
@@ -395,13 +395,8 @@ ifeq "$(strip $(+cflags))" ""
+cflags := $(default_cflags)
endif # $(+cflags) == ""
# If using gcc, add flags that only it will grok.
ifneq "$(findstring gcc,$(CC))" ""
+cflags := $(+cflags) $(+gccwarn)
+gcc-nowarn := -w
else
+gcc-nowarn :=
endif # gcc
# Don't duplicate options if we inherited variables from the parent.
+cflags := $(sort $(+cflags))
@@ -450,7 +445,8 @@ ifeq (yes,$(build-profile))
# Under --enable-profile, we will build a static library of profiled objects.
# The profiled object files are named foo.po.
object-suffixes += .po
CFLAGS-.po = -p
CPPFLAGS-.po = -DPROF
CFLAGS-.po = -pg
libtype.po = lib%_p.a
endif
ifeq (yes,$(build-omitfp))
@@ -472,6 +468,13 @@ cross-compiling := yes
else
cross-compiling := no
endif
# Figure out the version numbers from version.h.
$(common-objpfx)version.mk: $(..)version.h
sed -n -e 's/^.*RELEASE.*\"\([^"]*\)";$$/release=\1/p' \
-e 's/^.*VERSION.*\"\([^"]*\)";$$/version=\1/p' \
< $< > $@-new
mv -f $@-new $@
endif # Makeconfig not yet included
+5 -5
View File
@@ -36,8 +36,8 @@ mv -f $@.new $@
test ! -d CVS || cvs commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
endef
configure: configure.in; $(autoconf-it)
%/configure: %/configure.in; $(autoconf-it)
configure: configure.in aclocal.m4; $(autoconf-it)
%/configure: %/configure.in aclocal.m4; $(autoconf-it)
include Makeconfig
@@ -51,10 +51,10 @@ sysdep-subdirs := $(subst $(\n), ,$(sysdep-subdirs))
endif
# These are the subdirectories containing the library source.
subdirs = csu assert ctype db locale intl math setjmp signal stdlib \
stdio-common $(stdio) malloc string time dirent grp pwd \
subdirs = csu assert ctype db locale intl catgets math setjmp signal stdlib \
stdio-common $(stdio) malloc string wcsmbs time dirent grp pwd\
posix io termios resource misc socket sysvipc gmon gnulib \
$(wildcard crypt) manual $(sysdep-subdirs) elf
wctype $(wildcard crypt) manual $(sysdep-subdirs) elf
export subdirs := $(subdirs) # Benign, useless in GNU make before 3.63.
# The mach and hurd subdirectories have many generated header files which
+53 -31
View File
@@ -65,6 +65,15 @@ endif
# Add -I switches to get the right sysdep directories.
# `+includes' in Makeconfig references $(+sysdep-includes).
+sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
# The name of the symbol table archive member. The default is suitable for
# BSD style archives. It can be overridden in sysdep Makefiles when SYSV
# style archive are used.
ifeq (no,$(elf))
ar-symtab-name = __.SYMDEF
else
ar-symtab-name = # The null name is used in ELF archives.
endif
# Include any system-specific makefiles.
@@ -267,13 +276,14 @@ S-CPPFLAGS = $(asm-CPPFLAGS)
define +make-deps
-@rm -f $@
$(+mkdep) $< $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
sed -e 's,$*\.o,$(foreach o,$(object-suffixes),$(@:.d=$o)) $@,' \
sed -e 's,$(subst .,\.,$*)\.o,$(foreach o,$(object-suffixes),$(@:.d=$o)) $@,' \
$(sed-remove-objpfx) > $(@:.d=.T)
mv -f $(@:.d=.T) $@
endef
ifneq (,$(objpfx))
sed-remove-objpfx = -e 's@ $(subst @,\@,$(objpfx))@ $$(objpfx)@g' \
-e 's@^$(subst @,\@,$(objpfx))@$$(objpfx)@g'
sed-remove-objpfx = -e 's@ $(subst .,\., \
$(subst @,\@,$(objpfx)))@ $$(objpfx)@g' \
-e 's@^$(subst .,\.,$(subst @,\@,$(objpfx)))@$$(objpfx)@g'
endif
# Figure out the source filenames in this directory.
@@ -349,7 +359,7 @@ ARFLAGS := r$(verbose)
lib: lib-noranlib $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
# Pattern rule for libraries: depend on the __.SYMDEF member updated by ranlib.
lib%.a: lib%.a(__.SYMDEF) ;
lib%.a: lib%.a($(ar-symtab-name)) ;
libobjs: $(foreach o,$(object-suffixes),\
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
@@ -392,21 +402,18 @@ endif
endif
# Rules to update the __.SYMDEF member with ranlib.
# To consolidate, each flavor library's __.SYMDEF member
# depends on the imaginary intermediate file `symdef.SUFFIX',
# where SUFFIX is that flavor's object suffix; then a pattern rule
# "remakes" symdef.% depending on all the libc.a(foo.%) files in $(objects).
$(common-objpfx)$(patsubst %,$(libtype.o),c)(__.SYMDEF): symdef.o
$(common-objpfx)$(patsubst %,$(libtype.so),c)(__.SYMDEF): symdef.so
$(common-objpfx)$(patsubst %,$(libtype.po),c)(__.SYMDEF): symdef.po
$(common-objpfx)$(patsubst %,$(libtype.go),c)(__.SYMDEF): symdef.go
symdef.%: $(foreach o,$(object-suffixes),\
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
$(patsubst $(objpfx)%.o,%.%,$(objects)))) \
$(filter subdir_lib,$(firstword $(subdir) subdir_lib))
# The last line above makes it also depend on subdir_lib for the parent.
$(RANLIB) $(common-objpfx)$(patsubst %,$(libtype.$*),c)
# Rules to update the $(ar-symtab-name) member with ranlib,
# one for each object flavor.
define o-iterator-doit
$(common-objpfx)$(patsubst %,$(libtype$o),c)($(ar-symtab-name)): \
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
$(patsubst $(objpfx)%.o,%$o,$(objects))) \
$(filter subdir_lib,$(firstword $(subdir) subdir_lib)); \
$$(RANLIB) $$(common-objpfx)$$(patsubst %,$$(libtype$o),c)
endef
object-suffixes-left = $(object-suffixes)
include $(o-iterator)
# This makes all the object files.
.PHONY: objects objs
@@ -443,13 +450,11 @@ $(make-target-directory)
$(INSTALL_DATA) $< $@
endef
# Make the target directory if it doesn't exist. Because of make's
# directory cache, this will produce the `mkdir' command when the directory
# already exists, if it didn't exist at the start of the `make' run. The
# `-' prefix ignores errors from mkdir, so there will just be some
# gratuitous but harmless `File exists' messages.
# Make the target directory if it doesn't exist, using the `mkinstalldirs'
# script that does `mkdir -p' even if `mkdir' doesn't support that flag.
define make-target-directory
$(addprefix -mkdir ,$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
$(addprefix $(..)mkinstalldirs ,\
$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
endef
# Any directory (parent or subdir) that has any object files to build
@@ -514,12 +519,12 @@ install-lib.a := $(filter lib%.a,$(install-lib))
install-lib-non.a := $(filter-out lib%.a,$(install-lib))
ifdef install-lib-non.a
$(addprefix $(libdir)/$(libprefix),$(install-lib-non.a)): \
$(libdir)/$(libprefix)%: $(objpfx)%
$(libdir)/$(libprefix)%: $(common-objpfx)%
$(do-install)
endif
ifdef install-lib.a
$(install-lib.a:lib%.a=$(libdir)/lib$(libprefix)%.a): \
$(libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a
$(libdir)/lib$(libprefix)%.a: $(common-objpfx)lib%.a
$(do-install)
$(patsubst %,$(RANLIB) $@,$(filter-out $(non-lib.a),$(<F)))
endif
@@ -564,12 +569,19 @@ ifeq (yes,$(build-shared))
# on other shared objects.
lib%.so: lib%_pic.a; $(build-shlib)
ifeq ($(have-no-whole-archive),yes)
no-whole-archive = -Wl,--no-whole-archive
else
no-whole-archive =
endif
define build-shlib
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
-Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
-Wl,-rpath-link=$(common-objdir) -Wl,-rpath=$(libdir) \
-Wl,--whole-archive $^ $(LDLIBS-$(@F:lib%.so=%).so)
-Wl,-rpath-link=$(common-objdir) \
-Wl,--whole-archive $^ $(no-whole-archive) \
$(LDLIBS-$(@F:lib%.so=%).so)
endef
# Don't try to use -lc when making libc.so itself.
@@ -605,7 +617,12 @@ cd $(@D); $(BUILD_CC) $(BUILD_CFLAGS) $(<:$(common-objpfx)%=%) -o $(@F)
endef
# We always want to use configuration definitions.
BUILD_CFLAGS = -include $(common-objpfx)config.h
ifdef objdir
# This is always used in $(common-objdir), so we use no directory name.
BUILD_CFLAGS = -include config.h
else
BUILD_CFLAGS = -include $(..)config.h
endif
# Support the GNU standard name for this target.
.PHONY: check
@@ -613,7 +630,12 @@ check: tests
.PHONY: TAGS
TAGS: distinfo $(..)MakeTAGS
$(MAKE) $(addprefix -f ,$^)
$(MAKE) $(addprefix -f ,$^) $@
$(..)po/%.pot: distinfo $(..)MakeTAGS FORCE
$(MAKE) $(addprefix -f ,$(filter-out FORCE,$^)) $@
FORCE:
.PHONY: echo-headers
echo-headers:
+32 -7
View File
@@ -1,4 +1,4 @@
GNU C Library NEWS -- history of user-visible changes. 2 January 1996
GNU C Library NEWS -- history of user-visible changes. 28 March 1996
Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -7,6 +7,10 @@ Please send GNU C library bug reports to bug-glibc@prep.ai.mit.edu.
Version 1.10
* GNU extensions are no longer declared by default. To enable them you
must define the macro `_GNU_SOURCE' in your program or compile with
`-D_GNU_SOURCE'.
* The library has changed from using GNU ld symbol aliases to using weak
symbols where available. The ELF object file format supports weak
symbols; GNU ld also supports weak symbols in the a.out format. (There
@@ -34,8 +38,14 @@ Version 1.10
* The C library now provides the run-time support code for profiling
executables compiled with `-pg'. Programs can control the profiling code
through the interface in <sys/gmon.h>. The profiling code was adapted
from 4.4 BSD-Lite.
through the interface in <sys/gmon.h>. The `gmon.out' files written by
the GNU C library can be read only by GNU `gprof' (from GNU binutils);
the support for this file format was contributed by David Mosberger-Tang.
* The math code has been replaced with a math library based on fdlibm from
Sun, and modified by JT Conklin with i387 support and by Ian Taylor with
`float' functions. The math functions now reside in a separate library,
so programs using them will need to use `-lm' their linking commands.
* The new functions `strtoq' and `strtouq' parse integer values from
strings, like `strtol' and `strtoul', but they return `long long int' and
@@ -53,6 +63,11 @@ Version 1.10
* The new header <langinfo.h> defines an interface for accessing
various locale-dependent data (using the locale chosen with `setlocale').
* Ulrich Drepper has contributed a new suite of functions for operation on
wide-character and multibyte-character strings, in <wcstr.h> and <mbstr.h>;
and classification and case conversion of wide characters, in <wctype.h>.
These new functions are intended to conform to the ISO C specification.
* You can now use positional parameter specifications in format strings
for the `printf' and `scanf' families of functions. For example,
`printf ("Number %2$d, Mr %1$s\n", "Jones", 6);'' prints
@@ -133,6 +148,10 @@ Version 1.10
The GNU library now supports Linux versions 1.3.29 and later,
using the ELF object file format (i[345]86-*-linux).
* Andreas Schwab has ported the C library to Linux/m68k (m68k-*-linux).
* David Mosberger-Tang has ported the C library to Linux/Alpha (alpha-*-linux).
* Ulrich Drepper has contributed a new set of message catalog functions to
support multiple languages, for use with his new package GNU gettext.
@@ -163,10 +182,16 @@ Version 1.10
* New function `getsid' returns session ID number on systems that support it.
* The 4.4 BSD `db' library has been incorporated into the GNU C library.
New header files <db.h> and <mpool.h> provide a rich set of functions for
several types of simple databases stored in memory and in files, and
<ndbm.h> is an old `ndbm'-compatbile interface using the `db' functions.
* We have incorporated the 4.4 BSD `db' library (version 1.85). New header
files <db.h> and <mpool.h> provide a rich set of functions for several
types of simple databases stored in memory and in files, and <ndbm.h> is
an old `ndbm'-compatbile interface using the `db' functions.
* New macro `strdupa' copies a string like `strdup', but uses local stack
space from `alloca' instead of dynamic heap space from `malloc'.
* New function `strnlen' is like `strlen' but searches only a given maximum
number of characters for the null terminator.
Version 1.09
+4 -1
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -38,6 +38,9 @@ export subdir := $(subdir)
.PHONY: all
all: objs lib others
others: $(addprefix $(objpfx),$(extra-objs) \
$(install-lib) $(install-bin) $(install-sbin))
ifneq "$(findstring env,$(origin headers))" ""
headers :=
endif
+2 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
@@ -95,4 +95,3 @@ __END_DECLS
#endif /* NDEBUG. */
+41
View File
@@ -0,0 +1,41 @@
# Copyright (C) 1996 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
# The GNU C Library 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
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Makefile for catgets.
#
subdir := catgets
headers = nl_types.h
distribute = catgetsinfo.h config.h
routines = catgets open_catalog
others = gencat
install-bin = gencat
gencat-modules = xmalloc
# To find xmalloc.c
vpath %.c ../locale/programs
include ../Rules
$(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o)
CPPFLAGS := -DNLSPATH='"$(localedir)/%L/%N:$(localedir)/%L/LC_MESSAGES/%N:"' \
-DHAVE_CONFIG_H $(CPPFLAGS)
+163
View File
@@ -0,0 +1,163 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <alloca.h>
#include <nl_types.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include "catgetsinfo.h"
/* Open the catalog and return a descriptor for the catalog. */
nl_catd
catopen (const char *cat_name, int flag)
{
__nl_catd result;
const char *env_var;
result = (__nl_catd) malloc (sizeof (__nl_catd));
if (result == NULL)
/* We cannot get enough memory. */
return (nl_catd) -1;
result->status = closed;
result->cat_name = strdup (cat_name);
if (result->cat_name == NULL)
{
free (result);
return (nl_catd) -1;
}
if (strchr (cat_name, '/') == NULL)
{
if (flag == NL_CAT_LOCALE)
{
env_var = getenv ("LC_ALL");
if (env_var == NULL)
{
env_var = getenv ("LC_MESSAGES");
if (env_var == NULL)
{
env_var = getenv ("LANG");
if (env_var == NULL)
env_var = "C";
}
}
}
else
{
env_var = getenv ("LANG");
if (env_var == NULL)
env_var = "C";
}
result->env_var = strdup (env_var);
if (result->env_var == NULL)
{
free ((void *) result->cat_name);
free ((void *) result);
return (nl_catd) -1;
}
if (getenv ("NLSPATH") != NULL)
result->nlspath = strdup (getenv ("NLSPATH"));
else
result->nlspath = strdup (NLSPATH);
if (result->nlspath == NULL)
{
free ((void *) result->cat_name);
free ((void *) result->env_var);
free ((void *) result);
return (nl_catd) -1;
}
}
else
{
result->env_var = NULL;
result->nlspath = NULL;
}
return (nl_catd) result;
}
/* Return message from message catalog. */
char *
catgets (nl_catd catalog_desc, int set, int message, const char *string)
{
__nl_catd catalog;
size_t idx;
size_t cnt;
/* Be generous if catalog which failed to be open is used. */
if (catalog_desc == (nl_catd) -1 || ++set <= 0 || message < 0)
return (char *) string;
catalog = (__nl_catd) catalog_desc;
if (catalog->status == closed)
__open_catalog (catalog, 1);
if (catalog->status == nonexisting)
return (char *) string;
idx = ((set * message) % catalog->plane_size) * 3;
cnt = 0;
do
{
if (catalog->name_ptr[idx + 0] == (u_int32_t) set
&& catalog->name_ptr[idx + 1] == (u_int32_t) message)
return (char *) &catalog->strings[catalog->name_ptr[idx + 2]];
idx += catalog->plane_size * 3;
}
while (++cnt < catalog->plane_depth);
return (char *) string;
}
/* Return resources used for loaded message catalog. */
int
catclose (nl_catd catalog_desc)
{
__nl_catd catalog;
catalog = (__nl_catd) catalog_desc;
if (catalog->status == mmaped)
munmap ((void *) catalog->file_ptr, catalog->file_size);
else if (catalog->status == malloced)
free ((void *) catalog->file_ptr);
else if (catalog->status != closed && catalog->status != nonexisting)
return -1;
if (catalog->nlspath)
free ((void *) catalog->nlspath);
if (catalog->env_var)
free ((void *) catalog->env_var);
free ((void *) catalog);
return 0;
}
+59
View File
@@ -0,0 +1,59 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <sys/types.h>
struct catalog_obj
{
u_int32_t magic;
u_int32_t plane_size;
u_int32_t plane_depth;
/* This is in fact two arrays in one: always a pair of name and
pointer into the data area. */
u_int32_t name_ptr[0];
};
/* This structure will be filled after loading the catalog. */
typedef struct catalog_info
{
enum { closed, nonexisting, mmaped, malloced } status;
const char *cat_name;
const char *env_var;
const char *nlspath;
size_t plane_size;
size_t plane_depth;
u_int32_t *name_ptr;
const char *strings;
struct catalog_obj *file_ptr;
size_t file_size;
} *__nl_catd;
/* The magic number to signal we really have a catalog file. */
#define CATGETS_MAGIC 0x960408de
/* Prototypes for helper functions. */
void __open_catalog (__nl_catd __catalog, int __with_path);
+14
View File
@@ -0,0 +1,14 @@
#ifndef _CG_CONFIG_H
#define _CG_CONFIG_H
/* Use the internal textdomain used for libc messages. */
#define PACKAGE _libc_intl_domainname
#ifndef VERSION
/* Get libc version number. */
#include "../version.h"
#endif
#include_next <config.h>
#endif
+1030
View File
File diff suppressed because it is too large Load Diff
+48
View File
@@ -0,0 +1,48 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _NL_TYPES_H
#define _NL_TYPES_H 1
#include <features.h>
/* The default message set used by the gencat program. */
#define NL_SETD 1
/* Value for FLAG parameter of `catgets' to say we want XPG4 compliance. */
#define NL_CAT_LOCALE 1
/* Message catalog descriptor type. */
typedef void *nl_catd;
__BEGIN_DECLS
/* Open message catalog for later use, returning descriptor. */
extern nl_catd catopen __P ((__const char *__cat_name, int __flag));
/* Return translation with NUMBER in SET of CATALOG; if not found
return STRING. */
extern char *catgets __P ((nl_catd __catalog, int __set, int __number,
__const char *__string));
/* Close message CATALOG. */
extern int catclose __P ((nl_catd __catalog));
__END_DECLS
#endif /* nl_types.h */
+263
View File
@@ -0,0 +1,263 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <endian.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include "catgetsinfo.h"
#define SWAPU32(w) \
(((w) << 24) | (((w) & 0xff00) << 8) | (((w) >> 8) & 0xff00) | ((w) >> 24))
void
__open_catalog (__nl_catd catalog, int with_path)
{
int fd;
struct stat st;
int swapping;
if (strchr (catalog->cat_name, '/') != NULL || !with_path)
fd = open (catalog->cat_name, O_RDONLY);
else
{
const char *run_nlspath = catalog->nlspath;
#define ENOUGH(n) \
if (bufact + (n) >=bufmax) \
{ \
char *old_buf = buf; \
bufmax += 256 + (n); \
buf = (char *) alloca (bufmax); \
memcpy (buf, old_buf, bufact); \
}
/* The RUN_NLSPATH variable contains a colon separated list of
descriptions where we expect to find catalogs. We have to
recognize certain % substitutions and stop when we found the
first existing file. */
char *buf;
size_t bufact;
size_t bufmax;
buf = NULL;
bufmax = 0;
fd = -1;
while (*run_nlspath != '\0')
{
bufact = 0;
while (*run_nlspath != ':' && *run_nlspath != '\0')
if (*run_nlspath == '%')
{
const char *tmp;
++run_nlspath; /* We have seen the `%'. */
switch (*run_nlspath++)
{
case 'N':
/* Use the catalog name. */
ENOUGH (strlen (catalog->cat_name));
bufact = stpcpy (&buf[bufact], catalog->cat_name) - buf;
break;
case 'L':
/* Use the current locale category value. */
ENOUGH (strlen (catalog->env_var));
bufact = stpcpy (&buf[bufact], catalog->env_var) - buf;
break;
case 'l':
/* Use language element of locale category value. */
tmp = catalog->env_var;
do
{
ENOUGH (1);
buf[bufact++] = *tmp++;
}
while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
break;
case 't':
/* Use territory element of locale category value. */
tmp = catalog->env_var;
do
++tmp;
while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
if (*tmp == '_')
{
++tmp;
do
{
ENOUGH (1);
buf[bufact++] = *tmp;
}
while (*tmp != '\0' && *tmp != '.');
}
break;
case 'c':
/* Use code set element of locale category value. */
tmp = catalog->env_var;
do
++tmp;
while (*tmp != '\0' && *tmp != '.');
if (*tmp == '.')
{
++tmp;
do
{
ENOUGH (1);
buf[bufact++] = *tmp;
}
while (*tmp != '\0');
}
break;
case '%':
ENOUGH (1);
buf[bufact++] = '%';
break;
default:
/* Unknown variable: ignore this path element. */
bufact = 0;
while (*run_nlspath != '\0' && *run_nlspath != ':')
++run_nlspath;
break;
}
}
else
{
ENOUGH (1);
buf[bufact++] = *run_nlspath++;
}
ENOUGH (1);
buf[bufact] = '\0';
if (bufact != 0)
{
fd = open (buf, O_RDONLY);
if (fd >= 0)
break;
}
++run_nlspath;
}
}
if (fd < 0 || fstat (fd, &st) < 0)
{
catalog->status = nonexisting;
return;
}
#ifndef MAP_COPY
/* Linux seems to lack read-only copy-on-write. */
#define MAP_COPY MAP_PRIVATE
#endif
#ifndef MAP_FILE
/* Some systems do not have this flag; it is superfluous. */
#define MAP_FILE 0
#endif
#ifndef MAP_INHERIT
/* Some systems might lack this; they lose. */
#define MAP_INHERIT 0
#endif
catalog->file_size = st.st_size;
catalog->file_ptr =
(struct catalog_obj *) mmap (NULL, st.st_size, PROT_READ,
MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0);
if (catalog->file_ptr != (struct catalog_obj *) -1)
/* Tell the world we managed to mmap the file. */
catalog->status = mmaped;
else
{
/* mmap failed perhaps because the system call is not
implemented. Try to load the file. */
size_t todo;
catalog->file_ptr = malloc (st.st_size);
if (catalog->file_ptr == NULL)
{
catalog->status = nonexisting;
return;
}
todo = st.st_size;
/* Save read, handle partial reads. */
do
{
size_t now = read (fd, (((char *) &catalog->file_ptr)
+ (st.st_size - todo)), todo);
if (now == 0)
{
free ((void *) catalog->file_ptr);
catalog->status = nonexisting;
return;
}
todo -= now;
}
while (todo > 0);
catalog->status = malloced;
}
/* We don't need the file anymore. */
close (fd);
/* Determine whether the file is a catalog file and if yes whether
it is written using the correct byte order. Else we have to swap
the values. */
if (catalog->file_ptr->magic == CATGETS_MAGIC)
swapping = 0;
else if (catalog->file_ptr->magic == SWAPU32 (CATGETS_MAGIC))
swapping = 1;
else
{
/* Illegal file. Free he resources and mark catalog as not
usable. */
if (catalog->status == mmaped)
munmap ((void *) catalog->file_ptr, catalog->file_size);
else
free (catalog->file_ptr);
catalog->status = nonexisting;
return;
}
#define SWAP(x) (swapping ? SWAPU32 (x) : (x))
/* Get dimensions of the used hashing table. */
catalog->plane_size = SWAP (catalog->file_ptr->plane_size);
catalog->plane_depth = SWAP (catalog->file_ptr->plane_depth);
/* The file contains two versions of the pointer tables. Pick the
right one for the local byte order. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
catalog->name_ptr = &catalog->file_ptr->name_ptr[0];
#elif __BYTE_ORDER == __BIG_ENDIAN
catalog->name_ptr = &catalog->file_ptr->name_ptr[catalog->plane_size
* catalog->plane_depth
* 3];
#else
# error Cannot handle __BYTE_ORDER byte order
#endif
/* The rest of the file contains all the strings. They are
addressed relative to the position of the first string. */
catalog->strings =
(const char *) &catalog->file_ptr->name_ptr[catalog->plane_size
* catalog->plane_depth * 3 * 2];
}
+32 -10
View File
@@ -51,17 +51,19 @@ trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
alpha:OSF1:V*:*)
# After 1.2, OSF1 uses "V1.3" for uname -r.
echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
exit 0 ;;
alpha:OSF1:*:*)
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo alpha-dec-osf${UNAME_RELEASE}
exit 0 ;;
echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'`
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
@@ -134,7 +136,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`uname -p`
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88100 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
@@ -320,6 +322,15 @@ EOF
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo i386-unknown-cygwin32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
@@ -327,12 +338,16 @@ EOF
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
if echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then
echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
elif echo $ld_help_string | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
elif test "${UNAME_MACHINE}" = "alpha" ; then
echo alpha-unknown-linux ; exit 0
else
@@ -437,6 +452,13 @@ EOF
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
R3000:*System_V*:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
+36 -13
View File
@@ -4,12 +4,19 @@
#undef HAVE_GNU_LD
/* Define if using ELF, which supports weak symbols.
This implies HAVE_WEAK_SYMBOLS; set by --with-elf. */
This implies HAVE_ASM_WEAK_DIRECTIVE and NO_UNDERSCORES; set by
--with-elf. */
#undef HAVE_ELF
/* Define if weak symbols are available in the assembler and
linker being used. Set by --with-weak-symbols. */
#undef HAVE_WEAK_SYMBOLS
/* Define if C symbols are asm symbols. Don't define if C symbols
have a `_' prepended to make the asm symbol. */
#undef NO_UNDERSCORES
/* Define if weak symbols are available via the `.weak' directive. */
#undef HAVE_ASM_WEAK_DIRECTIVE
/* Define if weak symbols are available via the `.weakext' directive. */
#undef HAVE_ASM_WEAKEXT_DIRECTIVE
/* Define if not using ELF, but `.init' and `.fini' sections are available. */
#undef HAVE_INITFINI
@@ -24,22 +31,25 @@
declaring a symbol global (default `.globl'). */
#undef ASM_GLOBAL_DIRECTIVE
/* ELF has weak symbols, and with GNU ld a.out does too. */
#ifndef HAVE_WEAK_SYMBOLS
#if defined (HAVE_ELF) || defined (HAVE_GNU_LD)
#define HAVE_WEAK_SYMBOLS
#endif
#endif
/* Define to use GNU libio instead of GNU stdio.
This is defined by configure under --enable-libio. */
#undef USE_IN_LIBIO
/* */
/* These symbols might be defined by some sysdeps configures. */
/*
*/
#ifndef _LIBC
/* These symbols might be defined by some sysdeps configures.
They are used only in miscellaneous generator programs, not
in compiling libc itself. */
/* sysdeps/generic/configure.in */
#undef HAVE_PSIGNAL
/* sysdeps/unix/configure.in */
#undef HAVE_STRERROR
/* sysdeps/unix/common/configure.in */
#undef HAVE_SYS_SIGLIST
#undef HAVE__SYS_SIGLIST
@@ -49,3 +59,16 @@
#undef HAVE__CTYPE__
#undef HAVE__CTYPE
#undef HAVE__LOCP
#endif
/*
*/
#ifdef _LIBC
/* The zic and zdump programs need these definitions. */
#define HAVE_STRERROR 1
#endif
+2 -1
View File
@@ -15,9 +15,10 @@ config-sysdirs = @sysnames@
config-defines = @DEFS@
elf = @elf@
weak-symbols = @weak@
have-initfini = @libc_cv_have_initfini@
have-no-whole-archive = @libc_cv_ld_no_whole_archive@
# Configuration options.
gnu-as = @gnu_as@
gnu-ld = @gnu_ld@
Vendored
+16 -7
View File
@@ -3,7 +3,7 @@
# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -81,7 +81,8 @@ case $os in
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple)
os=
basic_machine=$1
;;
@@ -127,6 +128,9 @@ case $os in
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
@@ -136,10 +140,10 @@ case $basic_machine in
tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
| arme[lb] | pyramid \
| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
| alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
| powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
| alpha | we32k | ns16k | clipper | i370 | sh \
| powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
| pdp11 | mips64el | mips64orion | mips64orionel \
| sparc)
| sparc | sparclet | sparclite | sparc64)
basic_machine=$basic_machine-unknown
;;
# Object if more than one company name word.
@@ -230,6 +234,10 @@ case $basic_machine in
basic_machine=cray2-cray
os=-unicos
;;
[ctj]90-cray)
basic_machine=c90-cray
os=-unicos
;;
crds | unos)
basic_machine=m68k-crds
;;
@@ -645,7 +653,7 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
| -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* \
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
@@ -654,7 +662,7 @@ case $os in
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe*)
| -cygwin32* | -pe* | -psos* | -moss* )
# Remember, each alternative MUST END IN *, to match a version number.
;;
-sunos5*)
@@ -880,6 +888,7 @@ case $basic_machine in
;;
-aux*)
vendor=apple
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
Vendored
+136 -41
View File
@@ -2,8 +2,8 @@
# From configure.in CVSid
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.7
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
# Generated automatically using autoconf version 2.9
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@@ -26,8 +26,6 @@ ac_help="$ac_help
--with-gnu-as if using GNU as (in the binutils package)"
ac_help="$ac_help
--with-elf if using the ELF object format"
ac_help="$ac_help
--with-weak-symbols if weak symbols are available in as and ld"
ac_help="$ac_help
--enable-libio build in GNU libio instead of GNU stdio"
ac_help="$ac_help
@@ -355,7 +353,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.7"
echo "configure generated by autoconf version 2.9"
exit 0 ;;
-with-* | --with-*)
@@ -520,12 +518,9 @@ fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='echo $CPP $CPPFLAGS 1>&5;
$CPP $CPPFLAGS'
ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -623,14 +618,6 @@ else
elf=no
fi
# Check whether --with-weak-symbols or --without-weak-symbols was given.
if test "${with_weak_symbols+set}" = set; then
withval="$with_weak_symbols"
weak=$withval
else
weak=no
fi
# Check whether --enable-libio or --disable-libio was given.
if test "${enable_libio+set}" = set; then
@@ -724,12 +711,18 @@ config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
case "$host_os" in
gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
# These systems always use GNU tools.
gnu_ld=yes gnu_as=yes
gnu_ld=yes gnu_as=yes ;;
esac
case "$host_os" in
gnu* | linux* | sysv4* | solaris2*)
# These systems always use the ELF format.
elf=yes
elf=yes ;;
esac
# Linux/Alpha does not use ELF yet.
case "$host_cpu-$host_os" in
alpha*-linux*)
gnu_ld=no elf=no ;;
esac
# Compute the list of sysdep directories for this configuration.
@@ -1150,12 +1143,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1154 "configure"
#line 1147 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1164,12 +1158,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1168 "configure"
#line 1162 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1218,7 +1213,7 @@ if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
#line 1222 "configure"
#line 1217 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
@@ -1234,7 +1229,7 @@ size_t size; wchar_t wchar;
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
if eval $ac_compile; then
if { (eval echo configure:1233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
@@ -1341,7 +1336,7 @@ if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
#line 1345 "configure"
#line 1340 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1350,7 +1345,7 @@ asm (".section .init");
asm (".section .fini");
; return 0; }
EOF
if eval $ac_compile; then
if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
@@ -1370,6 +1365,108 @@ EOF
fi
fi
if test $elf = yes; then
libc_cv_asm_underscores=no
else
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&4
if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.$ac_ext <<EOF
#line 1377 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() { return 0; }
int t() {
glibc_foobar ();
; return 0; }
EOF
if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
rm -rf conftest*
libc_cv_asm_underscores=no
fi
rm -f conftest*
fi
echo "$ac_t""$libc_cv_asm_underscores" 1>&4
fi
if test $libc_cv_asm_underscores = no; then
cat >> confdefs.h <<\EOF
#define NO_UNDERSCORES 1
EOF
fi
if test $elf = yes; then
libc_cv_weak_symbols=yes
libc_cv_asm_weak_directive=yes
libc_cv_asm_weakext_directive=no
else
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&4
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
.weak foo
.weak bar; bar = foo
EOF
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
libc_cv_asm_weak_directive=yes
else
libc_cv_asm_weak_directive=no
fi
rm -f conftest*
fi
echo "$ac_t""$libc_cv_asm_weak_directive" 1>&4
if test $libc_cv_asm_weak_directive = no; then
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&4
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
.weakext foo
.weakext bar, foo
EOF
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
libc_cv_asm_weakext_directive=yes
else
libc_cv_asm_weakext_directive=no
fi
rm -f conftest*
fi
echo "$ac_t""$libc_cv_asm_weakext_directive" 1>&4
fi # no .weak
fi # not ELF
if test $libc_cv_asm_weak_directive = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ASM_WEAK_DIRECTIVE 1
EOF
elif test $libc_cv_asm_weakext_directive = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_ASM_WEAKEXT_DIRECTIVE 1
EOF
fi
### End of automated tests.
### Now run sysdeps configure fragments.
# sysdeps configure fragments may set these with files to be linked below.
libc_link_dests=
libc_link_sources=
@@ -1382,9 +1479,14 @@ for dir in $sysnames; do
echo "$ac_t""running configure fragment for $dir" 1>&4
. $sysdep_dir/$dir/configure
fi
if test -z "$uname"; then
{ test -r $sysdep_dir/$dir/uname.c || test -r $sysdep_dir/$dir/uname.S; } \
&& uname=$dir
if test -r $sysdep_dir/$dir/uname.c ||
test -r $sysdep_dir/$dir/uname.S ||
{ test -r $sysdep_dir/$dir/syscalls.list &&
grep '^uname[ ]' $sysdep_dir/$dir/syscalls.list >/dev/null; }; then
uname=$dir
fi
fi
done
@@ -1452,7 +1554,7 @@ default) stdio=stdio ;;
esac
echo "$ac_t""$stdio" 1>&4
if test $gnu_ld = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_GNU_LD 1
@@ -1470,12 +1572,6 @@ if test $elf = yes; then
#define HAVE_ELF 1
EOF
fi
if test $weak = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_WEAK_SYMBOLS 1
EOF
fi
@@ -1569,7 +1665,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.7"
echo "$CONFIG_STATUS generated by autoconf version 2.9"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -1635,7 +1731,6 @@ s%@stdio@%$stdio%g
s%@gnu_ld@%$gnu_ld%g
s%@gnu_as@%$gnu_as%g
s%@elf@%$elf%g
s%@weak@%$weak%g
s%@shared@%$shared%g
s%@profile@%$profile%g
s%@omitfp@%$omitfp%g
@@ -1743,7 +1838,7 @@ rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
EOF
+89 -10
View File
@@ -1,6 +1,6 @@
Dnl Process this file with autoconf to produce a configure script.
AC_REVISION([$CVSid$])
AC_PREREQ(2.4.2)dnl dnl Minimum Autoconf version required.
AC_PREREQ(2.9)dnl dnl Minimum Autoconf version required.
AC_INIT(features.h)
AC_CONFIG_HEADER(config.h)
@@ -49,9 +49,6 @@ test $gnu_binutils = yes && gnu_as=yes gnu_ld=yes
AC_ARG_WITH(elf, dnl
--with-elf if using the ELF object format,
elf=$withval, elf=no)
AC_ARG_WITH(weak-symbols, dnl
--with-weak-symbols if weak symbols are available in as and ld,
weak=$withval, weak=no)
AC_ARG_ENABLE(libio, dnl
[ --enable-libio build in GNU libio instead of GNU stdio],
@@ -84,12 +81,18 @@ config_machine=$host_cpu config_vendor=$host_vendor config_os=$host_os
case "$host_os" in
gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
# These systems always use GNU tools.
gnu_ld=yes gnu_as=yes
gnu_ld=yes gnu_as=yes ;;
esac
case "$host_os" in
gnu* | linux* | sysv4* | solaris2*)
# These systems always use the ELF format.
elf=yes
elf=yes ;;
esac
# Linux/Alpha does not use ELF yet.
case "$host_cpu-$host_os" in
alpha*-linux*)
gnu_ld=no elf=no ;;
esac
# Compute the list of sysdep directories for this configuration.
@@ -406,6 +409,82 @@ if test $elf != yes; then
fi
fi
if test $elf = yes; then
libc_cv_asm_underscores=no
else
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
[AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
libc_cv_asm_underscores=yes,
libc_cv_asm_underscores=no)])
fi
if test $libc_cv_asm_underscores = no; then
AC_DEFINE(NO_UNDERSCORES)
fi
if test $elf = yes; then
libc_cv_weak_symbols=yes
libc_cv_asm_weak_directive=yes
libc_cv_asm_weakext_directive=no
else
AC_CACHE_CHECK(for assembler .weak directive, libc_cv_asm_weak_directive,
[dnl
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
.weak foo
.weak bar; bar = foo
EOF
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
libc_cv_asm_weak_directive=yes
else
libc_cv_asm_weak_directive=no
fi
rm -f conftest*])
if test $libc_cv_asm_weak_directive = no; then
AC_CACHE_CHECK(for assembler .weakext directive,
libc_cv_asm_weakext_directive,
[dnl
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
.weakext foo
.weakext bar, foo
EOF
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
libc_cv_asm_weakext_directive=yes
else
libc_cv_asm_weakext_directive=no
fi
rm -f conftest*])
fi # no .weak
fi # not ELF
if test $libc_cv_asm_weak_directive = yes; then
AC_DEFINE(HAVE_ASM_WEAK_DIRECTIVE)
elif test $libc_cv_asm_weakext_directive = yes; then
AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE)
fi
AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
cat > conftest.c <<\EOF
main () { exit (0); }
EOF
if ${CC-cc} $CFLAGS -Wl,--no-whole-archive \
-o conftest conftest.c 2>/dev/null; then
libc_cv_ld_no_whole_archive=yes
else
libc_cv_ld_no_whole_archive=no
fi
rm -f conftest*])
AC_SUBST(libc_cv_ld_no_whole_archive)dnl
### End of automated tests.
### Now run sysdeps configure fragments.
# sysdeps configure fragments may set these with files to be linked below.
libc_link_dests=
libc_link_sources=
@@ -418,13 +497,16 @@ for dir in $sysnames; do
AC_MSG_RESULT(running configure fragment for $dir)
. $sysdep_dir/$dir/configure
fi
[
if test -z "$uname"; then
if test -r $sysdep_dir/$dir/uname.c ||
test -r $sysdep_dir/$dir/uname.S ||
{ test -r $sysdep_dir/$dir/syscalls.list &&
grep '^uname[ ]' $sysdep_dir/$dir/syscalls.list >/dev/null; }; then
uname=$dir
fi
fi
]dnl
done
AC_LINK_FILES(`echo $libc_link_sources`, `echo $libc_link_dests`)
@@ -495,7 +577,7 @@ default) stdio=stdio ;;
esac
AC_MSG_RESULT($stdio)
AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf) AC_SUBST(weak)
AC_SUBST(gnu_ld) AC_SUBST(gnu_as) AC_SUBST(elf)
if test $gnu_ld = yes; then
AC_DEFINE(HAVE_GNU_LD)
fi
@@ -505,9 +587,6 @@ fi
if test $elf = yes; then
AC_DEFINE(HAVE_ELF)
fi
if test $weak = yes; then
AC_DEFINE(HAVE_WEAK_SYMBOLS)
fi
AC_SUBST(shared)
if test $shared = default; then
+3 -6
View File
@@ -70,13 +70,10 @@ _init (void)
gcrt1.o to reference a symbol which would be defined by some library
module which has a constructor; but then user code's constructors
would come first, and not be profiled. */
extern volatile void __gmon_start__ (void) __attribute__ ((weak));
/* This volatile variable is necessary to avoid GCC optimizing
out the test. */
register volatile void (*g) (void) = &__gmon_start__;
extern void __gmon_start__ (void) __attribute__ ((weak));
weak_symbol (__gmon_start__)
if (g)
(*g) ();
if (__gmon_start__)
__gmon_start__ ();
/* End the here document containing the .init prologue code.
Then fetch the .section directive just written and append that
+9 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,15 @@ Cambridge, MA 02139, USA. */
/* Defined in locale/C-ctype.c. */
extern const char _nl_C_LC_CTYPE_class[];
extern const char _nl_C_LC_CTYPE_class32[];
extern const char _nl_C_LC_CTYPE_toupper[];
extern const char _nl_C_LC_CTYPE_tolower[];
extern const char _nl_C_LC_CTYPE_names[];
#define b(u,x) (((u int *) _nl_C_LC_CTYPE_##x) + 128);
#define b(u,x,o) (((const u int *) _nl_C_LC_CTYPE_##x) + o);
const unsigned short int *__ctype_b = b(unsigned short, class);
const int *__ctype_tolower = b(, tolower);
const int *__ctype_toupper = b(, toupper);
const unsigned short int *__ctype_b = b (unsigned short, class, 128);
const unsigned int *__ctype32_b = b (unsigned, class32, 0);
const int *__ctype_tolower = b (, tolower, 128);
const int *__ctype_toupper = b (, toupper, 128);
const unsigned int *__ctype_names = b (unsigned, names, 0);
+7 -7
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
@@ -27,6 +27,7 @@ Cambridge, MA 02139, USA. */
__BEGIN_DECLS
#ifndef _ISbit
/* These are all the characteristics of characters.
If there get to be more than 16 distinct characteristics,
many things must be changed that use `unsigned short int's.
@@ -55,11 +56,9 @@ enum
_ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */
_IScntrl = _ISbit (9), /* Control character. */
_ISpunct = _ISbit (10), /* Punctuation. */
/* The following are defined in POSIX.2 as being combinations of the
classes above. */
_ISalnum = _ISalpha | _ISdigit /* Alphanumeric. */
_ISalnum = _ISbit (11) /* Alphanumeric. */
};
#endif /* ! _ISbit */
/* These are defined in ctype-info.c.
The declarations here must match those in localeinfo.h.
@@ -70,7 +69,8 @@ enum
char' values and for EOF; we also support negative `signed char' values
for broken old programs. The case conversion arrays are of `int's
rather than `unsigned char's because tolower (EOF) must be EOF, which
doesn't fit into an `unsigned char'. */
doesn't fit into an `unsigned char'. But today more important is that
the arrays are also used for multi-byte character sets. */
extern __const unsigned short int *__ctype_b; /* Characteristics. */
extern __const int *__ctype_tolower; /* Case conversions. */
extern __const int *__ctype_toupper; /* Case conversions. */
+5
View File
@@ -0,0 +1,5 @@
*.gz *.Z *.tar *.tgz
=*
TODO COPYING* AUTHORS copyr-* copying.*
glibc-*
distinfo
+7
View File
@@ -26,3 +26,10 @@ distribute := compat.h \
include ../Rules
CPPFLAGS += -D__DBINTERFACE_PRIVATE
# This file defines some static functions for alternative hash algorithms
# that are not actually used.
CFLAGS-hash_func.c := -Wno-unused
# The db code outsmarts the compiler frequently.
override CFLAGS += -Wno-uninitialized
+3 -3
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -21,11 +21,11 @@
#
subdir := dirent
headers := dirent.h
headers := dirent.h direntry.h
routines := opendir closedir readdir rewinddir \
seekdir telldir scandir alphasort \
getdents dirfd
distribute := direct.h dirstream.h
distribute := dirstream.h
tests := list tst-seekdir
+36 -18
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
@@ -29,30 +29,48 @@ __BEGIN_DECLS
#include <gnu/types.h>
/* This file defines `struct dirent'.
/* Directory entry structure.
It defines the macro `_DIRENT_HAVE_D_NAMLEN' iff there is a `d_namlen'
member that gives the length of `d_name'.
This structure is laid out identically to the `struct direct' that
represents directory entries in the GNU Hurd and in BSD 4.4 (and
incidentally, on disk in the Berkeley fast file system). The `readdir'
implementations for GNU and BSD know this; you must change them if you
change this structure. */
It defines the macro `_DIRENT_HAVE_D_RECLEN' iff there is a `d_reclen'
member that gives the size of the entire directory entry. */
struct dirent
{
__ino_t d_fileno; /* File serial number. */
unsigned short int d_reclen; /* Length of the whole `struct dirent'. */
unsigned char d_type; /* File type, possibly unknown. */
unsigned char d_namlen; /* Length of the file name. */
/* Only this member is in the POSIX standard. */
char d_name[1]; /* File name (actually longer). */
};
#include <direntry.h>
#if defined(__USE_BSD) || defined(__USE_MISC)
#define d_ino d_fileno /* Backward compatibility. */
#endif
/* These macros extract size information from a `struct dirent *'.
They may evaluate their argument multiple times, so it must not
have side effects. Each of these may involve a relatively costly
call to `strlen' on some systems, so these values should be cached.
_D_EXACT_NAMLEN (DP) returns the length of DP->d_name, not including
its terminating null character.
_D_ALLOC_NAMLEN (DP) returns a size at least (_D_EXACT_NAMLEN (DP) + 1);
that is, the allocation size needed to hold the DP->d_name string.
Use this macro when you don't need the exact length, just an upper bound.
This macro is less likely to require calling `strlen' than _D_EXACT_NAMLEN.
*/
#ifdef _DIRENT_HAVE_D_NAMLEN
#define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
#define _D_ALLOC_NAMLEN(d) (_D_EXACT_NAMLEN (d) + 1)
#else
#define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
#ifdef _DIRENT_HAVE_D_RECLEN
#define _D_ALLOC_NAMLEN(d) (((char *) (d) + (d)->d_reclen) - &(d)->d_name[0])
#else
#define _D_ALLOC_NAMLEN(d) (sizeof (d)->d_name > 1 ? sizeof (d)->d_name : \
_D_EXACT_NAMLEN (d) + 1)
#endif
#endif
#ifdef __USE_BSD
/* File types for `d_type'. */
enum
+1 -1
View File
@@ -64,7 +64,7 @@ DEFUN(scandir, (dir, namelist, select, cmp),
v = new;
}
dsize = &d->d_name[d->d_namlen + 1] - (char *) d;
dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d;
v[i] = (struct dirent *) malloc (dsize);
if (v[i] == NULL)
goto lose;
+3 -1
View File
@@ -14,7 +14,7 @@ main ()
dirp = opendir(".");
for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
{
/* save position 3 (fourth entry) */
/* save position 3 (after fourth entry) */
if (i++ == 3)
save3 = telldir(dirp);
@@ -26,6 +26,8 @@ main ()
break;
}
printf("going back past 4-th entry...\n");
/* go back to saved entry */
seekdir (dirp, save3);
+13 -5
View File
@@ -1,6 +1,6 @@
# Makefile for elf subdirectory of GNU C Library.
# Copyright (C) 1995 Free Software Foundation, Inc.
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -33,6 +33,8 @@ rtld-routines := rtld $(addprefix dl-,minimal load lookup object reloc \
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h \
soinit.c sofini.c ldd.sh.in linux-compat.c
all: # Make this the default target; it will be defined in Rules.
include ../Makeconfig
ifeq (yes,$(build-shared))
@@ -59,9 +61,15 @@ $(objpfx)librtld.so: $(rtld-routines:%=$(objpfx)%.so) \
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
'-Wl,-(' $^ -lgcc '-Wl,-)'
$(objpfx)ld.so $(objpfx)ld-linux.so.1: $(objpfx)librtld.so
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
-Wl,-rpath=$(default-rpath) $^
$(objpfx)ld.so: $(objpfx)librtld.so
$(rtld-link) -Wl,-soname=$(rtld-installed-name)
$(objpfx)ld-linux.so.1: $(objpfx)librtld.so
$(rtld-link) -Wl,-soname=ld-linux.so.1
define rtld-link
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
-Wl,-rpath=$(default-rpath) $^
endef
# The Linux-compatible dynamic linker shared object is just the same
# with one object file of compatibility initialization code added.
@@ -72,7 +80,7 @@ $(objpfx)libdl.so: $(objpfx)libdl_pic.a $(common-objpfx)libc.so $(objpfx)ld.so
$(patsubst %/,cd %;,$(objpfx)) \
$(LINK.o) -shared -o $(@:$(objpfx)%=%) \
$(LDFLAGS.so) $(LDFLAGS-dl.so) \
-Wl,--whole-archive $(^:$(objpfx)%=%)
-Wl,--whole-archive $(^:$(objpfx)%=%) $(no-whole-archive)
$(slibdir)/$(rtld-installed-name): $(objpfx)ld.so; $(do-install-program)
$(slibdir)/ld-linux.so.1: $(objpfx)ld-linux.so.1; $(do-install-program)
+1 -2
View File
@@ -430,8 +430,7 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname)
}
}
if (type == ET_EXEC)
l->l_type = lt_executable;
l->l_type = type == ET_EXEC ? lt_executable : lt_library;
if (l->l_ld == 0)
{
+108
View File
@@ -0,0 +1,108 @@
/* On-demand PLT fixup for shared objects.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <link.h>
#include "dynamic-link.h"
/* Figure out the right type, Rel or Rela. */
#define elf_machine_rel 1
#define elf_machine_rela 2
#if elf_machine_relplt == elf_machine_rel
#define PLTREL Elf32_Rel
#elif elf_machine_relplt == elf_machine_rela
#define PLTREL Elf32_Rela
#else
#error "dl-machine.h bug: elf_machine_relplt not rel or rela"
#endif
#undef elf_machine_rel
#undef elf_machine_rela
/* We need to define the function as a local symbol so that the reference
in the trampoline code will be a local PC-relative call. Tell the
compiler not to worry that the function appears not to be called. */
static Elf32_Addr fixup (
#ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
ELF_MACHINE_RUNTIME_FIXUP_ARGS,
#endif
struct link_map *l, Elf32_Word reloc_offset)
__attribute__ ((unused));
/* This function is called through a special trampoline from the PLT the
first time each PLT entry is called. We must perform the relocation
specified in the PLT of the given shared object, and return the resolved
function address to the trampoline, which will restart the original call
to that address. Future calls will bounce directly from the PLT to the
function. */
static Elf32_Addr
fixup (
#ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
ELF_MACHINE_RUNTIME_FIXUP_ARGS,
#endif
struct link_map *l, Elf32_Word reloc_offset)
{
const Elf32_Sym *const symtab
= (const Elf32_Sym *) (l->l_addr + l->l_info[DT_SYMTAB]->d_un.d_ptr);
const char *strtab =
(const char *) (l->l_addr + l->l_info[DT_STRTAB]->d_un.d_ptr);
const PLTREL *const reloc
= (const void *) (l->l_addr + l->l_info[DT_JMPREL]->d_un.d_ptr +
reloc_offset);
const Elf32_Sym *definer;
Elf32_Addr loadbase;
struct link_map *scope, *real_next;
/* Look up the symbol's run-time value. */
real_next = l->l_next;
if (l->l_info[DT_SYMBOLIC])
{
l->l_next = _dl_loaded;
if (l->l_prev)
l->l_prev->l_next = real_next;
scope = l;
}
else
scope = _dl_loaded;
definer = &symtab[ELF32_R_SYM (reloc->r_info)];
loadbase = _dl_lookup_symbol (strtab + definer->st_name, &definer,
scope, l->l_name, 0);
/* Restore list frobnication done above for DT_SYMBOLIC. */
l->l_next = real_next;
if (l->l_prev)
l->l_prev->l_next = l;
/* Apply the relocation with that value. */
elf_machine_relplt (l, reloc, loadbase, definer);
return *(Elf32_Addr *) (l->l_addr + reloc->r_offset);
}
/* This macro is defined in dl-machine.h to define the entry point called
by the PLT. The `fixup' function above does the real work, but a little
more twiddling is needed to get the stack right and jump to the address
finally resolved. */
ELF_MACHINE_RUNTIME_TRAMPOLINE
+2 -2
View File
@@ -1,5 +1,5 @@
/* Inline functions for dynamic linking.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,7 +43,7 @@ elf_get_dynamic_info (Elf32_Dyn *dyn, Elf32_Dyn *info[DT_NUM + DT_PROCNUM])
dyn->d_tag < DT_LOPROC + DT_PROCNUM)
info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
else
assert (! "bad dynamic tag");
assert (! "bad dynamic tag");
dyn++;
}
+32 -4
View File
@@ -412,12 +412,12 @@ typedef struct
typedef struct
{
int a_type; /* Entry type */
int a_type; /* Entry type */
union
{
long a_val; /* Integer value */
void *a_ptr; /* Pointer value */
void (*a_fcn) (); /* Function pointer value */
long int a_val; /* Integer value */
void *a_ptr; /* Pointer value */
void (*a_fcn) (void); /* Function pointer value */
} a_un;
} Elf32_auxv_t;
@@ -439,6 +439,34 @@ typedef struct
#define AT_GID 13 /* Real gid */
#define AT_EGID 14 /* Effective gid */
/* Motorola 68k specific definitions. */
/* m68k relocs. */
#define R_68K_NONE 0 /* No reloc */
#define R_68K_32 1 /* Direct 32 bit */
#define R_68K_16 2 /* Direct 16 bit */
#define R_68K_8 3 /* Direct 8 bit */
#define R_68K_PC32 4 /* PC relative 32 bit */
#define R_68K_PC16 5 /* PC relative 16 bit */
#define R_68K_PC8 6 /* PC relative 8 bit */
#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */
#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */
#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */
#define R_68K_GOT32O 10 /* 32 bit GOT offset */
#define R_68K_GOT16O 11 /* 16 bit GOT offset */
#define R_68K_GOT8O 12 /* 8 bit GOT offset */
#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */
#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */
#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */
#define R_68K_PLT32O 16 /* 32 bit PLT offset */
#define R_68K_PLT16O 17 /* 16 bit PLT offset */
#define R_68K_PLT8O 18 /* 8 bit PLT offset */
#define R_68K_COPY 19 /* Copy symbol at runtime */
#define R_68K_GLOB_DAT 20 /* Create GOT entry */
#define R_68K_JMP_SLOT 21 /* Create PLT entry */
#define R_68K_RELATIVE 22 /* Adjust by program base */
/* Intel 80386 specific definitions. */
/* i386 relocs. */
+23 -11
View File
@@ -1,5 +1,5 @@
/* Run time dynamic linker.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -269,7 +269,6 @@ of this helper program; chances are you did not intend to run this program.\n",
{
struct link_map *new;
new = _dl_map_object (l, strtab + d->d_un.d_val);
new->l_type = lt_library;
if (!before_rtld && new == &rtld_map)
before_rtld = last;
last = new;
@@ -340,23 +339,36 @@ of this helper program; chances are you did not intend to run this program.\n",
lazy = !_dl_secure && *(getenv ("LD_BIND_NOW") ?: "") == '\0';
/* Do any necessary cleanups for the startup OS interface code.
We do these now so that no calls are made after real relocation
which might be resolved to different functions than we expect. */
_dl_sysdep_start_cleanup ();
/* Now we have all the objects loaded. Relocate them all.
We do this in reverse order so that copy relocs of earlier
objects overwrite the data written by later objects. */
/* Now we have all the objects loaded. Relocate them all except for
the dynamic linker itself. We do this in reverse order so that
copy relocs of earlier objects overwrite the data written by later
objects. We do not re-relocate the dynamic linker itself in this
loop because that could result in the GOT entries for functions we
call being changed, and that would break us. It is safe to
relocate the dynamic linker out of order because it has no copy
relocs (we know that because it is self-contained). */
l = _dl_loaded;
while (l->l_next)
l = l->l_next;
do
{
_dl_relocate_object (l, lazy);
if (l != &rtld_map)
_dl_relocate_object (l, lazy);
l = l->l_prev;
} while (l);
/* Do any necessary cleanups for the startup OS interface code.
We do these now so that no calls are made after rtld re-relocation
which might be resolved to different functions than we expect.
We cannot do this before relocating the other objects because
_dl_relocate_object might need to call `mprotect' for DT_TEXTREL. */
_dl_sysdep_start_cleanup ();
if (rtld_map.l_opencount > 0)
/* There was an explicit ref to the dynamic linker as a shared lib.
Re-relocate ourselves with user-controlled symbol definitions. */
_dl_relocate_object (&rtld_map, lazy);
/* Tell the debugger where to find the map of loaded objects. */
dl_r_debug.r_version = 1 /* R_DEBUG_VERSION XXX */;
dl_r_debug.r_ldbase = rtld_map.l_addr; /* Record our load address. */
+1 -1
View File
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
+3 -3
View File
@@ -19,10 +19,10 @@ extra-objs := $(extra-objs)
install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
extra-objs += $(foreach o,$(object-suffixes-$(lib)),$($(lib)-routines:=$o))
alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
$(objpfx)$(patsubst %,$(libtype$o),\
$(common-objpfx)$(patsubst %,$(libtype$o),\
$(lib:lib%=%)))
ifneq (,$(filter .so,$(object-suffixes-$(lib))))
alltypes-$(lib) += $(objpfx)$(lib).so
alltypes-$(lib) += $(common-objpfx)$(lib).so
endif
ifeq (,$($(lib)-no-lib-dep))
@@ -33,7 +33,7 @@ endif
# Use o-iterator.mk to generate a rule for each flavor of library.
define o-iterator-doit
$(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$(common-objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
$($(lib)-routines:%=$(objpfx)%$o); $$(build-extra-lib)
endef
object-suffixes-left = $(object-suffixes-$(lib))
+5 -11
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@ Cambridge, MA 02139, USA. */
_GNU_SOURCE All of the above, plus GNU extensions.
The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
If none of these are defined, the default is _GNU_SOURCE.
If none of these are defined, the default is all but _GNU_SOURCE.
If more than one of these are defined, they accumulate.
For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE
together give you ANSI C, 1003.1, and 1003.2, but nothing else.
@@ -69,20 +69,14 @@ Cambridge, MA 02139, USA. */
#undef __FAVOR_BSD
/* If nothing is defined, define _GNU_SOURCE. */
#if (!defined(_GNU_SOURCE) && !defined(__STRICT_ANSI__) && \
!defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_BSD_SOURCE) && !defined(_SVID_SOURCE))
#define _GNU_SOURCE 1
#endif
/* Always use ANSI things. */
#define __USE_ANSI 1
/* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */
#ifdef _BSD_SOURCE
#if defined (_BSD_SOURCE) && \
!(defined (_POSIX_SOURCE) || defined (_POSIX_C_SOURCE) || \
defined (_GNU_SOURCE) || defined (_SVID_SOURCE))
#define __FAVOR_BSD 1
#endif
+12 -4
View File
@@ -21,9 +21,9 @@
#
subdir := gmon
headers := sys/gmon.h machine-gmon.h
routines := gmon mcount profil
headers := sys/gmon.h sys/gmon_out.h
distribute := machine-gmon.h
routines := gmon mcount profil bb_init_func bb_exit_func
include ../Rules
@@ -32,6 +32,14 @@ CFLAGS-mcount.c := -fno-omit-frame-pointer
# We cannot compile mcount.c with -pg because that would
# create resursive calls. Just copy the normal static object.
$(objpfx)mcount.po: $(objpfx)mcount.o
# On systems where `profil' is not a system call, the same
# problem exists for the internal functions in profil.c.
noprof := mcount
ifeq (,$(filter profil,$(unix-syscalls)))
noprof += profil
endif
$(noprof:%=$(objpfx)%.po): %.po: %.o
rm -f $@
ln $< $@
+78
View File
@@ -0,0 +1,78 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* __bb_exit_func() dumps all the basic-block statistics linked into
the bb_head chain to .d files. */
#include <sys/gmon_out.h>
#include <sys/types.h>
#include <ansidecl.h>
#include <stdio.h>
#include <strings.h>
/* structure emitted by -a */
struct bb {
long zero_word;
const char *filename;
long *counts;
long ncounts;
struct bb *next;
const unsigned long *addresses;
};
extern struct bb *__bb_head; /* from gmon.c */
#define OUT_NAME "gmon.out"
void
DEFUN_VOID(__bb_exit_func)
{
const int version = GMON_VERSION;
struct gmon_hdr ghdr;
struct bb *ptr;
FILE *fp;
fp = fopen(OUT_NAME, "wb");
if (!fp)
{
perror(OUT_NAME);
return;
}
bcopy(GMON_MAGIC, &ghdr.cookie[0], 4);
bcopy(&version, &ghdr.version, sizeof(version));
fwrite(&ghdr, sizeof(ghdr), 1, fp);
for (ptr = __bb_head; ptr != 0; ptr = ptr->next) {
u_int ncounts = ptr->ncounts;
u_char tag;
u_int i;
tag = GMON_TAG_BB_COUNT;
fwrite(&tag, sizeof(tag), 1, fp);
fwrite(&ncounts, sizeof(ncounts), 1, fp);
for (i = 0; i < ncounts; ++i) {
fwrite(&ptr->addresses[i], sizeof(ptr->addresses[0]), 1, fp);
fwrite(&ptr->counts[i], sizeof(ptr->counts[0]), 1, fp);
}
}
fclose (fp);
}
+223 -165
View File
@@ -30,161 +30,53 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#if !defined(lint) && defined(LIBC_SCCS)
static char sccsid[] = "@(#)gmon.c 8.1 (Berkeley) 6/4/93";
#endif
#include <sys/param.h>
#include <sys/time.h>
#include <sys/gmon.h>
#include <sys/gmon_out.h>
#include <ansidecl.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
struct __bb *__bb_head; /* Head of basic-block list or NULL. */
struct gmonparam _gmonparam = { GMON_PROF_OFF };
/*
* See profil(2) where this is described:
*/
static int s_scale;
/* see profil(2) where this is describe (incorrectly) */
#define SCALE_1_TO_1 0x10000L
#define ERR(s) write(2, s, sizeof(s) - 1)
#define ERR(s) write(2, s, sizeof(s))
void moncontrol __P((int));
static int hertz __P((void));
void
monstartup(lowpc, highpc)
u_long lowpc;
u_long highpc;
/*
* Discover the tick frequency of the machine if something goes wrong,
* we return 0, an impossible hertz.
*/
static int
DEFUN_VOID(hertz)
{
register int o;
char *cp;
struct gmonparam *p = &_gmonparam;
/*
* round lowpc and highpc to multiples of the density we're using
* so the rest of the scaling (here and in gprof) stays in ints.
*/
p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));
p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));
p->textsize = p->highpc - p->lowpc;
p->kcountsize = p->textsize / HISTFRACTION;
p->hashfraction = HASHFRACTION;
p->fromssize = p->textsize / HASHFRACTION;
p->tolimit = p->textsize * ARCDENSITY / 100;
if (p->tolimit < MINARCS)
p->tolimit = MINARCS;
else if (p->tolimit > MAXARCS)
p->tolimit = MAXARCS;
p->tossize = p->tolimit * sizeof(struct tostruct);
cp = malloc (p->kcountsize + p->fromssize + p->tossize);
if (! cp) {
ERR("monstartup: out of memory\n");
return;
}
bzero(cp, p->kcountsize + p->fromssize + p->tossize);
p->tos = (struct tostruct *)cp;
cp += p->tossize;
p->kcount = (u_short *)cp;
cp += p->kcountsize;
p->froms = (u_short *)cp;
p->tos[0].link = 0;
o = p->highpc - p->lowpc;
if (p->kcountsize < o) {
#ifndef hp300
s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
#else /* avoid floating point */
int quot = o / p->kcountsize;
if (quot >= 0x10000)
s_scale = 1;
else if (quot >= 0x100)
s_scale = 0x10000 / quot;
else if (o >= 0x800000)
s_scale = 0x1000000 / (o / (p->kcountsize >> 8));
else
s_scale = 0x1000000 / ((o << 8) / p->kcountsize);
#endif
} else
s_scale = SCALE_1_TO_1;
moncontrol(1);
struct itimerval tim;
tim.it_interval.tv_sec = 0;
tim.it_interval.tv_usec = 1;
tim.it_value.tv_sec = 0;
tim.it_value.tv_usec = 0;
setitimer(ITIMER_REAL, &tim, 0);
setitimer(ITIMER_REAL, 0, &tim);
if (tim.it_interval.tv_usec < 2)
return 0;
return (1000000 / tim.it_interval.tv_usec);
}
void
_mcleanup()
{
int fd;
int fromindex;
int endfrom;
u_long frompc;
int toindex;
struct rawarc rawarc;
struct gmonparam *p = &_gmonparam;
struct gmonhdr gmonhdr, *hdr;
#ifdef DEBUG
int log, len;
char buf[200];
#endif
if (p->state == GMON_PROF_ERROR)
ERR("_mcleanup: tos overflow\n");
moncontrol(0);
fd = open("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
if (fd < 0) {
perror("mcount: gmon.out");
return;
}
#ifdef DEBUG
log = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664);
if (log < 0) {
perror("mcount: gmon.log");
return;
}
len = sprintf(buf, "[mcleanup1] kcount 0x%x ssiz %d\n",
p->kcount, p->kcountsize);
write(log, buf, len);
#endif
hdr = (struct gmonhdr *)&gmonhdr;
hdr->lpc = p->lowpc;
hdr->hpc = p->highpc;
hdr->ncnt = p->kcountsize + sizeof(gmonhdr);
hdr->version = GMONVERSION;
hdr->profrate = hertz();
write(fd, (char *)hdr, sizeof *hdr);
write(fd, p->kcount, p->kcountsize);
endfrom = p->fromssize / sizeof(*p->froms);
for (fromindex = 0; fromindex < endfrom; fromindex++) {
if (p->froms[fromindex] == 0)
continue;
frompc = p->lowpc;
frompc += fromindex * p->hashfraction * sizeof(*p->froms);
for (toindex = p->froms[fromindex]; toindex != 0;
toindex = p->tos[toindex].link) {
#ifdef DEBUG
len = sprintf(buf,
"[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" ,
frompc, p->tos[toindex].selfpc,
p->tos[toindex].count);
write(log, buf, len);
#endif
rawarc.raw_frompc = frompc;
rawarc.raw_selfpc = p->tos[toindex].selfpc;
rawarc.raw_count = p->tos[toindex].count;
write(fd, &rawarc, sizeof rawarc);
}
}
close(fd);
}
/*
* Control profiling
@@ -192,41 +84,207 @@ _mcleanup()
* all the data structures are ready.
*/
void
moncontrol(mode)
int mode;
DEFUN(moncontrol, (mode), int mode)
{
struct gmonparam *p = &_gmonparam;
struct gmonparam *p = &_gmonparam;
if (mode) {
/* start */
profil(p->kcount, p->kcountsize, (int)p->lowpc,
s_scale);
p->state = GMON_PROF_ON;
} else {
/* stop */
profil(0, 0, 0, 0);
p->state = GMON_PROF_OFF;
if (mode)
{
/* start */
profil((void *) p->kcount, p->kcountsize, p->lowpc, s_scale);
p->state = GMON_PROF_ON;
}
else
{
/* stop */
profil((void *) 0, 0, 0, 0);
p->state = GMON_PROF_OFF;
}
}
void
DEFUN(monstartup, (lowpc, highpc), u_long lowpc AND u_long highpc)
{
register int o;
char *cp;
struct gmonparam *p = &_gmonparam;
/*
* round lowpc and highpc to multiples of the density we're using
* so the rest of the scaling (here and in gprof) stays in ints.
*/
p->lowpc = ROUNDDOWN(lowpc, HISTFRACTION * sizeof(HISTCOUNTER));
p->highpc = ROUNDUP(highpc, HISTFRACTION * sizeof(HISTCOUNTER));
p->textsize = p->highpc - p->lowpc;
p->kcountsize = p->textsize / HISTFRACTION;
p->hashfraction = HASHFRACTION;
p->log_hashfraction = -1;
if ((HASHFRACTION & (HASHFRACTION - 1)) == 0) {
/* if HASHFRACTION is a power of two, mcount can use shifting
instead of integer division. Precompute shift amount. */
p->log_hashfraction = ffs(p->hashfraction * sizeof(*p->froms)) - 1;
}
p->fromssize = p->textsize / HASHFRACTION;
p->tolimit = p->textsize * ARCDENSITY / 100;
if (p->tolimit < MINARCS)
p->tolimit = MINARCS;
else if (p->tolimit > MAXARCS)
p->tolimit = MAXARCS;
p->tossize = p->tolimit * sizeof(struct tostruct);
cp = malloc (p->kcountsize + p->fromssize + p->tossize);
if (! cp)
{
ERR("monstartup: out of memory\n");
return;
}
bzero(cp, p->kcountsize + p->fromssize + p->tossize);
p->tos = (struct tostruct *)cp;
cp += p->tossize;
p->kcount = (u_short *)cp;
cp += p->kcountsize;
p->froms = (u_short *)cp;
p->tos[0].link = 0;
o = p->highpc - p->lowpc;
if (p->kcountsize < o)
{
#ifndef hp300
s_scale = ((float)p->kcountsize / o ) * SCALE_1_TO_1;
#else
/* avoid floating point operations */
int quot = o / p->kcountsize;
if (quot >= 0x10000)
s_scale = 1;
else if (quot >= 0x100)
s_scale = 0x10000 / quot;
else if (o >= 0x800000)
s_scale = 0x1000000 / (o / (p->kcountsize >> 8));
else
s_scale = 0x1000000 / ((o << 8) / p->kcountsize);
#endif
} else
s_scale = SCALE_1_TO_1;
moncontrol(1);
}
static void
DEFUN(write_hist, (fd), int fd)
{
const u_char tag = GMON_TAG_TIME_HIST;
struct gmon_hist_hdr thdr;
int size, rate;
if (_gmonparam.kcountsize > 0)
{
size = _gmonparam.kcountsize / sizeof(HISTCOUNTER);
rate = hertz();
bcopy(&_gmonparam.lowpc, &thdr.low_pc, sizeof(thdr.low_pc));
bcopy(&_gmonparam.highpc, &thdr.high_pc, sizeof(thdr.high_pc));
bcopy(&size, &thdr.hist_size, sizeof(thdr.hist_size));
bcopy(&rate, &thdr.prof_rate, sizeof(thdr.prof_rate));
strcpy(thdr.dimen, "seconds");
thdr.dimen_abbrev = 's';
write(fd, &tag, sizeof(tag));
write(fd, &thdr, sizeof(thdr));
write(fd, _gmonparam.kcount, _gmonparam.kcountsize);
}
}
static void
DEFUN(write_call_graph, (fd), int fd)
{
const u_char tag = GMON_TAG_CG_ARC;
struct gmon_cg_arc_record raw_arc;
int from_index, to_index, from_len;
u_long frompc;
from_len = _gmonparam.fromssize / sizeof(*_gmonparam.froms);
for (from_index = 0; from_index < from_len; ++from_index)
{
if (_gmonparam.froms[from_index] == 0)
continue;
frompc = _gmonparam.lowpc;
frompc += (from_index * _gmonparam.hashfraction
* sizeof(*_gmonparam.froms));
for (to_index = _gmonparam.froms[from_index];
to_index != 0;
to_index = _gmonparam.tos[to_index].link)
{
bcopy(&frompc, &raw_arc.from_pc, sizeof(raw_arc.from_pc));
bcopy(&_gmonparam.tos[to_index].selfpc, &raw_arc.self_pc,
sizeof(raw_arc.self_pc));
bcopy(&_gmonparam.tos[to_index].count, &raw_arc.count,
sizeof(raw_arc.count));
write(fd, &tag, sizeof(tag));
write(fd, &raw_arc, sizeof(raw_arc));
}
}
}
/*
* discover the tick frequency of the machine
* if something goes wrong, we return 0, an impossible hertz.
*/
static int
hertz()
static void
DEFUN(write_bb_counts, (fd), int fd)
{
struct itimerval tim;
tim.it_interval.tv_sec = 0;
tim.it_interval.tv_usec = 1;
tim.it_value.tv_sec = 0;
tim.it_value.tv_usec = 0;
setitimer(ITIMER_REAL, &tim, 0);
setitimer(ITIMER_REAL, 0, &tim);
if (tim.it_interval.tv_usec < 2)
return(0);
return (1000000 / tim.it_interval.tv_usec);
struct __bb *grp;
const u_char tag = GMON_TAG_BB_COUNT;
int ncounts;
int i;
/* Write each group of basic-block info (all basic-blocks in a
compilation unit form a single group). */
for (grp = __bb_head; grp; grp = grp->next)
{
ncounts = grp->ncounts;
write(fd, &tag, sizeof(tag));
write(fd, &ncounts, sizeof(ncounts));
for (i = 0; i < ncounts; ++i)
{
write(fd, &grp->addresses[i], sizeof(grp->addresses[0]));
write(fd, &grp->counts[i], sizeof(grp->counts[0]));
}
}
}
void
DEFUN_VOID(_mcleanup)
{
const int version = GMON_VERSION;
struct gmon_hdr ghdr;
int fd;
moncontrol(0);
fd = open("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
if (fd < 0)
{
perror("_mcleanup: gmon.out");
return;
}
/* write gmon.out header: */
bcopy(GMON_MAGIC, &ghdr.cookie[0], 4);
bcopy(&version, &ghdr.version, sizeof(version));
write(fd, &ghdr, sizeof(ghdr));
/* write PC histogram: */
write_hist(fd);
/* write call-graph: */
write_call_graph(fd);
/* write basic-block execution counts: */
write_bb_counts(fd);
close(fd);
}
+14 -3
View File
@@ -38,6 +38,10 @@ static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
#include <sys/param.h>
#include <sys/gmon.h>
/* This file provides the machine-dependent definitions of the _MCOUNT_DECL
and MCOUNT macros. */
#include "machine-gmon.h"
/*
* mcount is called on entry to each function compiled with the profiling
* switch set. _mcount(), which is declared in a machine-dependent way
@@ -48,7 +52,7 @@ static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
* _mcount updates data structures that represent traversals of the
* program's call graph edges. frompc and selfpc are the return
* address and function address that represents the given call graph edge.
*
*
* Note: the original BSD code used the same variable (frompcindex) for
* both frompcindex and frompc. Any reasonable, modern compiler will
* perform this optimization.
@@ -63,6 +67,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
#ifdef KERNEL
register int s;
#endif
int i;
p = &_gmonparam;
/*
@@ -85,7 +90,13 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
if (frompc > p->textsize)
goto done;
frompcindex = &p->froms[frompc / (p->hashfraction * sizeof(*p->froms))];
/* avoid integer divide if possible: */
if (p->log_hashfraction >= 0) {
i = frompc >> p->log_hashfraction;
} else {
i = frompc / (p->hashfraction * sizeof(*p->froms));
}
frompcindex = &p->froms[i];
toindex = *frompcindex;
if (toindex == 0) {
/*
@@ -154,7 +165,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
*frompcindex = toindex;
goto done;
}
}
done:
#ifdef KERNEL
+16 -10
View File
@@ -37,20 +37,25 @@
#define _SYS_GMON_H_
#include <sys/cdefs.h>
#include <machine-gmon.h>
/*
* Structure prepended to gmon.out profiling data file.
* See gmon_out.h for gmon.out format.
*/
struct gmonhdr {
u_long lpc; /* base pc address of sample buffer */
u_long hpc; /* max pc address of sampled buffer */
int ncnt; /* size of sample buffer (plus this header) */
int version; /* version number */
int profrate; /* profiling clock rate */
int spare[3]; /* reserved */
/* structure emitted by "gcc -a". This must match struct bb in
gcc/libgcc2.c. It is OK for gcc to declare a longer structure as
long as the members below are present. */
struct __bb
{
long zero_word;
const char *filename;
long *counts;
long ncounts;
struct __bb *next;
const unsigned long *addresses;
};
#define GMONVERSION 0x00051879
extern struct __bb *__bb_head;
/*
* histogram counters are unsigned shorts (according to the kernel).
@@ -138,6 +143,7 @@ struct gmonparam {
u_long highpc;
u_long textsize;
u_long hashfraction;
long log_hashfraction;
};
extern struct gmonparam _gmonparam;
+66
View File
@@ -0,0 +1,66 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
Contributed by David Mosberger (davidm@cs.arizona.edu).
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* This file specifies the format of gmon.out files. It should have
as few external dependencies as possible as it is going to be included
in many different programs. That is, minimize the number of #include's.
A gmon.out file consists of a header (defined by gmon_hdr) followed by
a sequence of records. Each record starts with a one-byte tag
identifying the type of records, followed by records specific data. */
#ifndef _SYS_GMON_OUT_H_
#define _SYS_GMON_OUT_H_
#define GMON_MAGIC "gmon" /* magic cookie */
#define GMON_VERSION 1 /* version number */
/*
* Raw header as it appears on file (without padding). This header
* always comes first in gmon.out and is then followed by a series
* records defined below.
*/
struct gmon_hdr {
char cookie[4];
char version[4];
char spare[3 * 4];
};
/* types of records in this file: */
typedef enum {
GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2
} GMON_Record_Tag;
struct gmon_hist_hdr {
char low_pc[sizeof (char *)]; /* base pc address of sample buffer */
char high_pc[sizeof (char *)]; /* max pc address of sampled buffer */
char hist_size[4]; /* size of sample buffer */
char prof_rate[4]; /* profiling clock rate */
char dimen[15]; /* phys. dim., usually "seconds" */
char dimen_abbrev; /* usually 's' for "seconds" */
};
struct gmon_cg_arc_record {
char from_pc[sizeof (char *)]; /* address within caller's body */
char self_pc[sizeof (char *)]; /* address within callee's body */
char count[4]; /* number of arc traversals */
};
#endif /* !_SYS_GMON_OUT_H_ */
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
+2 -2
View File
@@ -37,7 +37,7 @@ user-interfaces := $(addprefix hurd/,\
process process_request \
msg msg_reply msg_request \
exec exec_startup crash interrupt \
fs fsys io term socket ifsock)
fs fsys io term tioctl socket ifsock)
server-interfaces := hurd/msg
routines = hurdstartup hurdinit \
@@ -51,7 +51,7 @@ routines = hurdstartup hurdinit \
fopenport \
vpprintf \
ports-get ports-set hurdports hurdmsg \
$(sig) $(dtable) hurdinline port-cleanup # report-wait
$(sig) $(dtable) hurdinline port-cleanup report-wait
sig = hurdsig hurdfault faultexc siginfo hurd-raise preempt-sig \
trampoline longjmp-ts catch-exc exc2signal hurdkill sigunwind \
thread-self thread-cancel intr-msg catch-signal
+79
View File
@@ -85,3 +85,82 @@ hurd_safe_memset (void *dest, int byte, size_t nbytes)
(vm_address_t) dest, (vm_address_t) dest + nbytes,
&operate, SIG_ERR);
}
error_t
hurd_safe_copyout (void *dest, const void *src, size_t nbytes)
{
error_t operate (struct hurd_signal_preempter *preempter)
{
memcpy (dest, src, nbytes);
return 0;
}
return hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
(vm_address_t) dest, (vm_address_t) dest + nbytes,
&operate, SIG_ERR);
}
error_t
hurd_safe_copyin (void *dest, const void *src, size_t nbytes)
{
error_t operate (struct hurd_signal_preempter *preempter)
{
memcpy (dest, src, nbytes);
return 0;
}
return hurd_catch_signal (sigmask (SIGBUS) | sigmask (SIGSEGV),
(vm_address_t) src, (vm_address_t) src + nbytes,
&operate, SIG_ERR);
}
error_t
hurd_safe_memmove (void *dest, const void *src, size_t nbytes)
{
jmp_buf buf;
void throw (int signo, long int sigcode, struct sigcontext *scp)
{ longjmp (buf, scp->sc_error ?: EGRATUITOUS); }
struct hurd_signal_preempter src_preempter =
{
sigmask (SIGBUS) | sigmask (SIGSEGV),
(vm_address_t) src, (vm_address_t) src + nbytes,
NULL, (sighandler_t) &throw,
};
struct hurd_signal_preempter dest_preempter =
{
sigmask (SIGBUS) | sigmask (SIGSEGV),
(vm_address_t) dest, (vm_address_t) dest + nbytes,
NULL, (sighandler_t) &throw,
&src_preempter
};
struct hurd_sigstate *const ss = _hurd_self_sigstate ();
error_t error;
/* This returns again with nonzero value when we preempt a signal. */
error = setjmp (buf);
if (error == 0)
{
/* Install a signal preempter for the thread. */
__spin_lock (&ss->lock);
src_preempter.next = ss->preempters;
ss->preempters = &dest_preempter;
__spin_unlock (&ss->lock);
/* Do the copy; it might fault. */
memmove (dest, src, nbytes);
}
/* Either memmove completed happily and ERROR is still zero, or it hit
an expected signal and `throw' made setjmp return the signal error
code in ERROR. Now we can remove the preempter and return. */
__spin_lock (&ss->lock);
assert (ss->preempters == &dest_preempter);
ss->preempters = src_preempter.next;
__spin_unlock (&ss->lock);
return error;
}
+6 -4
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,9 +29,11 @@ DEFUN(fchroot, (fd), int fd)
error_t err;
file_t dir;
err = HURD_DPORT_USE (fd, (dir = __file_name_lookup_under (port, "",
O_EXEC, 0),
errno));
err = HURD_DPORT_USE (fd,
({
dir = __file_name_lookup_under (port, "", O_EXEC, 0);
dir == MACH_PORT_NULL ? errno : 0;
}));
if (! err)
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], dir);
+6 -3
View File
@@ -1,5 +1,5 @@
/* User-registered handlers for specific `ioctl' requests.
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@ Cambridge, MA 02139, USA. */
#define __need___va_list
#include <stdarg.h>
#include <ioctls.h>
/* Type of handler function, called like ioctl to do its entire job. */
@@ -30,7 +31,8 @@ typedef int (*ioctl_handler_t) (int fd, int request, void *arg);
/* Structure that records an ioctl handler. */
struct ioctl_handler
{
int first_request, last_request; /* Range of handled request values. */
/* Range of handled _IOC_NOTYPE (REQUEST) values. */
int first_request, last_request;
/* Handler function, called like ioctl to do its entire job. */
ioctl_handler_t handler;
@@ -54,7 +56,8 @@ extern int hurd_register_ioctl_handler (int first_request, int last_request,
#define _HURD_HANDLE_IOCTLS(handler, first, last) \
static const struct ioctl_handler handler##_ioctl_handler \
__attribute__ ((__unused__)) = \
{ (first), (last), (int (*) (int, int, void *)) (handler), NULL }; \
{ _IOC_NOTYPE (first), _IOC_NOTYPE (last), \
(int (*) (int, int, void *)) (handler), NULL }; \
text_set_element (_hurd_ioctl_handler_lists, ##handler##_ioctl_handler)
/* Define a library-internal handler for a single ioctl command. */
+13 -1
View File
@@ -83,8 +83,20 @@ error_t hurd_catch_signal (sigset_t sigset,
/* Convenience functions using `hurd_catch_signal'. */
error_t hurd_safe_memmove (void *dest, const void *src, size_t nbytes);
/* Like `memset', but catch faults in DEST. */
error_t hurd_safe_memset (void *dest, int byte, size_t nbytes);
/* Like `memcpy', but catch faults in SRC. */
error_t hurd_safe_copyin (void *dest, const void *src, size_t nbytes);
/* Like `memcpy', but catch faults in DEST. */
error_t hurd_safe_copyout (void *dest, const void *src, size_t nbytes);
/* Like `memmove', but catch faults in SRC or DEST.
If only one region is expected to fault, it is more efficient
to use `hurd_safe_copyin' or `hurd_safe_copyout' as appropriate. */
error_t hurd_safe_memmove (void *dest, const void *src, size_t nbytes);
#endif /* hurd/sigpreempt.h */
+17 -5
View File
@@ -113,6 +113,8 @@ _hurdsig_fault_init (void)
struct machine_thread_state state;
mach_port_t sigexc;
/* Allocate a port to receive signal thread exceptions.
We will move this receive right to the proc server. */
err = __mach_port_allocate (__mach_task_self (),
MACH_PORT_RIGHT_RECEIVE, &sigexc);
assert_perror (err);
@@ -120,16 +122,20 @@ _hurdsig_fault_init (void)
MACH_PORT_RIGHT_RECEIVE, &forward_sigexc);
assert_perror (err);
/* Allocate a port to receive the exception msgs forwarded
from the proc server. */
err = __mach_port_insert_right (__mach_task_self (), sigexc,
sigexc, MACH_MSG_TYPE_MAKE_SEND);
assert_perror (err);
#if 0 /* XXX gdb bites */
err = __thread_set_special_port (_hurd_msgport_thread,
THREAD_EXCEPTION_PORT, sigexc);
#endif
__mach_port_deallocate (__mach_task_self (), sigexc);
/* Set the queue limit for this port to just one. The proc server will
notice if we ever get a second exception while one remains queued and
unreceived, and decide we are hopelessly buggy. */
err = __mach_port_set_qlimit (__mach_task_self (), forward_sigexc, 1);
assert_perror (err);
/* This state will be restored when we fault.
It runs the function above. */
memset (&state, 0, sizeof state);
MACHINE_THREAD_STATE_SET_PC (&state, faulted);
MACHINE_THREAD_STATE_SET_SP (&state, faultstack, sizeof faultstack);
@@ -143,5 +149,11 @@ _hurdsig_fault_init (void)
(natural_t *) &state,
MACHINE_THREAD_STATE_COUNT));
assert_perror (err);
/* Direct signal thread exceptions to the proc server. */
err = __thread_set_special_port (_hurd_msgport_thread,
THREAD_EXCEPTION_PORT, sigexc);
__mach_port_deallocate (__mach_task_self (), sigexc);
assert_perror (err);
}
+16 -6
View File
@@ -1,5 +1,5 @@
/* ioctl commands which must be done in the C library.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -36,6 +36,10 @@ _hurd_lookup_ioctl_handler (int request)
void *const *ptr;
const struct ioctl_handler *h;
/* Mask off the type bits, so that we see requests in a single group as a
contiguous block of values. */
request = _IOC_NOTYPE (request);
for (ptr = symbol_set_first_element (_hurd_ioctl_handler_lists);
!symbol_set_end_p (_hurd_ioctl_handler_lists, ptr);
++ptr)
@@ -62,7 +66,7 @@ fioctl (int fd,
switch (request)
{
default:
err = EGRATUITOUS;
err = ENOTTY;
break;
case FIONREAD:
@@ -97,7 +101,7 @@ fioctl (int fd,
break;
}
return err ? __hurd_fail (err) : 0;
return err ? __hurd_dfail (fd, err) : 0;
}
_HURD_HANDLE_IOCTLS (fioctl, FIOGETOWN, FIONREAD);
@@ -112,7 +116,7 @@ fioclex (int fd,
switch (request)
{
default:
return __hurd_fail (EGRATUITOUS);
return __hurd_fail (ENOTTY);
case FIOCLEX:
flag = FD_CLOEXEC;
break;
@@ -126,12 +130,13 @@ fioclex (int fd,
_HURD_HANDLE_IOCTLS (fioclex, FIOCLEX, FIONCLEX);
#include <hurd/term.h>
#include <hurd/tioctl.h>
static void
rectty_dtable (mach_port_t cttyid)
{
int i;
HURD_CRITICAL_BEGIN;
__mutex_lock (&_hurd_dtable_lock);
@@ -222,6 +227,11 @@ tiocsctty (int fd,
else if (err)
return __hurd_fail (err);
/* Change the terminal's pgrp to ours. */
err = HURD_DPORT_USE (fd, __tioctl_tiocspgrp (port, _hurd_pgrp));
if (err)
return __hurd_fail (err);
/* Make it our own. */
_hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], cttyid);
@@ -256,7 +266,7 @@ tiocnotty (int fd,
_hurd_port_set (&_hurd_ports[INIT_PORT_CTTYID], MACH_PORT_NULL);
/* Reset all the ctty ports in all the descriptors. */
__USEPORT (CTTYID, (rectty_dtable (MACH_PORT_NULL), 0));
return 0;
+4 -1
View File
@@ -133,7 +133,10 @@ __hurd_file_name_lookup_retry (error_t (*use_init_port)
#endif
/* An empty RETRYNAME indicates we have the final port. */
if (retryname[0] == '\0')
if (retryname[0] == '\0' &&
/* If reauth'd, we must do one more retry on "" to give the new
translator a chance to make a new port for us. */
doretry == FS_RETRY_NORMAL)
{
/* We got a successful translation. Now apply any open-time
action flags we were passed. */
-7
View File
@@ -449,10 +449,3 @@ _S_msg_set_dtable (mach_port_t process,
kern_return_t
_S_msg_startup_dosync (mach_port_t process)
{ return EOPNOTSUPP; }
kern_return_t
_S_msg_report_wait (mach_port_t process,
mach_port_t thread,
string_t wait_desc,
int *wait_rpc)
{ return EOPNOTSUPP; }
+146
View File
@@ -0,0 +1,146 @@
/* Report on what a thread in our task is waiting for.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <hurd.h>
#include <hurd/signal.h>
#include <hurd/fd.h>
#include <string.h>
#include <assert.h>
#include <hurd/msg_server.h>
#include "thread_state.h"
#include "intr-msg.h"
static void
describe_number (string_t description, const char *flavor, int i)
{
char *p = __stpcpy (description, flavor);
p += i / 10 + 1;
*p = '\0';
do
{
*--p = '0' + i % 10;
i /= 10;
} while (i != 0);
assert (p[-1] == '#');
}
static void
describe_port (string_t description, mach_port_t port)
{
int i;
if (port == __mach_task_self ())
{
strcpy (description, "task-self");
return;
}
for (i = 0; i < _hurd_nports; ++i)
if (port == _hurd_ports[i].port)
{
describe_number (description, "init#", i);
return;
}
if (_hurd_init_dtable)
{
for (i = 0; i < _hurd_init_dtablesize; ++i)
if (port == _hurd_init_dtable[i])
{
describe_number (description, "fd#", i);
return;
}
}
else if (_hurd_dtable)
{
for (i = 0; i < _hurd_dtablesize; ++i)
if (_hurd_dtable[i] == NULL)
continue;
else if (port == _hurd_dtable[i]->port.port)
{
describe_number (description, "fd#", i);
return;
}
else if (port == _hurd_dtable[i]->ctty.port)
{
describe_number (description, "bgfd#", i);
return;
}
}
describe_number (description, "port#", port);
}
kern_return_t
_S_msg_report_wait (mach_port_t msgport, thread_t thread,
string_t description, int *msgid)
{
*msgid = 0;
if (thread == _hurd_msgport_thread)
/* Cute. */
strcpy (description, "msgport");
else
{
/* Make sure this is really one of our threads. */
struct hurd_sigstate *ss;
__mutex_lock (&_hurd_siglock);
for (ss = _hurd_sigstates; ss != NULL; ss = ss->next)
if (ss->thread == thread)
break;
__mutex_unlock (&_hurd_siglock);
if (ss == NULL)
/* To hell with you. */
return EINVAL;
if (ss->suspended != MACH_PORT_NULL)
strcpy (description, "sigsuspend");
else
{
/* Examine the thread's state to see if it is blocked in an RPC. */
struct machine_thread_state state;
mach_msg_type_number_t count = MACHINE_THREAD_STATE_COUNT;
error_t err;
err = __thread_get_state (thread, MACHINE_THREAD_STATE_FLAVOR,
(integer_t *) &state, &count);
if (err)
return err;
assert (count == MACHINE_THREAD_STATE_COUNT);
if (SYSCALL_EXAMINE (&state, msgid))
{
/* Blocked in a system call. */
if (*msgid == -25)
/* mach_msg system call. Examine its parameters. */
describe_port (description, MSG_EXAMINE (&state, msgid));
else
strcpy (description, "kernel");
}
else
description[0] = '\0';
}
}
__mach_port_deallocate (__mach_task_self (), thread);
return 0;
}
+10 -2
View File
@@ -1,5 +1,5 @@
/* longjmp cleanup function for unwinding past signal handlers.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,15 @@ _hurdsig_longjmp_from_handler (void *data, jmp_buf env, int val)
mach_port_t *reply_port =
(mach_port_t *) __hurd_threadvar_location (_HURD_THREADVAR_MIG_REPLY);
if (*reply_port)
__mach_port_destroy (__mach_task_self (), *reply_port);
{
mach_port_t port = *reply_port;
/* Assigning MACH_PORT_DEAD here tells libc's mig_get_reply_port
not to get another reply port, but avoids mig_dealloc_reply_port
trying to deallocate it after the receive fails (which it will,
because the reply port will be bogus, regardless). */
*reply_port = MACH_PORT_DEAD;
__mach_port_destroy (__mach_task_self (), port);
}
*reply_port = scp->sc_reply_port;
}
+6 -5
View File
@@ -39,14 +39,15 @@
/* External definitions for functions in inet(3) */
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
unsigned long inet_addr __P((const char *));
u_int32_t inet_addr __P((const char *));
int inet_aton __P((const char *, struct in_addr *));
unsigned long inet_lnaof __P((struct in_addr));
struct in_addr inet_makeaddr __P((u_long , u_long));
unsigned long inet_netof __P((struct in_addr));
unsigned long inet_network __P((const char *));
u_int32_t inet_lnaof __P((struct in_addr));
struct in_addr inet_makeaddr __P((u_int32_t , u_int32_t));
u_int32_t inet_netof __P((struct in_addr));
u_int32_t inet_network __P((const char *));
char *inet_ntoa __P((struct in_addr));
__END_DECLS
+2 -2
View File
@@ -44,11 +44,11 @@ static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
* internet address; handles class a/b/c network
* number formats.
*/
u_long
u_int32_t
inet_lnaof(in)
struct in_addr in;
{
register u_long i = ntohl(in.s_addr);
register u_int32_t i = ntohl(in.s_addr);
if (IN_CLASSA(i))
return ((i)&IN_CLASSA_HOST);
+2 -2
View File
@@ -45,9 +45,9 @@ static char sccsid[] = "@(#)inet_makeaddr.c 8.1 (Berkeley) 6/4/93";
*/
struct in_addr
inet_makeaddr(net, host)
u_long net, host;
u_int32_t net, host;
{
u_long addr;
u_int32_t addr;
if (net < 128)
addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
+3 -3
View File
@@ -45,13 +45,13 @@ static char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93";
* The library routines call this routine to interpret
* network numbers.
*/
u_long
u_int32_t
inet_network(cp)
register const char *cp;
{
register u_long val, base, n;
register u_int32_t val, base, n;
register char c;
u_long parts[4], *pp = parts;
u_int32_t parts[4], *pp = parts;
register int i;
again:
+2 -2
View File
@@ -43,11 +43,11 @@ static char sccsid[] = "@(#)inet_netof.c 8.1 (Berkeley) 6/4/93";
* Return the network number from an internet
* address; handles class a/b/c network #'s.
*/
u_long
u_int32_t
inet_netof(in)
struct in_addr in;
{
register u_long i = ntohl(in.s_addr);
register u_int32_t i = ntohl(in.s_addr);
if (IN_CLASSA(i))
return (((i)&IN_CLASSA_NET) >> IN_CLASSA_NSHIFT);
+9 -9
View File
@@ -89,7 +89,7 @@ enum
/* Internet address. */
struct in_addr
{
unsigned long int s_addr;
unsigned int s_addr;
};
@@ -98,33 +98,33 @@ struct in_addr
On subnets, host and network parts are found according to
the subnet mask, not these masks. */
#define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0)
#define IN_CLASSA(a) ((((unsigned) (a)) & 0x80000000) == 0)
#define IN_CLASSA_NET 0xff000000
#define IN_CLASSA_NSHIFT 24
#define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET)
#define IN_CLASSA_MAX 128
#define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000)
#define IN_CLASSB(a) ((((unsigned) (a)) & 0xc0000000) == 0x80000000)
#define IN_CLASSB_NET 0xffff0000
#define IN_CLASSB_NSHIFT 16
#define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET)
#define IN_CLASSB_MAX 65536
#define IN_CLASSC(a) ((((long int) (a)) & 0xc0000000) == 0xc0000000)
#define IN_CLASSC(a) ((((unsigned) (a)) & 0xc0000000) == 0xc0000000)
#define IN_CLASSC_NET 0xffffff00
#define IN_CLASSC_NSHIFT 8
#define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET)
#define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000)
#define IN_CLASSD(a) ((((unsigned) (a)) & 0xf0000000) == 0xe0000000)
#define IN_MULTICAST(a) IN_CLASSD(a)
#define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xe0000000) == 0xe0000000)
#define IN_BADCLASS(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000)
#define IN_EXPERIMENTAL(a) ((((unsigned) (a)) & 0xe0000000) == 0xe0000000)
#define IN_BADCLASS(a) ((((unsigned) (a)) & 0xf0000000) == 0xf0000000)
/* Address to accept any incoming messages. */
#define INADDR_ANY ((unsigned long int) 0x00000000)
#define INADDR_ANY ((unsigned) 0x00000000)
/* Address to send to all hosts. */
#define INADDR_BROADCAST ((unsigned long int) 0xffffffff)
#define INADDR_BROADCAST ((unsigned) 0xffffffff)
/* Address indicating an error return. */
#define INADDR_NONE 0xffffffff
+1 -1
View File
@@ -33,7 +33,7 @@
* @(#)tcp.h 8.1 (Berkeley) 6/10/93
*/
typedef u_long tcp_seq;
typedef unsigned int tcp_seq;
/*
* TCP header.
* Per RFC 793, September, 1981.
+3 -1
View File
@@ -36,13 +36,15 @@
#ifndef _RWHOD_H_
#define _RWHOD_H_
#include <sys/types.h>
/*
* rwho protocol packet format.
*/
struct outmp {
char out_line[8]; /* tty name */
char out_name[8]; /* user id */
long out_time; /* time on */
int32_t out_time; /* time on */
};
struct whod {
+5 -3
View File
@@ -54,6 +54,8 @@
* stream connection through which the conversation takes place.
*/
#include <sys/types.h>
/*
* Client->server request message format.
*/
@@ -62,10 +64,10 @@ typedef struct {
u_char type; /* request type, see below */
u_char answer; /* not used */
u_char pad;
u_long id_num; /* message id */
u_int32_t id_num; /* message id */
struct osockaddr addr; /* old (4.3) style */
struct osockaddr ctl_addr; /* old (4.3) style */
long pid; /* caller's process id */
int32_t pid; /* caller's process id */
#define NAME_SIZE 12
char l_name[NAME_SIZE];/* caller's name */
char r_name[NAME_SIZE];/* callee's name */
@@ -81,7 +83,7 @@ typedef struct {
u_char type; /* type of request message, see below */
u_char answer; /* respose to request message, see below */
u_char pad;
u_long id_num; /* message id */
u_int32_t id_num; /* message id */
struct osockaddr addr; /* address for establishing conversation */
} CTL_RESPONSE;
+10 -10
View File
@@ -52,8 +52,8 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#include <ctype.h>
#include <string.h>
int __ivaliduser __P((FILE *, u_long, const char *, const char *));
static int __icheckhost __P((u_long, char *));
int __ivaliduser __P((FILE *, u_int32_t, const char *, const char *));
static int __icheckhost __P((u_int32_t, char *));
int
rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
@@ -65,7 +65,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
struct hostent *hp;
struct sockaddr_in sin, from;
fd_set reads;
long oldmask;
int32_t oldmask;
pid_t pid;
int s, lport, timo;
char c;
@@ -242,7 +242,7 @@ ruserok(rhost, superuser, ruser, luser)
int superuser;
{
struct hostent *hp;
u_long addr;
u_int32_t addr;
char **ap;
if ((hp = gethostbyname(rhost)) == NULL)
@@ -266,7 +266,7 @@ ruserok(rhost, superuser, ruser, luser)
*/
int
iruserok(raddr, superuser, ruser, luser)
u_long raddr;
u_int32_t raddr;
int superuser;
const char *ruser, *luser;
{
@@ -347,7 +347,7 @@ again:
int
__ivaliduser(hostf, raddr, luser, ruser)
FILE *hostf;
u_long raddr;
u_int32_t raddr;
const char *luser, *ruser;
{
register char *user, *p;
@@ -389,15 +389,15 @@ __ivaliduser(hostf, raddr, luser, ruser)
*/
static int
__icheckhost(raddr, lhost)
u_long raddr;
u_int32_t raddr;
register char *lhost;
{
register struct hostent *hp;
register u_long laddr;
register u_int32_t laddr;
register char **pp;
/* Try for raw ip address first. */
if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1)
if (isdigit(*lhost) && (int32_t)(laddr = inet_addr(lhost)) != -1)
return (raddr == laddr);
/* Better be a hostname. */
@@ -406,7 +406,7 @@ __icheckhost(raddr, lhost)
/* Spin through ip addresses. */
for (pp = hp->h_addr_list; *pp; ++pp)
if (!bcmp(&raddr, *pp, sizeof(u_long)))
if (!bcmp(&raddr, *pp, sizeof(u_int32_t)))
return (1);
/* No match. */
+5 -5
View File
@@ -1,6 +1,6 @@
# Makefile for intl subdirectory: message handling code from GNU gettext.
# Copyright (C) 1995 Free Software Foundation, Inc.
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -31,12 +31,12 @@ CPPFLAGS += -D'GNULOCALEDIR="$(localedir)"' \
ifdef gettext-srcdir
%:: $(gettext-srcdir)/intl/%.glibc; $(copysrc)
%:: $(gettext-srcdir)/intl/%.c; $(copysrc)
%:: $(gettext-srcdir)/intl/%.h; $(copysrc)
%.h:: ../gpl2lgpl.sed $(gettext-srcdir)/intl/%.glibc; $(copysrc)
%.c:: ../gpl2lgpl.sed $(gettext-srcdir)/intl/%.c; $(copysrc)
%.h:: ../gpl2lgpl.sed $(gettext-srcdir)/intl/%.h; $(copysrc)
define copysrc
cp -f $< $@.new
sed -f $^ > $@.new
chmod a-w $@.new
mv -f $@.new $@
test ! -d CVS || cvs commit -m'Updated from $<' $@
+14 -10
View File
@@ -1,19 +1,23 @@
/* bindtextdom.c -- implementation of the bindtextdomain(3) function
Copyright (C) 1995 Free Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
+40 -25
View File
@@ -1,19 +1,23 @@
/* dcgettext.c -- implemenatation of the dcgettext(3) function
Copyright (C) 1995 Software Foundation, Inc.
/* dcgettext.c -- implementation of the dcgettext(3) function
Copyright (C) 1995 Free Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -24,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef HAVE_ALLOCA_H || defined _LIBC
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
@@ -151,10 +155,11 @@ const char _nl_default_dirname[] = GNULOCALEDIR;
struct binding *_nl_domain_bindings;
/* Prototypes for local functions. */
static char *find_msg __P ((struct loaded_domain *domain, const char *msgid));
static const char *category_to_name __P((int category));
static const char *guess_category_value __P((int category,
const char *categoryname));
static char *find_msg PARAMS ((struct loaded_domain *domain,
const char *msgid));
static const char *category_to_name PARAMS ((int category));
static const char *guess_category_value PARAMS ((int category,
const char *categoryname));
/* Names for the libintl functions are a problem. They must not clash
@@ -182,6 +187,7 @@ DCGETTEXT (domainname, msgid, category)
char *dirname, *xdomainname;
char *single_locale;
char *retval;
int saved_errno = errno;
/* If no real MSGID is given return NULL. */
if (msgid == NULL)
@@ -233,9 +239,12 @@ DCGETTEXT (domainname, msgid, category)
}
if (ret == NULL)
/* We cannot get the current working directory. Don't signal an
error but simply return the default string. */
return (char *) msgid;
{
/* We cannot get the current working directory. Don't signal an
error but simply return the default string. */
errno = saved_errno;
return (char *) msgid;
}
/* We don't want libintl.a to depend on any other library. So
we avoid the non-standard function stpcpy. In GNU C Library
@@ -302,7 +311,10 @@ DCGETTEXT (domainname, msgid, category)
domain. Return the MSGID. */
if (strcmp (single_locale, "C") == 0
|| strcmp (single_locale, "POSIX") == 0)
return (char *) msgid;
{
errno = saved_errno;
return (char *) msgid;
}
/* Find structure describing the message catalog matching the
@@ -317,7 +329,7 @@ DCGETTEXT (domainname, msgid, category)
{
int cnt;
for (cnt = 0; domain->successor[cnt] != NULL; --cnt)
for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
{
retval = find_msg (domain->successor[cnt], msgid);
@@ -327,7 +339,10 @@ DCGETTEXT (domainname, msgid, category)
}
if (retval != NULL)
return retval;
{
errno = saved_errno;
return retval;
}
}
}
/* NOTREACHED */
@@ -375,8 +390,8 @@ find_msg (domain, msgid)
while (1)
{
if (idx >= W (domain->must_swap, domain->hash_size) - incr)
idx -= W (domain->must_swap, domain->hash_size) - incr;
if (idx >= domain->hash_size - incr)
idx -= domain->hash_size - incr;
else
idx += incr;
+14 -10
View File
@@ -1,19 +1,23 @@
/* dgettext.c -- implementation of the dgettext(3) function
Copyright (C) 1995 Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
+129 -53
View File
@@ -1,25 +1,30 @@
/* finddomain.c -- handle list of needed message catalogs
Copyright (C) 1995 Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
@@ -63,41 +68,47 @@ void free ();
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define stpcpy __stpcpy
# define stpcpy(dest, src) __stpcpy(dest, src)
#endif
/* Encoding of locale name parts. */
#define CEN_REVISION 1
#define CEN_SPONSOR 2
#define CEN_SPECIAL 4
#define XPG_CODESET 8
#define TERRITORY 16
#define CEN_AUDIENCE 32
#define XPG_MODIFIER 64
#define CEN_REVISION 1
#define CEN_SPONSOR 2
#define CEN_SPECIAL 4
#define XPG_NORM_CODESET 8
#define XPG_CODESET 16
#define TERRITORY 32
#define CEN_AUDIENCE 64
#define XPG_MODIFIER 128
#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
#define XPG_SPECIFIC (XPG_CODESET|XPG_MODIFIER)
#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
/* List of already loaded domains. */
static struct loaded_domain *_nl_loaded_domains;
/* Prototypes for local functions. */
static struct loaded_domain *make_entry_rec __P ((const char *dirname,
int mask,
const char *language,
const char *territory,
const char *codeset,
const char *modifier,
const char *special,
const char *sponsor,
const char *revision,
const char *domainname,
int do_allocate));
static struct loaded_domain *make_entry_rec PARAMS ((const char *dirname,
int mask,
const char *language,
const char *territory,
const char *codeset,
const char *normalized_codeset,
const char *modifier,
const char *special,
const char *sponsor,
const char *revision,
const char *domainname,
int do_allocate));
/* Normalize name of selected codeset. */
static const char *normalize_codeset PARAMS ((const char *codeset));
/* Substitution for systems lacking this function in their C library. */
#if !_LIBC && !HAVE_STPCPY
static char *stpcpy __P ((char *dest, const char *src));
static char *stpcpy__ PARAMS ((char *dest, const char *src));
# define stpcpy(dest, src) stpcpy__ (dest, src)
#endif
@@ -116,6 +127,7 @@ _nl_find_domain (dirname, locale, domainname)
const char *modifier = NULL;
const char *territory = NULL;
const char *codeset = NULL;
const char *normalized_codeset = NULL;
const char *special = NULL;
const char *sponsor = NULL;
const char *revision = NULL;
@@ -141,13 +153,14 @@ _nl_find_domain (dirname, locale, domainname)
(2) sponsor
(3) special
(4) codeset
(5) territory
(6) audience/modifier
(5) normalized codeset
(6) territory
(7) audience/modifier
*/
/* If we have already tested for this locale entry there has to
be one data set in the list of loaded domains. */
retval = make_entry_rec (dirname, 0, locale, NULL, NULL, NULL,
retval = make_entry_rec (dirname, 0, locale, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, domainname, 0);
if (retval != NULL)
{
@@ -225,6 +238,15 @@ _nl_find_domain (dirname, locale, domainname)
++cp;
mask |= XPG_CODESET;
if (codeset != cp && codeset[0] != '\0')
{
normalized_codeset = normalize_codeset (codeset);
if (strcmp (codeset, normalized_codeset) == 0)
free ((char *) normalized_codeset);
else
mask |= XPG_NORM_CODESET;
}
}
}
@@ -297,8 +319,8 @@ _nl_find_domain (dirname, locale, domainname)
/* Create all possible locale entries which might be interested in
generalzation. */
retval = make_entry_rec (dirname, mask, language, territory, codeset,
modifier, special, sponsor, revision,
domainname, 1);
normalized_codeset, modifier, special, sponsor,
revision, domainname, 1);
if (retval == NULL)
/* This means we are out of core. */
return NULL;
@@ -331,13 +353,15 @@ _nl_find_domain (dirname, locale, domainname)
static struct loaded_domain *
make_entry_rec (dirname, mask, language, territory, codeset, modifier,
special, sponsor, revision, domain, do_allocate)
make_entry_rec (dirname, mask, language, territory, codeset,
normalized_codeset, modifier, special, sponsor, revision,
domain, do_allocate)
const char *dirname;
int mask;
const char *language;
const char *territory;
const char *codeset;
const char *normalized_codeset;
const char *modifier;
const char *special;
const char *sponsor;
@@ -358,23 +382,26 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
both syntaces set this is necessary to prevent constructing
illegal local names. */
/* FIXME: Rewrite because test is necessary only in first round. */
if ((mask & CEN_SPECIFIC) == 0 || (mask & XPG_SPECIFIC) == 0)
if ((mask & CEN_SPECIFIC) == 0 || (mask & XPG_SPECIFIC) == 0
|| ((mask & XPG_CODESET) != 0 && (mask & XPG_NORM_CODESET) != 0))
{
/* Allocate room for the full file name. */
filename = (char *) malloc (strlen (dirname) + 1
+ strlen (language)
+ ((mask & TERRITORY) != 0
? strlen (territory) : 0)
? strlen (territory) + 1 : 0)
+ ((mask & XPG_CODESET) != 0
? strlen (codeset) : 0)
? strlen (codeset) + 1 : 0)
+ ((mask & XPG_NORM_CODESET) != 0
? strlen (normalized_codeset) + 1 : 0)
+ ((mask & XPG_MODIFIER) != 0 ?
strlen (modifier) : 0)
strlen (modifier) + 1 : 0)
+ ((mask & CEN_SPECIAL) != 0
? strlen (special) : 0)
? strlen (special) + 1 : 0)
+ ((mask & CEN_SPONSOR) != 0
? strlen (sponsor) : 0)
? strlen (sponsor) + 1 : 0)
+ ((mask & CEN_REVISION) != 0
? strlen (revision) : 0) + 1
? strlen (revision) + 1 : 0) + 1
+ strlen (domain) + 1);
if (filename == NULL)
@@ -396,7 +423,12 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
if ((mask & XPG_CODESET) != 0)
{
*cp++ = '.';
cp = stpcpy (cp, codeset);
cp = stpcpy (cp, codeset);
}
if ((mask & XPG_NORM_CODESET) != 0)
{
*cp++ = '.';
cp = stpcpy (cp, normalized_codeset);
}
if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
{
@@ -470,20 +502,64 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
}
entries = 0;
for (cnt = 126; cnt >= 0; --cnt)
for (cnt = 254; cnt >= 0; --cnt)
if (cnt < mask && (cnt & ~mask) == 0
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0))
&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
retval->successor[entries++] = make_entry_rec (dirname, cnt,
language, territory,
codeset, modifier,
special, sponsor,
revision, domain, 1);
codeset,
normalized_codeset,
modifier, special,
sponsor, revision,
domain, 1);
retval->successor[entries] = NULL;
return retval;
}
static const char *
normalize_codeset (codeset)
const char *codeset;
{
int len = 0;
int only_digit = 1;
const char *cp;
char *retval;
char *wp;
for (cp = codeset; cp[0] != '\0'; ++cp)
if (isalnum (cp[0]))
{
++len;
if (isalpha (cp[0]))
only_digit = 0;
}
retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
if (retval != NULL)
{
if (only_digit)
wp = stpcpy (retval, "ISO");
else
wp = retval;
for (cp = codeset; cp[0] != '\0'; ++cp)
if (isalpha (cp[0]))
*wp++ = toupper (cp[0]);
else if (isdigit (cp[0]))
*wp++ = cp[0];
*wp = '\0';
}
return (const char *) retval;
}
/* @@ begin of epilog @@ */
/* We don't want libintl.a to depend on any other library. So we
@@ -492,7 +568,7 @@ make_entry_rec (dirname, mask, language, territory, codeset, modifier,
to be defined. */
#if !_LIBC && !HAVE_STPCPY
static char *
stpcpy (dest, src)
stpcpy__ (dest, src)
char *dest;
const char *src;
{
+14 -10
View File
@@ -1,19 +1,23 @@
/* gettext.c -- implementation of gettext(3) function
Copyright (C) 1995 Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
+12 -9
View File
@@ -1,20 +1,23 @@
/* gettext.h - internal header for GNU gettext internationalization functions
Copyright (C) 1995 Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _GETTEXT_H
#define _GETTEXT_H 1
+27 -20
View File
@@ -1,30 +1,34 @@
/* gettextP.h -- header describing internals of gettext library
Copyright (C) 1995 Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _GETTEXTP_H
#define _GETTEXTP_H
/* @@ end of prolog @@ */
#ifndef __P
#ifndef PARAMS
# if __STDC__
# define __P(args) args
# define PARAMS(args) args
# else
# define __P(args) ()
# define PARAMS(args) ()
# endif
#endif
@@ -32,6 +36,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# define W(flag, data) ((flag) ? SWAP (data) : (data))
#endif
static nls_uint32 SWAP PARAMS ((nls_uint32 i));
static inline nls_uint32
SWAP (i)
nls_uint32 i;
@@ -43,7 +50,7 @@ SWAP (i)
struct loaded_domain
{
struct loaded_domain *next;
struct loaded_domain *successor[31];
struct loaded_domain *successor[63];
const char *filename;
int decided;
@@ -64,12 +71,12 @@ struct binding
char *dirname;
};
struct loaded_domain *_nl_find_domain __P ((const char *__dirname,
char *__locale,
const char *__domainname));
void _nl_load_domain __P ((struct loaded_domain *__domain));
struct loaded_domain *_nl_find_domain PARAMS ((const char *__dirname,
char *__locale,
const char *__domainname));
void _nl_load_domain PARAMS ((struct loaded_domain *__domain));
const char *_nl_expand_alias __P ((const char *__name));
const char *_nl_expand_alias PARAMS ((const char *__name));
/* @@ begin of epilog @@ */
+30 -20
View File
@@ -1,19 +1,23 @@
/* hash-string - Implements a string hashing function.
Copyright (C) 1995 Software Foundation, Inc.
Copyright (C) 1995 Free Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_VALUES_H
# include <values.h>
@@ -21,22 +25,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* @@ end of prolog @@ */
#ifndef BITSPERBYTE
# define BITSPERBYTE 8
#ifndef PARAMS
# if __STDC__
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
# endif
#endif
#ifndef LONGBITS
# define LONGBITS (sizeof (long) * BITSPERBYTE)
#endif /* LONGBITS */
/* We assume to have `unsigned long int' value with at least 32 bits. */
#define HASHWORDBITS 32
/* Defines the so called `hashpjw' function by P.J. Weinberger
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
1986, 1987 Bell Telephone Laboratories, Inc.] */
1986, 1987 Bell Telephone Laboratories, Inc.] */
static unsigned long hash_string PARAMS ((const char *__str_param));
static inline unsigned long
hash_string (str_param)
const char *str_param;
{
unsigned long hval, g;
unsigned long int hval, g;
const char *str = str_param;
/* Compute the hash value for the given string. */
@@ -45,10 +55,10 @@ hash_string (str_param)
{
hval <<= 4;
hval += (unsigned long) *str++;
g = hval & ((unsigned long) 0xf << (LONGBITS - 4));
g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
if (g != 0)
{
hval ^= g >> (LONGBITS - 8);
hval ^= g >> (HASHWORDBITS - 8);
hval ^= g;
}
}
+23 -19
View File
@@ -1,9 +1,11 @@
/* libgettext.h -- Message catalogs for internationalization.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper.
This file is derived from the file libgettext.h in the GNU gettext package.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
@@ -16,8 +18,8 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifndef _LIBINTL_H
#define _LIBINTL_H 1
@@ -37,34 +39,36 @@ __BEGIN_DECLS
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
extern char *gettext __P ((const char *__msgid));
extern char *__gettext __P ((const char *__msgid));
extern char *gettext __P ((__const char *__msgid));
extern char *__gettext __P ((__const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
extern char *dgettext __P ((const char *__domainname, const char *__msgid));
extern char *__dgettext __P ((const char *__domainname, const char *__msgid));
extern char *dgettext __P ((__const char *__domainname,
__const char *__msgid));
extern char *__dgettext __P ((__const char *__domainname,
__const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
extern char *dcgettext __P ((const char *__domainname, const char *__msgid,
int __category));
extern char *__dcgettext __P ((const char *__domainname, const char *__msgid,
int __category));
extern char *dcgettext __P ((__const char *__domainname,
__const char *__msgid, int __category));
extern char *__dcgettext __P ((__const char *__domainname,
__const char *__msgid, int __category));
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
extern char *textdomain __P ((const char *__domainname));
extern char *__textdomain __P ((const char *__domainname));
extern char *textdomain __P ((__const char *__domainname));
extern char *__textdomain __P ((__const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
extern char *bindtextdomain __P ((const char *__domainname,
const char *__dirname));
extern char *__bindtextdomain __P ((const char *__domainname,
const char *__dirname));
extern char *bindtextdomain __P ((__const char *__domainname,
__const char *__dirname));
extern char *__bindtextdomain __P ((__const char *__domainname,
__const char *__dirname));
/* Optimized version of the function above. */
@@ -73,9 +77,9 @@ extern char *__bindtextdomain __P ((const char *__domainname,
`__builtin_constant_p' predicate in dcgettext would always return
false. */
# define gettext (msgid) dgettext (NULL, msgid)
# define gettext(msgid) dgettext (NULL, msgid)
# define dgettext (domainname, msgid) \
# define dgettext(domainname, msgid) \
dcgettext (domainname, msgid, LC_MESSAGES)
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+14 -10
View File
@@ -1,19 +1,23 @@
/* loadmsgcat.c -- load needed message catalogs
Copyright (C) 1995 Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
+25 -19
View File
@@ -1,19 +1,23 @@
/* localealias.c -- handle aliases for locale names
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
@@ -86,10 +90,10 @@ static size_t maxmap = 0;
/* Prototypes for local functions. */
static size_t read_alias_file __P ((const char *fname, int fname_len));
static void extend_alias_table __P ((void));
static int alias_compare __P ((const struct alias_map *map1,
const struct alias_map *map2));
static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
static void extend_alias_table PARAMS ((void));
static int alias_compare PARAMS ((const struct alias_map *map1,
const struct alias_map *map2));
const char *
@@ -109,9 +113,9 @@ _nl_expand_alias (name)
if (nmap > 0)
retval = (struct alias_map *) bsearch (&item, map, nmap,
sizeof (struct alias_map),
(int (*) (const void *,
const void *))
alias_compare);
(int (*) PARAMS ((const void *,
const void *))
) alias_compare);
else
retval = NULL;
@@ -257,7 +261,7 @@ read_alias_file (fname, fname_len)
if (added > 0)
qsort (map, nmap, sizeof (struct alias_map),
(int (*) (const void *, const void *)) alias_compare);
(int (*) PARAMS ((const void *, const void *))) alias_compare);
return added;
}
@@ -309,6 +313,8 @@ alias_compare (map1, map2)
c2 = isupper (*p2) ? tolower (*p2) : *p2;
if (c1 == '\0')
break;
++p1;
++p2;
}
while (c1 == c2);
+14 -10
View File
@@ -1,19 +1,23 @@
/* textdomain.c -- implementation of the textdomain(3) function
Copyright (C) 1995 Software Foundation, Inc.
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 2, or (at your option)
any later version.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
This program is distributed in the hope that it will be useful,
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library 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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
# include <config.h>
+3 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
@@ -70,7 +70,7 @@ extern int creat __P ((__const char *__file, __mode_t __mode));
The CMD argument is one of the following. */
#define F_ULOCK 0 /* Unlock a previously locked region. */
#define F_LOCK 1 /* Lock a region for exclusive use. */
#define F_LOCK 1 /* Lock a region for exclusive use. */
#define F_TLOCK 2 /* Test and lock a region for exclusive use. */
#define F_TEST 3 /* Test a region for other processes locks. */
+7 -4
View File
@@ -661,13 +661,16 @@ fts_build(sp, type)
/* Read the directory, attaching each entry to the `link' pointer. */
adjaddr = NULL;
for (head = tail = NULL, nitems = 0; dp = readdir(dirp);) {
int namlen;
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
continue;
if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_namlen)) == NULL)
namlen = _D_EXACT_NAMLEN (dp);
if ((p = fts_alloc(sp, dp->d_name, namlen)) == NULL)
goto mem1;
if (dp->d_namlen > maxlen) {
if (fts_palloc(sp, (size_t)dp->d_namlen)) {
if (namlen > maxlen) {
if (fts_palloc(sp, (size_t)namlen)) {
/*
* No more memory for path or structures. Save
* errno, free up the current structure and the
@@ -687,7 +690,7 @@ mem1: saved_errno = errno;
maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1;
}
p->fts_pathlen = len + dp->d_namlen + 1;
p->fts_pathlen = len + namlen + 1;
p->fts_parent = sp->fts_cur;
p->fts_level = level;
+9 -6
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1992, 1995 Free Software Foundation, Inc.
/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ian Lance Taylor (ian@airs.com).
@@ -53,18 +53,21 @@ DEFUN (ftw_dir, (dirs, level, descriptors, dir, len, func),
{
struct stat s;
int flag, retval, newlev;
size_t namlen;
++got;
if (entry->d_name[0] == '.'
&& (entry->d_namlen == 1 ||
(entry->d_namlen == 2 && entry->d_name[1] == '.')))
&& (entry->d_name[1] == '\0' ||
(entry->d_name[1] == '.' && entry->d_name[2] == '\0')))
{
errno = 0;
continue;
}
if (entry->d_namlen + len + 1 > PATH_MAX)
namlen = _D_EXACT_NAMLEN (entry);
if (namlen + len + 1 > PATH_MAX)
{
#ifdef ENAMETOOLONG
errno = ENAMETOOLONG;
@@ -76,7 +79,7 @@ DEFUN (ftw_dir, (dirs, level, descriptors, dir, len, func),
dir[len] = '/';
memcpy ((PTR) (dir + len + 1), (PTR) entry->d_name,
entry->d_namlen + 1);
namlen + 1);
if (stat (dir, &s) < 0)
{
@@ -110,7 +113,7 @@ DEFUN (ftw_dir, (dirs, level, descriptors, dir, len, func),
{
if (retval == 0)
retval = ftw_dir (dirs, newlev, descriptors, dir,
entry->d_namlen + len + 1, func);
namlen + len + 1, func);
if (dirs[newlev] != NULL)
{
int save;
+1 -1
View File
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@ Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/*
+50 -30
View File
@@ -1,6 +1,6 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,25 +27,32 @@ Cambridge, MA 02139, USA. */
We include config.h which is generated by configure.
It should define for us the following symbols:
* HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
* ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
* HAVE_GNU_LD if using GNU ld, with support for weak symbols in a.out,
and for symbol set and warning messages extensions in a.out and ELF.
This implies HAVE_WEAK_SYMBOLS; set by --with-gnu-ld.
* HAVE_ELF if using ELF, which supports weak symbols.
This implies HAVE_WEAK_SYMBOLS; set by --with-elf.
* HAVE_WEAK_SYMBOLS if weak symbols are available in the assembler and
linker being used. Set by --with-weak-symbols.
* HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
* HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
* HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
*/
/* This is defined for the compilation of all C library code. features.h
tests this to avoid inclusion of stubs.h while compiling the library,
before stubs.h has been generated. Some library code that is shared
with other packages also tests this symbol to see if it is being
compiled as part of the C library. We must define this before including
config.h, because it makes some definitions conditional on whether libc
itself is being compiled, or just some generator program. */
#define _LIBC 1
/* Enable declarations of GNU extensions, since we are compiling them. */
#define _GNU_SOURCE 1
#include <config.h>
/* This is defined for the compilation of all C library code.
features.h tests this to avoid inclusion of stubs.h while
compiling the library, before stubs.h has been generated.
Some library code that is shared with other packages also
tests this symbol to see if it is being compiled as part
of the C library. */
#define _LIBC 1
/* This disables sccsid/rcsid strings in lots of code of non-GNU origin. */
#define lint 1
/*
*/
@@ -74,23 +81,14 @@ extern const char _libc_intl_domainname[];
/*
*/
/* The symbols in all the user (non-_) macros are C symbols. Predefined
should be HAVE_WEAK_SYMBOLS and/or HAVE_ELF and/or HAVE_GNU_LD.
HAVE_WEAK_SYMBOLS is implied by the other two. HAVE_GNU_LD without
HAVE_ELF implies a.out. */
/* The symbols in all the user (non-_) macros are C symbols.
HAVE_GNU_LD without HAVE_ELF implies a.out. */
#ifndef HAVE_WEAK_SYMBOLS
#if defined (HAVE_ELF) || defined (HAVE_GNU_LD)
#if defined (HAVE_ASM_WEAK_DIRECTIVE) || defined (HAVE_ASM_WEAKEXT_DIRECTIVE)
#define HAVE_WEAK_SYMBOLS
#endif
#endif
#ifndef __SYMBOL_PREFIX
#ifdef HAVE_ELF
#define NO_UNDERSCORES
#else
#include <sysdep.h> /* Should define NO_UNDERSCORES. */
#endif
#ifdef NO_UNDERSCORES
#define __SYMBOL_PREFIX
#else
@@ -138,8 +136,21 @@ extern const char _libc_intl_domainname[];
#ifdef HAVE_WEAK_SYMBOLS
#ifdef ASSEMBLER
#ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
/* Define ALIAS as a weak alias for ORIGINAL.
If weak aliases are not available, this defines a strong alias. */
#define weak_alias(original, alias) \
.weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
/* Declare SYMBOL to be weak. */
#define weak_symbol(symbol) .weakext C_SYMBOL_NAME (symbol)
#else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
/* Define ALIAS as a weak alias for ORIGINAL.
If weak aliases are not available, this defines a strong alias. */
#define weak_alias(original, alias) \
@@ -149,12 +160,21 @@ extern const char _libc_intl_domainname[];
/* Declare SYMBOL to be weak. */
#define weak_symbol(symbol) .weak C_SYMBOL_NAME (symbol)
#else
#endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
#else /* ! ASSEMBLER */
#ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
#define weak_symbol(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
#define weak_alias(original, alias) \
asm (".weakext " __SYMBOL_PREFIX #alias ", " __SYMBOL_PREFIX #original);
#else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
#define weak_symbol(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
#define weak_alias(original, alias) \
asm (".weak " __SYMBOL_PREFIX #alias "\n" \
__SYMBOL_PREFIX #alias " = " __SYMBOL_PREFIX #original);
#endif
#endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
#endif /* ! ASSEMBLER */
#else
#define weak_alias(original, alias) strong_alias(original, alias)
#define weak_symbol(symbol) /* Do nothing. */
@@ -168,7 +188,7 @@ extern const char _libc_intl_domainname[];
are better clued in to what we are doing. */
#undef strong_alias
#define strong_alias(name, aliasname) \
extern __typeof (name) aliasname __attribute__ ((alias (#name)));
__typeof (name) aliasname __attribute__ ((alias (#name)));
#ifdef HAVE_WEAK_SYMBOLS
#undef weak_symbol
@@ -176,7 +196,7 @@ extern const char _libc_intl_domainname[];
extern __typeof (name) name __attribute__ ((weak));
#undef weak_alias
#define weak_alias(name, aliasname) \
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
__typeof (name) aliasname __attribute__ ((weak, alias (#name)));
#endif /* HAVE_WEAK_SYMBOLS. */
#endif /* Not ASSEMBLER, and GCC 2.8 or later. */
+7
View File
@@ -0,0 +1,7 @@
*.gz *.Z *.tar *.tgz
=*
TODO COPYING* AUTHORS copyr-* copying.*
glibc-*
mpn-copy.mk
distinfo
+2
View File
@@ -12,4 +12,6 @@ DEFUN_VOID(_IO_register_cleanup)
}
void (*_IO_cleanup_registration_needed)() = _IO_register_cleanup;
#else
void (*_IO_cleanup_registration_needed)() = NULL;
#endif /* _G_HAVE_ATEXIT */
+4 -6
View File
@@ -49,12 +49,6 @@ the executable file might be covered by the GNU General Public License. */
#include <stdlib.h>
#endif
/* If this function pointer is non-zero, we should call it.
It's supposed to make sure _IO_cleanup gets called on exit.
We call it from _IO_file_doallocate, since that is likely
to get called by any program that does buffered I/O. */
void (*_IO_cleanup_registration_needed)();
/*
* Allocate a file buffer, or switch to unbuffered I/O.
* Per the ANSI C standard, ALL tty devices default to line buffered.
@@ -72,6 +66,10 @@ DEFUN(_IO_file_doallocate, (fp),
register char *p;
struct stat st;
/* If _IO_cleanup_registration_needed is non-zero, we should call the
function it points to. This is to make sure _IO_cleanup gets called
on exit. We call it from _IO_file_doallocate, since that is likely
to get called by any program that does buffered I/O. */
if (_IO_cleanup_registration_needed)
(*_IO_cleanup_registration_needed)();
+19 -4
View File
@@ -511,26 +511,41 @@ int
DEFUN(_IO_sputbackc, (fp, c),
register _IO_FILE *fp AND int c)
{
int result;
if (fp->_IO_read_ptr > fp->_IO_read_base
&& (unsigned char)fp->_IO_read_ptr[-1] == (unsigned char)c)
{
fp->_IO_read_ptr--;
return (unsigned char)c;
result = (unsigned char)c;
}
return _IO_PBACKFAIL (fp, c);
else
result = _IO_PBACKFAIL (fp, c);
if (result != EOF)
fp->_flags &= ~_IO_EOF_SEEN;
return result;
}
int
DEFUN(_IO_sungetc, (fp),
register _IO_FILE *fp)
{
int result;
if (fp->_IO_read_ptr > fp->_IO_read_base)
{
fp->_IO_read_ptr--;
return (unsigned char)*fp->_IO_read_ptr;
result = (unsigned char)*fp->_IO_read_ptr;
}
else
return _IO_PBACKFAIL (fp, EOF);
result = _IO_PBACKFAIL (fp, EOF);
if (result != EOF)
fp->_flags &= ~_IO_EOF_SEEN;
return result;
}
#if 0 /* Work in progress */
+2
View File
@@ -78,3 +78,5 @@ _IO_setvbuf (fp, buf, mode, size)
}
return _IO_SETBUF (fp, buf, size) == NULL ? EOF : 0;
}
weak_alias (_IO_setvbuf, setvbuf)
+15 -1
View File
@@ -101,12 +101,26 @@ Cambridge, MA 02139, USA. */
#define UINT_MAX 4294967295
#endif
#ifdef __alpha__
/* Minimum and maximum values a `signed long int' can hold. */
#define LONG_MAX 9223372036854775807L
#define LONG_MIN (- LONG_MAX - 1L)
/* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */
#define ULONG_MAX 18446744073709551615L
#else
/* Minimum and maximum values a `signed long int' can hold. */
#define LONG_MIN INT_MIN
#define LONG_MAX INT_MAX
#define LONG_MIN INT_MIN
/* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */
#define ULONG_MAX UINT_MAX
#endif
#endif /* limits.h */
#endif /* GCC 2. */
+321 -23
View File
@@ -3,7 +3,7 @@
#include "localeinfo.h"
#include <endian.h>
const char _nl_C_LC_CTYPE_class[] =
const char _nl_C_LC_CTYPE_class[768] =
/* 0x80 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
/* 0x86 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
/* 0x8c */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
@@ -33,19 +33,19 @@ const char _nl_C_LC_CTYPE_class[] =
/* 0x1c */ "\002\000" "\002\000" "\002\000" "\002\000" "\001\140" "\004\300"
/* 0x22 */ "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" "\004\300"
/* 0x28 */ "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" "\004\300"
/* 0x2e */ "\004\300" "\004\300" "\000\330" "\000\330" "\000\330" "\000\330"
/* 0x34 */ "\000\330" "\000\330" "\000\330" "\000\330" "\000\330" "\000\330"
/* 0x2e */ "\004\300" "\004\300" "\010\330" "\010\330" "\010\330" "\010\330"
/* 0x34 */ "\010\330" "\010\330" "\010\330" "\010\330" "\010\330" "\010\330"
/* 0x3a */ "\004\300" "\004\300" "\004\300" "\004\300" "\004\300" "\004\300"
/* 0x40 */ "\004\300" "\000\325" "\000\325" "\000\325" "\000\325" "\000\325"
/* 0x46 */ "\000\325" "\000\305" "\000\305" "\000\305" "\000\305" "\000\305"
/* 0x4c */ "\000\305" "\000\305" "\000\305" "\000\305" "\000\305" "\000\305"
/* 0x52 */ "\000\305" "\000\305" "\000\305" "\000\305" "\000\305" "\000\305"
/* 0x58 */ "\000\305" "\000\305" "\000\305" "\004\300" "\004\300" "\004\300"
/* 0x5e */ "\004\300" "\004\300" "\004\300" "\000\326" "\000\326" "\000\326"
/* 0x64 */ "\000\326" "\000\326" "\000\326" "\000\306" "\000\306" "\000\306"
/* 0x6a */ "\000\306" "\000\306" "\000\306" "\000\306" "\000\306" "\000\306"
/* 0x70 */ "\000\306" "\000\306" "\000\306" "\000\306" "\000\306" "\000\306"
/* 0x76 */ "\000\306" "\000\306" "\000\306" "\000\306" "\000\306" "\004\300"
/* 0x40 */ "\004\300" "\010\325" "\010\325" "\010\325" "\010\325" "\010\325"
/* 0x46 */ "\010\325" "\010\305" "\010\305" "\010\305" "\010\305" "\010\305"
/* 0x4c */ "\010\305" "\010\305" "\010\305" "\010\305" "\010\305" "\010\305"
/* 0x52 */ "\010\305" "\010\305" "\010\305" "\010\305" "\010\305" "\010\305"
/* 0x58 */ "\010\305" "\010\305" "\010\305" "\004\300" "\004\300" "\004\300"
/* 0x5e */ "\004\300" "\004\300" "\004\300" "\010\326" "\010\326" "\010\326"
/* 0x64 */ "\010\326" "\010\326" "\010\326" "\010\306" "\010\306" "\010\306"
/* 0x6a */ "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" "\010\306"
/* 0x70 */ "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" "\010\306"
/* 0x76 */ "\010\306" "\010\306" "\010\306" "\010\306" "\010\306" "\004\300"
/* 0x7c */ "\004\300" "\004\300" "\004\300" "\002\000" "\002\000" "\002\000"
/* 0x82 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
/* 0x88 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
@@ -69,8 +69,96 @@ const char _nl_C_LC_CTYPE_class[] =
/* 0xf4 */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
/* 0xfa */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
;
const char _nl_C_LC_CTYPE_class32[1024] =
/* 0x00 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x03 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x06 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x09 */ "\003\040\000\000" "\002\040\000\000" "\002\040\000\000"
/* 0x0c */ "\002\040\000\000" "\002\040\000\000" "\002\000\000\000"
/* 0x0f */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x12 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x15 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x18 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x1b */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x1e */ "\002\000\000\000" "\002\000\000\000" "\001\140\000\000"
/* 0x21 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x24 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x27 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x2a */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x2d */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x30 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
/* 0x33 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
/* 0x36 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
/* 0x39 */ "\010\330\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x3c */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x3f */ "\004\300\000\000" "\004\300\000\000" "\010\325\000\000"
/* 0x42 */ "\010\325\000\000" "\010\325\000\000" "\010\325\000\000"
/* 0x45 */ "\010\325\000\000" "\010\325\000\000" "\010\305\000\000"
/* 0x48 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x4b */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x4e */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x51 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x54 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x57 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x5a */ "\010\305\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x5d */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x60 */ "\004\300\000\000" "\010\326\000\000" "\010\326\000\000"
/* 0x63 */ "\010\326\000\000" "\010\326\000\000" "\010\326\000\000"
/* 0x66 */ "\010\326\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x69 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x6c */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x6f */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x72 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x75 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x78 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x7b */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x7e */ "\004\300\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x81 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x84 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x87 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x8a */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x8d */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x90 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x93 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x96 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x99 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x9c */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x9f */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xa2 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xa5 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xa8 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xab */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xae */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xb1 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xb4 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xb7 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xba */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xbd */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc0 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc3 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc6 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc9 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xcc */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xcf */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xd2 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xd5 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xd8 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xdb */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xde */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xe1 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xe4 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xe7 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xea */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xed */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf0 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf3 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf6 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf9 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xfc */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xff */ "\002\000\000\000"
;
#if BYTE_ORDER == LITTLE_ENDIAN
const char _nl_C_LC_CTYPE_toupper[] =
const char _nl_C_LC_CTYPE_toupper[1536] =
/* 0x80 */ "\200\000\000\000" "\201\000\000\000" "\202\000\000\000"
/* 0x83 */ "\203\000\000\000" "\204\000\000\000" "\205\000\000\000"
/* 0x86 */ "\206\000\000\000" "\207\000\000\000" "\210\000\000\000"
@@ -200,7 +288,7 @@ const char _nl_C_LC_CTYPE_toupper[] =
/* 0xfa */ "\372\000\000\000" "\373\000\000\000" "\374\000\000\000"
/* 0xfd */ "\375\000\000\000" "\376\000\000\000" "\377\000\000\000"
;
const char _nl_C_LC_CTYPE_tolower[] =
const char _nl_C_LC_CTYPE_tolower[1536] =
/* 0x80 */ "\200\000\000\000" "\201\000\000\000" "\202\000\000\000"
/* 0x83 */ "\203\000\000\000" "\204\000\000\000" "\205\000\000\000"
/* 0x86 */ "\206\000\000\000" "\207\000\000\000" "\210\000\000\000"
@@ -330,8 +418,96 @@ const char _nl_C_LC_CTYPE_tolower[] =
/* 0xfa */ "\372\000\000\000" "\373\000\000\000" "\374\000\000\000"
/* 0xfd */ "\375\000\000\000" "\376\000\000\000" "\377\000\000\000"
;
const char _nl_C_LC_CTYPE_names[1024] =
/* 0x00 */ "\000\000\000\000" "\001\000\000\000" "\002\000\000\000"
/* 0x03 */ "\003\000\000\000" "\004\000\000\000" "\005\000\000\000"
/* 0x06 */ "\006\000\000\000" "\007\000\000\000" "\010\000\000\000"
/* 0x09 */ "\011\000\000\000" "\012\000\000\000" "\013\000\000\000"
/* 0x0c */ "\014\000\000\000" "\015\000\000\000" "\016\000\000\000"
/* 0x0f */ "\017\000\000\000" "\020\000\000\000" "\021\000\000\000"
/* 0x12 */ "\022\000\000\000" "\023\000\000\000" "\024\000\000\000"
/* 0x15 */ "\025\000\000\000" "\026\000\000\000" "\027\000\000\000"
/* 0x18 */ "\030\000\000\000" "\031\000\000\000" "\032\000\000\000"
/* 0x1b */ "\033\000\000\000" "\034\000\000\000" "\035\000\000\000"
/* 0x1e */ "\036\000\000\000" "\037\000\000\000" "\040\000\000\000"
/* 0x21 */ "\041\000\000\000" "\042\000\000\000" "\043\000\000\000"
/* 0x24 */ "\044\000\000\000" "\045\000\000\000" "\046\000\000\000"
/* 0x27 */ "\047\000\000\000" "\050\000\000\000" "\051\000\000\000"
/* 0x2a */ "\052\000\000\000" "\053\000\000\000" "\054\000\000\000"
/* 0x2d */ "\055\000\000\000" "\056\000\000\000" "\057\000\000\000"
/* 0x30 */ "\060\000\000\000" "\061\000\000\000" "\062\000\000\000"
/* 0x33 */ "\063\000\000\000" "\064\000\000\000" "\065\000\000\000"
/* 0x36 */ "\066\000\000\000" "\067\000\000\000" "\070\000\000\000"
/* 0x39 */ "\071\000\000\000" "\072\000\000\000" "\073\000\000\000"
/* 0x3c */ "\074\000\000\000" "\075\000\000\000" "\076\000\000\000"
/* 0x3f */ "\077\000\000\000" "\100\000\000\000" "\101\000\000\000"
/* 0x42 */ "\102\000\000\000" "\103\000\000\000" "\104\000\000\000"
/* 0x45 */ "\105\000\000\000" "\106\000\000\000" "\107\000\000\000"
/* 0x48 */ "\110\000\000\000" "\111\000\000\000" "\112\000\000\000"
/* 0x4b */ "\113\000\000\000" "\114\000\000\000" "\115\000\000\000"
/* 0x4e */ "\116\000\000\000" "\117\000\000\000" "\120\000\000\000"
/* 0x51 */ "\121\000\000\000" "\122\000\000\000" "\123\000\000\000"
/* 0x54 */ "\124\000\000\000" "\125\000\000\000" "\126\000\000\000"
/* 0x57 */ "\127\000\000\000" "\130\000\000\000" "\131\000\000\000"
/* 0x5a */ "\132\000\000\000" "\133\000\000\000" "\134\000\000\000"
/* 0x5d */ "\135\000\000\000" "\136\000\000\000" "\137\000\000\000"
/* 0x60 */ "\140\000\000\000" "\141\000\000\000" "\142\000\000\000"
/* 0x63 */ "\143\000\000\000" "\144\000\000\000" "\145\000\000\000"
/* 0x66 */ "\146\000\000\000" "\147\000\000\000" "\150\000\000\000"
/* 0x69 */ "\151\000\000\000" "\152\000\000\000" "\153\000\000\000"
/* 0x6c */ "\154\000\000\000" "\155\000\000\000" "\156\000\000\000"
/* 0x6f */ "\157\000\000\000" "\160\000\000\000" "\161\000\000\000"
/* 0x72 */ "\162\000\000\000" "\163\000\000\000" "\164\000\000\000"
/* 0x75 */ "\165\000\000\000" "\166\000\000\000" "\167\000\000\000"
/* 0x78 */ "\170\000\000\000" "\171\000\000\000" "\172\000\000\000"
/* 0x7b */ "\173\000\000\000" "\174\000\000\000" "\175\000\000\000"
/* 0x7e */ "\176\000\000\000" "\177\000\000\000" "\200\000\000\000"
/* 0x81 */ "\201\000\000\000" "\202\000\000\000" "\203\000\000\000"
/* 0x84 */ "\204\000\000\000" "\205\000\000\000" "\206\000\000\000"
/* 0x87 */ "\207\000\000\000" "\210\000\000\000" "\211\000\000\000"
/* 0x8a */ "\212\000\000\000" "\213\000\000\000" "\214\000\000\000"
/* 0x8d */ "\215\000\000\000" "\216\000\000\000" "\217\000\000\000"
/* 0x90 */ "\220\000\000\000" "\221\000\000\000" "\222\000\000\000"
/* 0x93 */ "\223\000\000\000" "\224\000\000\000" "\225\000\000\000"
/* 0x96 */ "\226\000\000\000" "\227\000\000\000" "\230\000\000\000"
/* 0x99 */ "\231\000\000\000" "\232\000\000\000" "\233\000\000\000"
/* 0x9c */ "\234\000\000\000" "\235\000\000\000" "\236\000\000\000"
/* 0x9f */ "\237\000\000\000" "\240\000\000\000" "\241\000\000\000"
/* 0xa2 */ "\242\000\000\000" "\243\000\000\000" "\244\000\000\000"
/* 0xa5 */ "\245\000\000\000" "\246\000\000\000" "\247\000\000\000"
/* 0xa8 */ "\250\000\000\000" "\251\000\000\000" "\252\000\000\000"
/* 0xab */ "\253\000\000\000" "\254\000\000\000" "\255\000\000\000"
/* 0xae */ "\256\000\000\000" "\257\000\000\000" "\260\000\000\000"
/* 0xb1 */ "\261\000\000\000" "\262\000\000\000" "\263\000\000\000"
/* 0xb4 */ "\264\000\000\000" "\265\000\000\000" "\266\000\000\000"
/* 0xb7 */ "\267\000\000\000" "\270\000\000\000" "\271\000\000\000"
/* 0xba */ "\272\000\000\000" "\273\000\000\000" "\274\000\000\000"
/* 0xbd */ "\275\000\000\000" "\276\000\000\000" "\277\000\000\000"
/* 0xc0 */ "\300\000\000\000" "\301\000\000\000" "\302\000\000\000"
/* 0xc3 */ "\303\000\000\000" "\304\000\000\000" "\305\000\000\000"
/* 0xc6 */ "\306\000\000\000" "\307\000\000\000" "\310\000\000\000"
/* 0xc9 */ "\311\000\000\000" "\312\000\000\000" "\313\000\000\000"
/* 0xcc */ "\314\000\000\000" "\315\000\000\000" "\316\000\000\000"
/* 0xcf */ "\317\000\000\000" "\320\000\000\000" "\321\000\000\000"
/* 0xd2 */ "\322\000\000\000" "\323\000\000\000" "\324\000\000\000"
/* 0xd5 */ "\325\000\000\000" "\326\000\000\000" "\327\000\000\000"
/* 0xd8 */ "\330\000\000\000" "\331\000\000\000" "\332\000\000\000"
/* 0xdb */ "\333\000\000\000" "\334\000\000\000" "\335\000\000\000"
/* 0xde */ "\336\000\000\000" "\337\000\000\000" "\340\000\000\000"
/* 0xe1 */ "\341\000\000\000" "\342\000\000\000" "\343\000\000\000"
/* 0xe4 */ "\344\000\000\000" "\345\000\000\000" "\346\000\000\000"
/* 0xe7 */ "\347\000\000\000" "\350\000\000\000" "\351\000\000\000"
/* 0xea */ "\352\000\000\000" "\353\000\000\000" "\354\000\000\000"
/* 0xed */ "\355\000\000\000" "\356\000\000\000" "\357\000\000\000"
/* 0xf0 */ "\360\000\000\000" "\361\000\000\000" "\362\000\000\000"
/* 0xf3 */ "\363\000\000\000" "\364\000\000\000" "\365\000\000\000"
/* 0xf6 */ "\366\000\000\000" "\367\000\000\000" "\370\000\000\000"
/* 0xf9 */ "\371\000\000\000" "\372\000\000\000" "\373\000\000\000"
/* 0xfc */ "\374\000\000\000" "\375\000\000\000" "\376\000\000\000"
/* 0xff */ "\377\000\000\000"
;
#elif BYTE_ORDER == BIG_ENDIAN
const char _nl_C_LC_CTYPE_toupper[] =
const char _nl_C_LC_CTYPE_toupper[1536] =
/* 0x80 */ "\000\000\000\200" "\000\000\000\201" "\000\000\000\202"
/* 0x83 */ "\000\000\000\203" "\000\000\000\204" "\000\000\000\205"
/* 0x86 */ "\000\000\000\206" "\000\000\000\207" "\000\000\000\210"
@@ -461,7 +637,7 @@ const char _nl_C_LC_CTYPE_toupper[] =
/* 0xfa */ "\000\000\000\372" "\000\000\000\373" "\000\000\000\374"
/* 0xfd */ "\000\000\000\375" "\000\000\000\376" "\000\000\000\377"
;
const char _nl_C_LC_CTYPE_tolower[] =
const char _nl_C_LC_CTYPE_tolower[1536] =
/* 0x80 */ "\000\000\000\200" "\000\000\000\201" "\000\000\000\202"
/* 0x83 */ "\000\000\000\203" "\000\000\000\204" "\000\000\000\205"
/* 0x86 */ "\000\000\000\206" "\000\000\000\207" "\000\000\000\210"
@@ -591,18 +767,140 @@ const char _nl_C_LC_CTYPE_tolower[] =
/* 0xfa */ "\000\000\000\372" "\000\000\000\373" "\000\000\000\374"
/* 0xfd */ "\000\000\000\375" "\000\000\000\376" "\000\000\000\377"
;
const char _nl_C_LC_CTYPE_names[1024] =
/* 0x00 */ "\000\000\000\000" "\000\000\000\001" "\000\000\000\002"
/* 0x03 */ "\000\000\000\003" "\000\000\000\004" "\000\000\000\005"
/* 0x06 */ "\000\000\000\006" "\000\000\000\007" "\000\000\000\010"
/* 0x09 */ "\000\000\000\011" "\000\000\000\012" "\000\000\000\013"
/* 0x0c */ "\000\000\000\014" "\000\000\000\015" "\000\000\000\016"
/* 0x0f */ "\000\000\000\017" "\000\000\000\020" "\000\000\000\021"
/* 0x12 */ "\000\000\000\022" "\000\000\000\023" "\000\000\000\024"
/* 0x15 */ "\000\000\000\025" "\000\000\000\026" "\000\000\000\027"
/* 0x18 */ "\000\000\000\030" "\000\000\000\031" "\000\000\000\032"
/* 0x1b */ "\000\000\000\033" "\000\000\000\034" "\000\000\000\035"
/* 0x1e */ "\000\000\000\036" "\000\000\000\037" "\000\000\000\040"
/* 0x21 */ "\000\000\000\041" "\000\000\000\042" "\000\000\000\043"
/* 0x24 */ "\000\000\000\044" "\000\000\000\045" "\000\000\000\046"
/* 0x27 */ "\000\000\000\047" "\000\000\000\050" "\000\000\000\051"
/* 0x2a */ "\000\000\000\052" "\000\000\000\053" "\000\000\000\054"
/* 0x2d */ "\000\000\000\055" "\000\000\000\056" "\000\000\000\057"
/* 0x30 */ "\000\000\000\060" "\000\000\000\061" "\000\000\000\062"
/* 0x33 */ "\000\000\000\063" "\000\000\000\064" "\000\000\000\065"
/* 0x36 */ "\000\000\000\066" "\000\000\000\067" "\000\000\000\070"
/* 0x39 */ "\000\000\000\071" "\000\000\000\072" "\000\000\000\073"
/* 0x3c */ "\000\000\000\074" "\000\000\000\075" "\000\000\000\076"
/* 0x3f */ "\000\000\000\077" "\000\000\000\100" "\000\000\000\101"
/* 0x42 */ "\000\000\000\102" "\000\000\000\103" "\000\000\000\104"
/* 0x45 */ "\000\000\000\105" "\000\000\000\106" "\000\000\000\107"
/* 0x48 */ "\000\000\000\110" "\000\000\000\111" "\000\000\000\112"
/* 0x4b */ "\000\000\000\113" "\000\000\000\114" "\000\000\000\115"
/* 0x4e */ "\000\000\000\116" "\000\000\000\117" "\000\000\000\120"
/* 0x51 */ "\000\000\000\121" "\000\000\000\122" "\000\000\000\123"
/* 0x54 */ "\000\000\000\124" "\000\000\000\125" "\000\000\000\126"
/* 0x57 */ "\000\000\000\127" "\000\000\000\130" "\000\000\000\131"
/* 0x5a */ "\000\000\000\132" "\000\000\000\133" "\000\000\000\134"
/* 0x5d */ "\000\000\000\135" "\000\000\000\136" "\000\000\000\137"
/* 0x60 */ "\000\000\000\140" "\000\000\000\141" "\000\000\000\142"
/* 0x63 */ "\000\000\000\143" "\000\000\000\144" "\000\000\000\145"
/* 0x66 */ "\000\000\000\146" "\000\000\000\147" "\000\000\000\150"
/* 0x69 */ "\000\000\000\151" "\000\000\000\152" "\000\000\000\153"
/* 0x6c */ "\000\000\000\154" "\000\000\000\155" "\000\000\000\156"
/* 0x6f */ "\000\000\000\157" "\000\000\000\160" "\000\000\000\161"
/* 0x72 */ "\000\000\000\162" "\000\000\000\163" "\000\000\000\164"
/* 0x75 */ "\000\000\000\165" "\000\000\000\166" "\000\000\000\167"
/* 0x78 */ "\000\000\000\170" "\000\000\000\171" "\000\000\000\172"
/* 0x7b */ "\000\000\000\173" "\000\000\000\174" "\000\000\000\175"
/* 0x7e */ "\000\000\000\176" "\000\000\000\177" "\000\000\000\200"
/* 0x81 */ "\000\000\000\201" "\000\000\000\202" "\000\000\000\203"
/* 0x84 */ "\000\000\000\204" "\000\000\000\205" "\000\000\000\206"
/* 0x87 */ "\000\000\000\207" "\000\000\000\210" "\000\000\000\211"
/* 0x8a */ "\000\000\000\212" "\000\000\000\213" "\000\000\000\214"
/* 0x8d */ "\000\000\000\215" "\000\000\000\216" "\000\000\000\217"
/* 0x90 */ "\000\000\000\220" "\000\000\000\221" "\000\000\000\222"
/* 0x93 */ "\000\000\000\223" "\000\000\000\224" "\000\000\000\225"
/* 0x96 */ "\000\000\000\226" "\000\000\000\227" "\000\000\000\230"
/* 0x99 */ "\000\000\000\231" "\000\000\000\232" "\000\000\000\233"
/* 0x9c */ "\000\000\000\234" "\000\000\000\235" "\000\000\000\236"
/* 0x9f */ "\000\000\000\237" "\000\000\000\240" "\000\000\000\241"
/* 0xa2 */ "\000\000\000\242" "\000\000\000\243" "\000\000\000\244"
/* 0xa5 */ "\000\000\000\245" "\000\000\000\246" "\000\000\000\247"
/* 0xa8 */ "\000\000\000\250" "\000\000\000\251" "\000\000\000\252"
/* 0xab */ "\000\000\000\253" "\000\000\000\254" "\000\000\000\255"
/* 0xae */ "\000\000\000\256" "\000\000\000\257" "\000\000\000\260"
/* 0xb1 */ "\000\000\000\261" "\000\000\000\262" "\000\000\000\263"
/* 0xb4 */ "\000\000\000\264" "\000\000\000\265" "\000\000\000\266"
/* 0xb7 */ "\000\000\000\267" "\000\000\000\270" "\000\000\000\271"
/* 0xba */ "\000\000\000\272" "\000\000\000\273" "\000\000\000\274"
/* 0xbd */ "\000\000\000\275" "\000\000\000\276" "\000\000\000\277"
/* 0xc0 */ "\000\000\000\300" "\000\000\000\301" "\000\000\000\302"
/* 0xc3 */ "\000\000\000\303" "\000\000\000\304" "\000\000\000\305"
/* 0xc6 */ "\000\000\000\306" "\000\000\000\307" "\000\000\000\310"
/* 0xc9 */ "\000\000\000\311" "\000\000\000\312" "\000\000\000\313"
/* 0xcc */ "\000\000\000\314" "\000\000\000\315" "\000\000\000\316"
/* 0xcf */ "\000\000\000\317" "\000\000\000\320" "\000\000\000\321"
/* 0xd2 */ "\000\000\000\322" "\000\000\000\323" "\000\000\000\324"
/* 0xd5 */ "\000\000\000\325" "\000\000\000\326" "\000\000\000\327"
/* 0xd8 */ "\000\000\000\330" "\000\000\000\331" "\000\000\000\332"
/* 0xdb */ "\000\000\000\333" "\000\000\000\334" "\000\000\000\335"
/* 0xde */ "\000\000\000\336" "\000\000\000\337" "\000\000\000\340"
/* 0xe1 */ "\000\000\000\341" "\000\000\000\342" "\000\000\000\343"
/* 0xe4 */ "\000\000\000\344" "\000\000\000\345" "\000\000\000\346"
/* 0xe7 */ "\000\000\000\347" "\000\000\000\350" "\000\000\000\351"
/* 0xea */ "\000\000\000\352" "\000\000\000\353" "\000\000\000\354"
/* 0xed */ "\000\000\000\355" "\000\000\000\356" "\000\000\000\357"
/* 0xf0 */ "\000\000\000\360" "\000\000\000\361" "\000\000\000\362"
/* 0xf3 */ "\000\000\000\363" "\000\000\000\364" "\000\000\000\365"
/* 0xf6 */ "\000\000\000\366" "\000\000\000\367" "\000\000\000\370"
/* 0xf9 */ "\000\000\000\371" "\000\000\000\372" "\000\000\000\373"
/* 0xfc */ "\000\000\000\374" "\000\000\000\375" "\000\000\000\376"
/* 0xff */ "\000\000\000\377"
;
#else
#error "BYTE_ORDER" BYTE_ORDER " not handled."
#endif
const char _nl_C_LC_CTYPE_width[256] =
/* 0x00 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x10 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x20 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x30 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x40 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x50 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x60 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x70 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x80 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0x90 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0xa0 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0xb0 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0xc0 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0xd0 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0xe0 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
/* 0xf0 */ "\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001\001"
;
const struct locale_data _nl_C_LC_CTYPE =
const struct locale_data _nl_C_LC_CTYPE =
{
NULL, 0, /* no file mapped */
5,
13,
{
_nl_C_LC_CTYPE_class,
NULL, NULL,
_nl_C_LC_CTYPE_toupper,
_nl_C_LC_CTYPE_tolower
{ string: _nl_C_LC_CTYPE_class },
#if BYTE_ORDER == LITTLE_ENDIAN
{ string: NULL }, { string: NULL },
#endif
{ string: _nl_C_LC_CTYPE_toupper },
{ string: _nl_C_LC_CTYPE_tolower },
{ string: NULL },
#if BYTE_ORDER == BIG_ENDIAN
{ string: NULL },
#endif
{ string: _nl_C_LC_CTYPE_class32 },
{ string: _nl_C_LC_CTYPE_names },
#if BYTE_ORDER == BIG_ENDIAN
{ string: NULL },
#endif
{ word: 256 }, { word: 1 },
{ string: "upper\0" "lower\0" "alpha\0" "digit\0" "xdigit\0" "space\0"
"print\0" "graph\0" "blank\0" "cntrl\0" "punct\0" "alnum\0" },
{ string: "tolower\0" "toupper\0" },
{ string: _nl_C_LC_CTYPE_width }
}
};
+5 -5
View File
@@ -1,5 +1,5 @@
/* Generated by GNU locale 0.1.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. */
@@ -11,9 +11,9 @@ const struct locale_data _nl_C_LC_MESSAGES =
NULL, 0, /* no file mapped */
4,
{
"[yY][[:alpha:]]",
"[nN][[:alpha:]]",
"",
""
{ string: "[yY][[:alpha:]]" },
{ string: "[nN][[:alpha:]]" },
{ string: "" },
{ string: "" }
}
};
+16 -16
View File
@@ -1,5 +1,5 @@
/* Generated by GNU locale 0.1.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. */
@@ -11,20 +11,20 @@ const struct locale_data _nl_C_LC_MONETARY =
NULL, 0, /* no file mapped */
15,
{
"",
"",
"",
"",
"\177",
"",
"",
"\177",
"\177",
"\177",
"\177",
"\177",
"\177",
"\177",
"\177"
{ string: "" },
{ string: "" },
{ string: "" },
{ string: "" },
{ string: "\177" },
{ string: "" },
{ string: "" },
{ string: "\177" },
{ string: "\177" },
{ string: "\177" },
{ string: "\177" },
{ string: "\177" },
{ string: "\177" },
{ string: "\177" },
{ string: "\177" }
}
};
+4 -4
View File
@@ -1,5 +1,5 @@
/* Generated by GNU locale 0.1.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. */
@@ -11,8 +11,8 @@ const struct locale_data _nl_C_LC_NUMERIC =
NULL, 0, /* no file mapped */
3,
{
".",
"",
"\177"
{ string: "." },
{ string: "" },
{ string: "\177" }
}
};
+47 -46
View File
@@ -1,5 +1,5 @@
/* Generated by GNU locale 0.1.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. */
@@ -9,51 +9,52 @@ PARTICULAR PURPOSE. */
const struct locale_data _nl_C_LC_TIME =
{
NULL, 0, /* no file mapped */
44,
45,
{
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
"AM",
"PM",
"%a %b %d %H:%M:%S %Y",
"%m/%d/%y",
"%H:%M:%S",
NULL
{ string: "Sun" },
{ string: "Mon" },
{ string: "Tue" },
{ string: "Wed" },
{ string: "Thu" },
{ string: "Fri" },
{ string: "Sat" },
{ string: "Sunday" },
{ string: "Monday" },
{ string: "Tuesday" },
{ string: "Wednesday" },
{ string: "Thursday" },
{ string: "Friday" },
{ string: "Saturday" },
{ string: "Jan" },
{ string: "Feb" },
{ string: "Mar" },
{ string: "Apr" },
{ string: "May" },
{ string: "Jun" },
{ string: "Jul" },
{ string: "Aug" },
{ string: "Sep" },
{ string: "Oct" },
{ string: "Nov" },
{ string: "Dec" },
{ string: "January" },
{ string: "February" },
{ string: "March" },
{ string: "April" },
{ string: "May" },
{ string: "June" },
{ string: "July" },
{ string: "August" },
{ string: "September" },
{ string: "October" },
{ string: "November" },
{ string: "December" },
{ string: "AM" },
{ string: "PM" },
{ string: "%a %b %d %H:%M:%S %Y" },
{ string: "%m/%d/%y" },
{ string: "%H:%M:%S" },
{ string: "%I:%M:%S %p" },
{ string: NULL }
}
};
+21 -13
View File
@@ -13,19 +13,21 @@
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc., 675 Mass Ave,
# Cambridge, MA 02139, USA.
# not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Makefile for locales.
#
subdir := locale
headers = locale.h
headers = locale.h langinfo.h
distribute = localeinfo.h categories.def \
$(localedef-modules:=.c) $(locale-modules:=.c) \
$(lib-modules:=.c) config.h hash.h iso-4217.def \
keyword.gperf keyword.h localedef.h token.h
$(lib-modules:=.c) config.h simple-hash.h iso-4217.def \
charmap-kw.gperf charmap-kw.h locfile-token.h \
locfile-kw.gperf locfile-kw.h linereader.h \
locales.h locfile.h stringtrans.h
routines = setlocale loadlocale localeconv nl_langinfo
categories = ctype messages monetary numeric time collate
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc
@@ -34,10 +36,12 @@ install-bin = localedef locale
extra-objs = $(localedef-modules:=.o) $(locale-modules:=.o) \
$(lib-modules:=.o)
localedef-modules := charmap locfile-lex locfile-parse locale-ctype \
monetary messages collate numeric
locale-modules := ctypedump
lib-modules := locfile-hash xmalloc
vpath %.c programs
vpath %.h programs
localedef-modules := $(categories:%=ld-%) charmap charset linereader \
locfile stringtrans
lib-modules := simple-hash xmalloc xstrdup
GPERF = gperf
@@ -45,14 +49,18 @@ GPERFFLAGS = -acCgopt -k1,2,5,$$
include ../Rules
keyword.h: keyword.gperf
$(GPERF) $(GPERFFLAGS) $< > $@.new
programs/%-kw.h: programs/%-kw.gperf
$(GPERF) $(GPERFFLAGS) -N $(@F:-kw.h=_hash) $< > $@.new
mv -f $@.new $@
$(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o)
$(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
$(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
CPPFLAGS += -DLOCALE_PATH='"$(localedir)"' -DCHARMAP_PATH='"$(nlsdir)/charmap"'
CPPFLAGS := -DLOCALE_PATH='"$(localedir)"' \
-DCHARMAP_PATH='"$(i18ndir)/charmap"' \
-DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
-Iprograms $(CPPFLAGS)
CFLAGS-locfile-lex.c = -Wno-write-strings
CFLAGS-charmap.c = -Wno-write-strings
CFLAGS-locfile.c = -Wno-write-strings
+3 -1
View File
@@ -1,4 +1,6 @@
/* Define a constant for the dgettext domainname for libc internal messages,
so the string constant is not repeated in dozens of object files. */
const char _libc_intl_domainname[] = "SYS_libc";
#include "../version.h"
const char _libc_intl_domainname[] = "SYS_GNU_libc-" VERSION;

Some files were not shown because too many files have changed in this diff Show More