Compare commits

...
Author SHA1 Message Date
Thomas Bushnell, BSG 7816fbdf7a *** empty log message ***
Sat Sep 21 23:42:39 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>
	* sysdeps/mach/getsysstats.c: Include <sys/sysinfo.h>.
 	(__get_nproc_conf): New function.
Sat Sep 21 14:59:22 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/getsysstats.c: New file.

	* shlib-versions (*-*-gnu*): Increment libc to 0.2 for upcoming
	binary distribution.

	* sysdeps/mach/hurd/Makefile (rtld-installed-name): Provide
	definition to override dangerous one in Makeconfig.

	* hurd/Makefile (install-headers-nosubdir): Install <rpc/netdb.h>.
	($(includedir)/rpc/netdb.h): New rule.
	[ This is XXX until sunrpc can be built; <rpc/netdb.h> is
	essential. ]

Fri Sep 20 16:06:06 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/i386/init-first.c (_dl_start): Add definition,
	to guarantee link errors if this is included in ld.so.

Thu Sep 19 23:36:19 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* hurd/hurdinit.c (__libc_argv): Provide common decl.
	(_hurd_setproc): Don't declare __libc_argv here.

Tue Sep 17 10:51:58 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* malloc/memalign.c (memalign): Only acquire __libc_malloc_lock
	for actual modifications to global state.  

Fri Sep 13 01:21:36 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/Makefile (includes): Add -I$(common-objpfx)mach/.
	* sysdeps/mach/hurd/Makefile (includes): Add
	-I$(common-objpfx)hurd/.  Reported by Marcus Daniels.

	* sysdeps/generic/schedbits.h (struct sched_param): Renamed from
	struct sched_params.
	* sysdeps/stub/sched_setp.c (__sched_setparam): struct
	sched_params -> struct sched_param.
	* sysdeps/stub/sched_getp.c (__sched_getparam): Likewise.
	* sysdeps/stub/sched_sets.c (__sched_setscheduler): Likewise.

Thu Sep 12 23:58:25 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): Fix
	syntax error.
	
	* stdio-common/Makefile: Put lockfile in routines
	unconditionally. 
		
	* stdio-common/vfprintf.c (__flockfile, __funlockfile): Declare
	this always, not just if _LIBC_REENTRANT.
	(__funlockfile): Don't use weak_extern for this one;
	__libc_cleanup_region_end might be defined and the use of
	__funlockfile can't be protected the way the use of __flockfile
	can be.
1996-09-22 03:44:47 +00:00
Ulrich Drepper 845dcb57b1 update from main archive 960921
Sun Sep 22 03:40:52 1996  Ulrich Drepper  <drepper@cygnus.com>

	* resolv/resolv.h: Update to bind-4.9.5-T4B.
	* resolv/base64.c: Likewise.
	* resolv/res_debug.c: Likewise.
	* resolv/res_query.c: Likewise.
	* resolv/gethnamaddr.c: Likewise.
	* nss/nss_dns/dns-host.c: Likewise.
	* resolv/res_comp.c: Likewise.
	* resolv/res_send.c: Likewise.
	* resolv/arpa/nameser.h: Likewise.  Attention: MAXDNAME is much
	higher now.

	* resolv/Banner: New file.
	* resolv/Makefile (distribute): Add Banner.

Sat Sep 21 19:15:24 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/stub/getsysstats.c: New file.
	* sysdeps/unix/sysv/linux/getsysstats.c: New file.

	* misc/Makefile (headers): Add sys/sysinfo.h.
	(routines): Add getsysstats.
	* sysdeps/unix/sysv/linux/Makefile [$(subdir)==misc]
 	(sysdep_headers): Remove sys/sysinfo.h.
	* sysdeps/generic/sys/sysinfo.h: New file.
	* sysdeps/unix/sysv/linux/sys/sysinfo.h: Add prototype for get_nprocs,
	get_phys_pages, and get_avphys_pages.

	* misc/Makefile (routines): Add mntent_r.
	* misc/mntent_r.c: New file.
	* misc/mntent.c: Remove all functions but getmntent and use
	__getmntent_r.
	* misc/mntent.h: Add prototype for __getmntent_r.
	* misc/fstab.c: Use __getmntent_r function instead of getmntent.
	This will not clobber the state in getmntent.

	* sysdeps/generic/confname.h: Add _SC_PROCESSORS_CONF,
	_SC_NPROCESSORS_ONLN, _SC_PHYS_PAGES, _SC_AVPHYS_PAGES,
	_SC_ATEXIT_MAX, and _SC_PASS_MAX.
	* sysdeps/stub/sysconf.c: Add handling _SC_PROCESSORS_CONF and
	_SC_NPROCESSORS_ONLN by calling __get_nprocs, _SC_PHYS_PAGES by
	calling __get_phys_pages, _SY_AVPHYS_PAGES by calling
	__get_avphys_pages, _SC_ATEXIT_MAX and _SC_PASS_MAX.
	* sysdeps/posix/sysconf.c: Likewise.
	* posix/getconf.c (vars): Add _NPROCESSORS_CONF, _NPROCESSORS_ONLN,
	_PHYS_PAGES, _AVPHYS_PAGES, ATEXIT_MAX, and PASS_MAX entries.

Sat Sep 21 05:20:36 1996  Ulrich Drepper  <drepper@cygnus.com>

	* version.h (VERSION): Bump to 1.95.

	* Make-dist (+tsrcs): Don't filter out files in subdirs which
 	match files in the sysdeps hierachy (welcome back,
 	sys/syscall.h!).

	* resolv/Makefile (libresolv-routines): Remove getnetnamad.

Sat Sep 21 03:00:19 1996  Ulrich Drepper  <drepper@cygnus.com>

	* locale/loadlocale.c (_nl_free_locale): Remove function.
	* locale/localeinfo.h: Remove prototype for _nl_free_locale.
	* locale/setlocale.c (setlocale): Don't free locale data of
 	categories which succeeded to load after a wrong or missing data
 	file was observed.

	* locale/setlocale (setlocale): Initialize NEWNAME correctly so
	that it works even when the locale data is not used.

	* stdlib/random_r.c: Fix typo in comment.
	* stdlib/drand48-iter.c: Likewise.
	* stdlib/drand48.c: Likewise.
	* stdlib/erand48.c: Likewise.
	* stdlib/jrand48.c: Likewise.
	* stdlib/lcong48.c: Likewise.
	* stdlib/lrand48.c: Likewise.
	* stdlib/mrand48.c: Likewise.
	* stdlib/nrand48.c: Likewise.
	* stdlib/random.c: Likewise.
	* stdlib/seed48.c: Likewise.
	* stdlib/srand48.c: Likewise.
	* misc/search.h: Likewise.
	* misc/hsearch.c: Likewise.
	* misc/hsearch_r.c: Likewise.

	* sysdeps/unix/sysv/linux/m68k/sysdep.S (__errno_location):
Thu Sep 19 23:36:19 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* hurd/hurdinit.c (__libc_argv): Provide common decl.
	(_hurd_setproc): Don't declare __libc_argv here.
1996-09-22 03:06:42 +00:00
Thomas Bushnell, BSG daf2bb515b *** empty log message ***
* sysdeps/mach/getsysstats.c: New file.
1996-09-21 23:54:18 +00:00
Thomas Bushnell, BSG 8a080f40d8 *** empty log message ***
Sat Sep 21 14:59:22 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* shlib-versions (*-*-gnu*): Increment libc to 0.2 for upcoming
	binary distribution.

	* sysdeps/mach/hurd/Makefile (rtld-installed-name): Provide
	definition to override dangerous one in Makeconfig.

	* hurd/Makefile (install-headers-nosubdir): Install <rpc/netdb.h>.
	($(includedir)/rpc/netdb.h): New rule.
	[ This is XXX until sunrpc can be built; <rpc/netdb.h> is
	essential. ]

Fri Sep 20 16:06:06 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/i386/init-first.c (_dl_start): Add definition,
	to guarantee link errors if this is included in ld.so.
1996-09-21 20:05:50 +00:00
Ulrich Drepper 8de8ca1b94 Why are these removed? 1996-09-21 12:41:17 +00:00
Thomas Bushnell, BSG c55698973e *** empty log message *** 1996-09-20 19:41:28 +00:00
Thomas Bushnell, BSG 6bbcfbfedb *** empty log message ***
Thu Sep 19 23:36:19 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* hurd/hurdinit.c (__libc_argv): Provide common decl.
	(_hurd_setproc): Don't declare __libc_argv here.
1996-09-20 19:40:31 +00:00
Ulrich Drepper ec4b0518a3 update from main archive 960919
Thu Sep 19 21:50:55 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/posix/gettimeofday.c (__gettimeofday): Use localtime_r
	instead of localtime.
	Reported by Matthias Urlichs.

	* shlib-versions: Remove version number for libcrypt.
	* features.h: Define __USE_REENTRANT if _REENTRANT or _THREAD_SAFE.
	* libc-symbols.h: Define _REENTRANT while compiling libc.

	* sysdeps/unix/sysv/linux/i386/sysdep.S (__errno_location):
	Define even if !_LIBC_REENTRANT.
	* sysdeps/unix/sysv/linux/i386/sysdep.S (__errno_location):
	Likewise.

	* sysdeps/posix/cuserid.h: Remove prototype for geteuid().
	De-ANSI-fy.

	* MakeTAGS ($P/libc.pot): Generate correctly formed header.
	* po/header.pot: Correct title line.
	* po/nl.po: Update.

Thu Sep 19 18:59:55 1996  Ulrich Drepper  <drepper@cygnus.com>

	* Makeconfig (soversions.mk): Prefer shared lib version numbers
	is add ons over version in libc itself.

	* sysdeps/unix/sysv/linux/i386/sysdep.S: Include <sysdep.h>.
	* sysdeps/unix/sysv/linux/i386/sysdep.h: Prevent multiple
	inclusion.

	* libio/iofgets.c: Use __flockfile and __funlockfile instead of
 	_IO_flockfile and _IO_funlockfile resp.

	* locale/categories.def: Partly support for correct `era' handling
	in LC_TIME category.
	* locale/langinfo.h: Likewise.
	* locale/programs/ld-time.c: Likewise.
	* locale/localeinfo.h: Change comment a bit.

	* malloc/memalign.c: Don't use goto, not necessary anymore.

1996-09-18  Paul Eggert  <eggert@twinsun.com>

	* time/mktime.c (ydhms_tm_diff):  Work correctly even if year
	is negative, or if time_t is unsigned.
	* time/strftime.c (tm_diff): Work correctly even if tm_year
	is near INT_MIN.

Tue Sep 17 16:14:34 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/fpu/__math.h (__inline_mathop): Changed to generate
 	all three versions of the math function.
	(__inline_mathopf, __inline_mathopl): Removed.
	(__inline_functions): New temporary definition containing all
 	non-trivial inline functions.

Wed Sep 18 00:25:41 1996  Ulrich Drepper  <drepper@cygnus.com>

	* time/strftime.c (strftime): The T_FMT_AMPM string may be empty.

Tue Sep 17 20:27:18 1996  Ulrich Drepper  <drepper@cygnus.com>

	* math/Makefile (extra-libs-others): Use $(extra-libs) instead
	of $(extra-libc).

Tue Sep 17 17:09:44 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/stub/fpu_control.h: Correct end of file comment.

Tue Sep 17 05:39:18 1996  Ulrich Drepper  <drepper@cygnus.com>

	* stdio-common/bug3.c, stdio-common/bug4.c, stdio-common/bug5.c,
	stdio-common/test-popen.c: Remove temporary files after test.
	* stdio-common/bug5.c: Use `system' instead of `execlp'.
	Patches by Andreas Jaeger.

	* stdio-common/bug5.c: Create string for `system' argument to
	make sure the input and output file names are really correct.

Sun Sep 15 12:46:44 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* configure.in: If $os contains a hyphen add the part before the
	hyphen to $ostry.

Sun Sep 15 18:14:02 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/fpu/__math.h (__ieee754_pow, __ieee754_powf,
	__ieee754_powl): Rename local variable i to __i.
	(__ieee754_atan2, __ieee754_atan2f, __ieee754_atan2l): New inline
	functions.
	* sysdeps/m68k/fpu/e_atan2.c, sysdeps/m68k/fpu/e_atan2f.c,
	sysdeps/m68k/fpu/e_atan2l.c: New files.

1996-09-15  Paul Eggert  <eggert@twinsun.com>

	* manual/time.texi: Change `range X to Y' to `range X through
	Y', to avoid ambiguity in English.

	(strftime): Numbers that do not have a range indicated are not padded.
	Describe E and O modifiers.
	%g, %G, %u: New formats.
	%C, %y, %Y: Describe behavior on negative years.
	%e: Fix typo (was labeled %d).
	%l, %V: Fix typo in range.
	%M, %S, %U, %w, %W: Give ranges.
	%p: Clarify how noon and midnight are handled for AM and PM.
	%s: Clarify leap second handling.
	%r: Now locale-defined.
	%C, %D, %e, %h, %n, %r, %t, %T: Say that they are POSIX.2 extensions.
	%z: Say that it is a GNU extension.
	%Z: Wording fix.

	* time/strftime.c: (strftime):
		%V: Fix mishandling of week numbers near year boundaries.
		%g, %G: New formats (suggested by Arthur David Olson).
		%U, %W: Use inline expression instead of `week' function.
		%C, %y: Handle negative years portably.
		%C, %Y: Use width 1, since values can be arbitrarily wide.
		%r: Use T_FMT_AMPM format if _NL_CURRENT is defined.
		%u: New Posix.2 format.
		%w: Width is 1, not 2.
	(iso_week_days): New function, for %V, %G, %g.
	(week): Remove; it didn't handle %V correctly.
	(__isleap): New macro.
	(mbsinit): Use arg, to pacify GCC -Wall.

1996-09-13  Paul Eggert  <eggert@twinsun.com>

	* time/strftime.c (strftime):
	If using the GNU C library, do not bother to check for
	multibyte encodings, since they're safe in formats.  Otherwise:
	  - Check for multibyte encodings when encountering any character that
	  is not in the basic execution character set of the C Standard.
	  - Use mbrlen (if available) instead of mblen, to avoid modifying
	  mblen's internal state.
	  - Do not assume that '%' cannot appear as the first character of a
	  multibyte character sequence, since this is possible when not in the
	  initial shift state.
	(HAVE_MBRLEN, MULTIBYTE_IS_FORMAT_SAFE): Define if _LIBC is defined.
	(DO_MULTIBYTE): New macro.
	(<ctype.h>): Do not include.
	(<wchar.h>): Include if HAVE_MBRLEN.
	(mbstate_t, mbrlen, mbsinit): Define if ! HAVE_MBRLEN.
	(mbstate_zero): New constant.

1996-09-12  Paul Eggert  <eggert@twinsun.com>

	* time/strftime.c (strftime):
	Use an empty zone if it can't be determined; POSIX.2 requires this.
	Use plain `int' for pad and modifier (which now contain char value).
	Use plain `int' for number_value, to print negative values correctly.
	Use plain `int' for digits; there was no need to make it unsigned.
	Initialize subfmt consistently.
	Remove incorrect code for %EC and %Ey; they aren't implemented yet.
	For %O, if there is no alternate digit, output Ascii instead of "".
	Output the `%' of an unknown format; this is most likely the right
	thing to do if a multibyte string has been misparsed.

Thu Sep 12 23:23:13 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* stdio-common/scanf7.c (main): Remove extra conversion from
	printf format string.

Thu Sep 12 23:01:16 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* stdlib/test-canon.c (tests): Rename structure member from errno
	to error, all uses changed.

Thu Sep 12 20:08:06 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/fpu/__math.h (__ldexp, __ldexpf, __ldexpl):
	Removed.
	* sysdeps/m68k/fpu/s_ldexp.c, sysdeps/m68k/fpu/s_ldexpf.c,
	sysdeps/m68k/fpu/s_ldexpl.c: Removed, use generic implementation
	instead.
	* sysdeps/m68k/fpu/s_scalbn.c, sysdeps/m68k/fpu/s_scalbnf.c,
	sysdeps/m68k/fpu/s_scalbnl.c: Replaced with old contents of
	s_ldexp.c, s_ldexpf.c and s_ldexpl.c, resp., suitably adpted.

	* sysdeps/m68k/fpu/__math.h (__frexp, __frexpf, __frexpl):
	Return value must be in [0.5, 1), not [1, 2).  Reported by Chris
	Lawrence.
	(__ilogb, __ilogbf, __ilogbl): Check for argument being zero.
	(__scalbn, __scalbnf, __scalbnl): Use second argument directly.

Thu Sep 12 19:59:24 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/libm-ieee754/e_acoshl.c: Fix typos.
	* sysdeps/libm-ieee754/s_cbrtl.c: Remove unused variable.

Thu Sep 12 19:59:24 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/libm-ieee754/e_acoshl.c: Fix typos.
	* sysdeps/libm-ieee754/s_cbrtl.c: Remove unused variable.

Thu Sep 12 19:56:07 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* inet/herrno.c (__h_errno_location): Fix return type.

Tue Sep 17 10:51:58 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* malloc/memalign.c (memalign): Only acquire __libc_malloc_lock
	for actual modifications to global state.

Fri Sep 13 01:21:36 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/Makefile (includes): Add -I$(common-objpfx)mach/.
	* sysdeps/mach/hurd/Makefile (includes): Add
	-I$(common-objpfx)hurd/.  Reported by Marcus Daniels.

	* sysdeps/generic/schedbits.h (struct sched_param): Renamed from
	struct sched_params.
	* sysdeps/stub/sched_setp.c (__sched_setparam): struct
	sched_params -> struct sched_param.
	* sysdeps/stub/sched_getp.c (__sched_getparam): Likewise.
	* sysdeps/stub/sched_sets.c (__sched_setscheduler): Likewise.

Thu Sep 12 23:58:25 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): Fix
	syntax error.

	* stdio-common/Makefile: Put lockfile in routines
	unconditionally.
	Define _MT_SAFE_IO if using for libio and compiling reentrant
	libc.

	* stdio-common/vfprintf.c (__flockfile, __funlockfile): Declare
	this always, not just if _LIBC_REENTRANT.
	(__funlockfile): Don't use weak_extern for this one;
	__libc_cleanup_region_end might be defined and the use of
	__funlockfile can't be protected the way the use of __flockfile
	can be.

	* sched.h: New file.  Helper to access posix/sched.h.
Thu Sep 12 12:33:52 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/hurd/dl-cache.c: Delete second copy of file
	accidentally added on.

	* sysdeps/stub/intr-msg.h: New file.

	* stdio-common/vfprintf.c: Include <libc-lock.h>.
	* stdio-common/vfscanf.c: Include <libc-lock.h>.

	* sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): New
	macro.
	(__libc_cleanup_region_end): New macro.
1996-09-20 01:58:09 +00:00
Karl Berry d66b7b41b8 (\inforef): Move to more appropriate place.
* texinfo.tex (\inforef): Move to more appropriate place. 
(\pounds): Remove spurious extra $. 
(\email): Typeset argument in angle brackets. 
(\macro): Use \doignore for robustness, instead of just letting TeX 
parse the argument. 
(\unmacro): Define.
1996-09-18 12:15:20 +00:00
Thomas Bushnell, BSG bcc7b35158 *** empty log message ***
Tue Sep 17 10:51:58 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* malloc/memalign.c (memalign): Only acquire __libc_malloc_lock
	for actual modifications to global state.
1996-09-17 14:58:48 +00:00
Richard Kenner cd136c56eb RMS:
Use pc instead of unknown, for pc clones.
Use -linux-gnu for Linux-based GNU systems.
1996-09-15 00:49:22 +00:00
Thomas Bushnell, BSG 757dc096f3 *** empty log message ***
* sysdeps/mach/Makefile (includes): Add -I$(common-objpfx)mach/.
	* sysdeps/mach/hurd/Makefile (includes): Add
	-I$(common-objpfx)hurd/.  Reported by Marcus Daniels.
1996-09-13 06:22:21 +00:00
Thomas Bushnell, BSG 39a0b05667 *** empty log message ***
Fri Sep 13 01:21:36 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/generic/schedbits.h (struct sched_param): Renamed from
	struct sched_params.
	* sysdeps/stub/sched_setp.c (__sched_setparam): struct
	sched_params -> struct sched_param.
	* sysdeps/stub/sched_getp.c (__sched_getparam): Likewise.
	* sysdeps/stub/sched_sets.c (__sched_setscheduler): Likewise.
1996-09-13 05:28:59 +00:00
Thomas Bushnell, BSG a8ed817809 *** empty log message ***
Thu Sep 12 23:58:25 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): Fix
	syntax error.
	
	* stdio-common/Makefile: Put lockfile in routines
	unconditionally. 
		
	* stdio-common/vfprintf.c (__flockfile, __funlockfile): Declare
	this always, not just if _LIBC_REENTRANT.
	(__funlockfile): Don't use weak_extern for this one;
	__libc_cleanup_region_end might be defined and the use of
	__funlockfile can't be protected the way the use of __flockfile
	can be. 
	
	* sysdeps/mach/hurd/dl-cache.c: Delete second copy of file
	accidentally added on.

	* sysdeps/stub/intr-msg.h: New file.
1996-09-13 05:05:58 +00:00
Richard M. Stallman 20e77fa06c Use pc instead of unknown, for pc clone systems. Change linux to linux-gnu. 1996-09-13 03:46:14 +00:00
Ulrich Drepper fafaa44ef0 update from main archive 960912
Fri Sep 13 04:33:08 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sched.h: New file.  helper to access posix/sched.h.
	* posix/sched.h: Change `sched_params' to `sched_param' to follow
	POSIX.4.

Thu Sep 12 20:12:40 1996  Ulrich Drepper  <drepper@cygnus.com>

	* db/makedb.c (usage): Print bug report address separately to
	ease translators task.
	* catgets/gencat.c (usage): Likewise.
	* locale/locale.c (usage): Likewise.
	* locale/localedef.c (usage): Likewise.

1996-09-12  Paul Eggert  <eggert@twinsun.com>

	* time/strftime.c (my_localtime_r): Define if ! HAVE_LOCALTIME_R,
	and #define localtime_r to it.	If _LIBC, use __localtime_r instead.
	(my_gmtime_r): Similar, except it's not needed if ! HAVE_TM_GMTOFF.

Thu Sep 12 14:03:29 1996  Ulrich Drepper  <drepper@cygnus.com>

	* crypt/Makefile: Include Makeconfig and add crypt object dir to
 	rpath-link so that running the check finds the new library.
	* crypt/cert.c: provide correct prototypes to prevent warnings.
	Reported by Andreas Jaeger.

	* sysdeps/mach/hurd/Makefile (rpath-link): Don't use += because
	old and new value must be glued using `:'.
	Reported by Marcus Daniels.
1996-09-13 03:21:39 +00:00
Thomas Bushnell, BSG ae2ddc98c1 *** empty log message ***
(vfprintf): Only call __libc_cleanup_region_end if USE_IN_LIBIO,
	thus matching the sense of the tests around
	__libc_cleanup_region_start at the front of the function.
	* stdio-common/vfscanf.c: Include <libc-lock.h>.
	(UNLOCK_STREAM) [! USE_IN_LIBIO]: Call
	__libc_cleanup_region_end, not __libc_cleanup_region_start.
1996-09-12 22:22:29 +00:00
Thomas Bushnell, BSG f33b97f913 *** empty log message ***
Thu Sep 12 12:33:52 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* stdio-common/vfprintf.c: Include <libc-lock.h>.
	* stdio-common/vfscanf.c: Likewise.

	* sysdeps/mach/libc-lock.h (__libc_cleanup_region_start): New
	macro.
	(__libc_cleanup_region_end): New macro.

	* stdio-common/vfscanf.c (UNLOCK_STREAM) [! USE_IN_LIBIO]: Call
	__libc_cleanup_region_end, not __libc_cleanup_region_start.
1996-09-12 21:52:04 +00:00
Ulrich Drepper d0045e79eb Use POSIX version of version.c. 1996-09-12 18:29:32 +00:00
Ulrich Drepper f0f1bf8536 update from main archive 960911
Thu Sep 12 03:35:27 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/i386/Dist: Remove init-first.h.
	* sysdeps/unix/sysv/linux/m68k/Dist: Likewise.
	* sysdeps/unix/sysv/linux/Dist: Add init-first.h.

1996-09-11  Paul Eggert  <eggert@twinsun.com>

	* strftime.c (strftime):
	Handle E and O modifiers, required for POSIX.2 and XPG4.
	Don't use sprintf to format numbers; this way, we can handle time_t
	correctly regardless of whether it's signed.
	Don't dump core if format ends in %.
	In default %c format, use %e instead of %d, for POSIX.2 compatibility.
	For %z:
		Use tm_gmtoff if available.
		Output nothing if tm_isdst is negative.
		Output correct value even if arg is 1969-12-31 23:59:59 UTC.
		Don't assume that UTC offset is less than 24 hours;
		Posix requires support for 24 hours, and there's no point
		limiting it at all.
	(HAVE_TM_GMTOFF, TYPE_SIGNED, INT_STRLEN_BOUND): New macros.
	(CHAR_BIT): Define if <limits.h> doesn't.
	(tm_diff): New function.
	(fmt, <stdio.h>): Remove; no longer used.

Thu Sep 12 02:21:44 1996  Ulrich Drepper  <drepper@cygnus.com>

	* db/Makefile: Add extra-libs-others variable so that shared
	library is built in `others' pass.
	* elf/Makefile: Likewise.
	* math/Makefile: Likewise.
	* resolv/Makefile: Likewise.

	* Makefile (generated): Add version.info.h.

	* time/checktab.awk: New file.  From ADO 96k.
	* time/iso3166.tab: Likewise.
	* time/tzselect.ksh: Likewise.
	* time/zone.tab: Likewise.

	* stdio-common/vfprintf.c: Correct cleanup registration.  We
	cannot use a macro

1996-09-11  Paul Eggert  <eggert@twinsun.com>

	* time/time.h (tm_gmtoff, tm_zone): Prefix with `__' unless
	__USE_BSD; this is required for ANSI C compatibility.
	* manual/time.texi: Replace GMT by UTC, daylight savings by
 	daylight saving, timezone by time zone.
	Rewrite description of %V to match ISO 8601.
	Fix TZ Posix string example for US Eastern time.
	Explain tzname[1] when DST isn't used.
	Explain tzname when multiple abbreviations used (e.g. EST/EWT/EDT).
	Explain that timezone's sign is opposite from tm_gmtoff, and that
	timezone lacks DST adjustment whereas tm_gmtoff has it.
	Deprecate tzname and timezone.

Tue Sep 10 14:46:16 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	Implement Roland McGrath's idea of how to put an .interp into
	shared libraries.
	* interp.c: New file.
	* Makerules (interp-obj): New object, linked into every shared
	library.
	(common-generated): Add interp.so.
	(CFLAGS-interp.c): Pass name of interpreter.

Tue Sep 10 21:09:35 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* db/Makefile: Fix typo.

Tue Sep 10 19:29:53 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* nss/db-Makefile ($(VAR_DB)/passwd.db): Look for multiple
	occurences of the same uid, and only generate a mapping for the
	first one.

Tue Sep 10 03:14:59 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/system.c: New file, to override
	sysdeps/unix/system.c.

Tue Sep 10 15:05:40 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* Makefile (before-compile): Add version-info.h, needed to build
	version.d.

Tue Sep 10 14:14:33 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/m68k/sysdep.S: Remove check for
	EWOULDBLOCK, never true on Linux.
	(__errno_location): New function.
	[_LIBC_REENTRANT]: Set errno using __errno_location function.
	* sysdeps/unix/sysv/linux/m68k/sysdep.h [PIC]: Add second
 	syscall_error handler for reentrant libc.

Tue Sep 10 13:27:49 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/Makefile (extra-objs): Add eval.so to get dependencies.

Wed Sep 11 04:40:57 1996  Ulrich Drepper  <drepper@cygnus.com>

	* time/tzset.c (__tzname_cur_max): Use type `size_t' to avoid
 	warning.
	* time/tzfile.c (compute_tzname_max): Likewise.
1996-09-12 02:51:03 +00:00
Thomas Bushnell, BSG 158ff48e34 *** empty log message ***
Tue Sep 10 14:42:39 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* elf/dl-cache.c: Rename to ...
	* sysdeps/generic/dl-cache.c:  ... here.
	* sysdeps/mach/hurd/dl-cache.c: New file.
	
	* mach/Makefile (distribute): Add `errsystems.awk'.
	* hurd/Makefile (distribute): Add `Notes' and `intr-msg.h'.
	* hurd/hurdintr.awk: Delete file.  (Not used in ages.)
	* hurd/intr-rpc.awk: Likewise.
	* hurd/invoke-trans.c: Likewise.
	* sysdeps/mach/hurd/i386/longjmp-ctx.c: Likewise.
	* sysdeps/mach/hurd/alpha/longjmp-ctx.c: Likewise.
	* sysdeps/mach/hurd/mips/longjmp-ctx.c: Likewise.
	* sysdeps/mach/hurd/i386/init-fault.c: Likewise.
	* sysdeps/mach/hurd/mips/init-fault.c: Likewise.
	* sysdeps/stub/init-fault.c: Likewise.
	* sysdeps/stub/longjmp-ctx.c: Likewise.
	
Thu Sep  5 08:58:47 1996  Richard Henderson  <rth@tamu.edu>

	* sysdeps/alpha/elf/start.S: Make _start global again.
1996-09-11 02:48:08 +00:00
Ulrich Drepper da74e90200 update from main archive 960910
Wed Sep 11 02:57:31 1996  Ulrich Drepper  <drepper@cygnus.com>

	* configure.in: Quote $add_ons argument in loop to generated
	prefices.

Tue Sep 10 20:43:45 1996  Ulrich Drepper  <drepper@cygnus.com>

	* db/makedb.c: Include <locale.h>.  Reported by Fila Kolodny.

Tue Sep 10 13:49:08 1996  Ulrich Drepper  <drepper@cygnus.com>

	* inet/herrno.c: Initialize `h_errno' so that we can provide
	alias.

	* Makefile (version-info.h): Fix typo in shell script.

	* sysdeps/i386/i586/strlen.S: Optimize startup code a bit.
	* sysdeps/i386/i586/strchr.S: Likewise.
1996-09-11 01:52:48 +00:00
Ulrich Drepper 569c558c88 update from main archive 960909
Mon Sep  9 20:31:27 1996  Ulrich Drepper  <drepper@cygnus.com>

	* version.c (banner): Report to bug-glibc@prep not @gnu.
	Reported by Andreas Jaeger.

	* libio/stdio.h [!__USE_REENTRANT]: Don't define getc as
 	_IO_getc_unlocked.
	[__USE_REENTRANT]: Don't define

Mon Sep  9 15:59:32 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/i386/strrchr.c: Fix bug where NUL byte is not recognized
	when it is the third byte in the string.  Reported by
	NIIBE Yutaka.
	* string/tester.c: Add tests for above bug to strlen, strchr, and
	strrchr tests.

Fri Sep  6 21:23:33 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/fpu/e_acos.c: Deansideclized.  Include
	"math_private.h" to get prototype.
	* sysdeps/m68k/fpu/e_fmod.c: Likewise.
	* sysdeps/m68k/fpu/k_cos.c: Likewise.
	* sysdeps/m68k/fpu/k_sin.c: Likewise.
	* sysdeps/m68k/fpu/k_tan.c: Likewise.

	* sysdeps/m68k/fpu/k_sin.c: Remove uneeded indirection of
	__m81_u.
	* sysdeps/m68k/fpu/k_tan.c: Likewise.

Sun Sep  1 18:01:35 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/fpu/__math.h: Check for __NO_M81_MATH_INLINES
	instead of __NO_MATH_INLINES.
	(__M81_MATH_INLINES): Renamed from __MATH_INLINES.
	* sysdeps/m68k/fpu/e_acos.c: Define __NO_M81_MATH_INLINES.
	* sysdeps/m68k/fpu/e_fmod.c: Likewise.
	* sysdeps/m68k/fpu/k_cos.c: Likewise.
	* sysdeps/m68k/fpu/k_sin.c: Likewise.
	* sysdeps/m68k/fpu/k_tan.c: Likewise.
	* sysdeps/m68k/fpu/s_atan.c: Likewise.
	* sysdeps/m68k/fpu/s_frexp.c: Likewise.
	* sysdeps/m68k/fpu/s_ilogb.c: Likewise.
	* sysdeps/m68k/fpu/s_isinf.c: Likewise.
	* sysdeps/m68k/fpu/s_ldexp.c: Likewise.
	* sysdeps/m68k/fpu/s_modf.c: Likewise.
	* sysdeps/m68k/fpu/k_cos.c: Use inline version of __cos.
	* sysdeps/m68k/fpu/k_sin.c: Likewise.
	* sysdeps/m68k/fpu/k_tan.c: Likewise.

Mon Sep  9 12:55:14 1996  Ulrich Drepper  <drepper@cygnus.com>

	* nss/nss_files/files-parse.c (INT_FIELD_MAYBE_NULL): Check for
	available character before converting number and return with
	error if none is available.

Fri Sep  6 22:09:08 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/unix/sysv/linux/init-first.h: New file, generic
	implementation for architectures where parameters are passed on
	stack.
	* sysdeps/unix/sysv/linux/m68k/init-first.h: Removed.
	* sysdeps/unix/sysv/linux/i386/init-first.h: Removed.

Fri Sep  6 22:05:32 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* configure.in: Remove unneeded sysnames frobbing.

Mon Sep  9 05:29:09 1996  Ulrich Drepper  <drepper@cygnus.com>

	* time/zic.c: Update from ADO 96l.
	* time/africa: Update from ADO 96k.
	* time/antarctica: Likewise.
	* time/asia: Likewise.
	* time/australia: Likewise.
	* time/europe: Likewise.
	* time/northamerica: Likewise.
	* time/southamerica: Likewise.

Mon Sep  9 05:03:47 1996  NIIBE Yutaka  <gniibe@mri.co.jp>

	* sysdeps/unix/sysv/linux/i386/init-first.h: Work around buggy
	gcc <= 2.7.2.1 which optimizes away address operations on weak
	objects.

	* nss/nss_files/files-parse.c (INT_FIELD_MAYBE_NULL): New macro.
	Like INT_FIELD but also accept non-existing field.
	* shadow/sgetspent_r.c (LINE_PARSER): Use INT_FIELD_MAYBE_NULL
	for last four fields.
	* shadow/putspent.c (putspent): Print `:' after numeric value.

Mon Sep  9 02:42:48 1996  Richard Henderson  <rth@tamu.edu>

	* libio/stdio.h (BUFSIZ): Define using _IO_BUFSIZ.

Sun Sep  8 16:43:56 1996  Ulrich Drepper  <drepper@cygnus.com>

	* Make-dist: Filter out $(add-ons) from $(subdirs).
	Don't distribute TAGS files.
	($(tardir).tar): Remove dist.tar when all is done.
	* manual/Makefile (distribute): Add libc.info*.
	* libio/Makefile (distribute): Add Banner.
	* inet/Makefile (headers): Add netinet/tcp.h.

	* resolv/Makefile (libresolv-routines): Add getnetnamadr.

	* crypt-README: Removed.
	* gnu-stabs.h: Removed.

	* sysdeps/alpha/copysign.S: Renamed to...
	* sysdeps/alpha/s_copysign.S: ...this.
	* sysdeps/alpha/fabs.S: Renamed to...
	* sysdeps/alpha/s_fabs.S: ...this.

	* sysdeps/m68k/isinfl.c: Renamed to...
	* sysdeps/m68k/s_isinfl.c: ...this.
	* sysdeps/m68k/isnanl.c: Renamed to...
	* sysdeps/m68k/s_isnanl.c: ...this.

	* sysdeps/sparc/sqrt.c: Renamed to...
	* sysdeps/sparc/e_sqrt.c: ...this.  Function name now is
	__ieee754_sqrt.

	* sysdeps/generic/get_str.c: Removed.

	* sysdeps/ieee754/cbrt.c: Removed.
	* sysdeps/ieee754/drem.c: Removed.
	* sysdeps/ieee754/logb.c: Removed.
	* sysdeps/ieee754/sqrt.c: Removed.

	* sysdeps/stub/cbrt.c: Removed.
	* sysdeps/stub/cos.c: Removed.
	* sysdeps/stub/drem.c: Removed.
	* sysdeps/stub/isinf.c: Removed.
	* sysdeps/stub/isinfl.c: Removed.
	* sysdeps/stub/isnanl.c: Removed.
	* sysdeps/stub/logb.c: Removed.
	* sysdeps/stub/sin.c: Removed.
	* sysdeps/stub/sqrt.c: Removed.

	* sysdeps/tahoe/log10.c: Removed.

	* sysdeps/vax/index.s: Removed.
	* sysdeps/vax/rindex.s: Removed.
	* sysdeps/vax/bcmp.s: Removed.
	* sysdeps/vax/log10.c: Removed.
	* sysdeps/vax/infnan.c: Removed.
	* sysdeps/vax/Dist: Add fl.h.

	* sysdeps/unix/sysv/linux/alpha/Dist: Add llseek.S.

	* inet/rcmd.c (rcmd): Make messages more uniform.

Sun Sep  8 14:15:42 1996  Ulrich Drepper  <drepper@cygnus.com>

	* po/de.po: Update.
	* po/es.po: Update.
	* po/ko.po: Update.
	* po/pl.po: New file.
	* po/nl.po: New file.

	take care for a possible clash.  Nobody will name the domain
1996-09-10 02:00:15 +00:00
Ulrich Drepper c2bb8cabc5 third update from main archive 960907
Sat Sep  7 18:41:17 1996  Richard Henderson  <rth@tamu.edu>

	* Makeconfig (+link): Filter out start, pre & postinit from the
	generic depenancies as well.
	* Rules: Add start, pre & postinit to the dependancies of
	$(others) and $(tests).

	* configure.in: elf_dirs missing "sysdeps" component.

	* locale/Makefile (distribute): Add locale.c and localedef.c.
1996-09-08 02:16:48 +00:00
Ulrich Drepper 8ca5c11bdf second update 960907 from main archive
Sun Sep  8 02:36:02 1996  Ulrich Drepper  <drepper@cygnus.com>

	* locale/SYS_libc.c (_libc_intl_domainname): Change value to "libc".
	This is consistent with all other GNU packages.  We shouldn't
	take care for a possible clash.  Somebody will name the domain
	of a package libc if it is not the libc itself.
	* MakeTAGS ($P/SYS_libc.pot): Rename to $P/libc.pot.
	* po/Makefile (domainname): Change to libc.
	(distribute): Now ship libc.pot.
	* catgets/gencat.c (usage): Use `PACKAGE' for package name in
	version information banner.
	Change bug report address to bug-glibc@prep not @gnu.
	* db/makedb.c (PACKAGE): New macro.  Set to _libc_intl_domain.
	(main): Use `PACKAGE' for package name in version information
	banner.
	Change bug report address to bug-glibc@prep not @gnu.
	* locale/programs/locale.c (main): Use `PACKAGE' for package name
 	in version information banner.
	Change bug report address to bug-glibc@prep not @gnu.
	* locale/programs/localedef.c (main): Likewise.

	* version.h (VERSION): Bump to 1.94.

	* libio/iofdopen: Initialize _lock field only if _IO_MTSAFE_IO.
1996-09-08 02:07:08 +00:00
Ulrich Drepper 499e7464ed update from main archive 960907
Sat Sep  7 14:00:33 1996  David Mosberger-Tang  <davidm@azstarnet.com>

	* catgets/catgets.c (catopen): Allocate sizeof(*result) bytes
	instead of sizeof(nl_catd) (which is just a pointer!).

Sat Sep  7 19:39:19 1996  Ulrich Drepper  <drepper@cygnus.com>

	* Makefile ($(objpfx)version-info.h): Generate from Banner files.
	* version.c (banner): Add contents of version-info.h to string.

	* Makerules: If $($(subdir)-version) is available name versioned
	shared library according to this value instead of glibc's version.

	* libio/Banner: New file.

	* elf/eval.c (funcall): Write error message in case function is
	not found.
	(eval): Recognize `_' in names.
1996-09-07 23:56:19 +00:00
Ulrich Drepper edf5b2d716 update from main archive 960906
Sat Sep  7 05:15:45 1996  Ulrich Drepper  <drepper@cygnus.com>

 	* libio/iofdopen: Initialize _lock field only if _IO_MTSAFE_IO.
	* libio/iofopen: Likewise.
	* libio/iofopncook.c: Likewise.
	* libio/iopopen.c: Likewise.
	* libio/iovsprintf.c: Likewise.
	* libio/iovsscanf.c: Likewise.
	* libio/memstream.c: Likewise.
	* libio/vasprintf.c: Likewise.
	* libio/vdprintf.c: Likewise.
	* libio/vsnprintf.c: Likewise.

Sat Sep  7 03:55:47 1996  Ulrich Drepper  <drepper@cygnus.com>

	* Makeconfig (soversions.mk): Also use shlib-versions files
	in add-on directories.
	* config.make.in (config-defines): Remove.  Not used anymore.
	(defines): New variable.  Initiliazed by @DEFINES@.
	* configure.in: Add AC_SUBST(DEFINES).

	* libio/Makefile (routines): When compiling reentrant libc add
 	clearerr_u, feof_u, ferror_u, fputc_u, getc_u, getchar_u,
 	iofflush_u, putc_u, putchar_u, ioflockfile.
	(CPPFLAGS): Add -D_IO_MTSAFE_IO for reentrant libc.

	* sysdeps/stub/libc-lock.h: Add stubs for __libc_cleanup_region_start
	and __libc_cleanup_region_end.

	* sysdeps/unix/i386/sysdep.S [_LIBC_REENTRANT]: Set errno
 	using __errno_location function.
	* sysdeps/unix/sysv/linux/i386/sysdep.S [_LIBC_REENTRANT]: Set errno
	using __errno_location function.
	(__errno_location): New function.
	* sysdeps/unix/sysv/linux/i386/sysdep.h [PIC]: Add second
 	syscall_error handler for reentrant libc.

	* sysdeps/unix/opendir.c: Remove unneeded `;'.

	* libio.h [_IO_MTSAFE_IO]: Include <pthread.h>.
	[!_IO_MTSAFE_IO]: Define _IO_flockfile and _IO_funlockfile
	as empty macros.
	* libioP.h: Include <libc-lock.h>.
	* libio/stdio.h: Add prototypes for *_locked and *_unlocked
	functions.

	* libio/clearerr.c: Use _IO_ protected versions of flockfile
	and funlockfile to be namespace clean.

	* libio/genops.c: Use __libc_lock_* macros for handling lock.

	* libio/iofdopen: Add initialization of _lock in _IO_FILE.
	* libio/iofopen: Likewise.
	* libio/iofopncook.c: Likewise.
	* libio/iopopen.c: Likewise.
	* libio/iovsprintf.c: Likewise.
	* libio/iovsscanf.c: Likewise.
	* libio/memstream.c: Likewise.
	* libio/vasprintf.c: Likewise.
	* libio/vdprintf.c: Likewise.
	* libio/vsnprintf.c: Likewise.

	* libio/fgetc.c: Use __libc_cleanup_region_* macros instead
	of flockfile etc.
	* libio/fputc.c: Likewise.
	* libio/freopen.c: Likewise.
	* libio/fseek.c: Likewise.
	* libio/getc.c: Likewise.
	* libio/getchar.c: Likewise.
	* libio/iofclose.c: Likewise.
	* libio/iofflush.c: Likewise.
	* libio/iofgetpos.c: Likewise.
	* libio/iofgets.c: Likewise.
	* libio/iofputs.c: Likewise.
	* libio/iofread.c: Likewise.
	* libio/iofsetpos.c: Likewise.
	* libio/ioftell.c: Likewise.
	* libio/iofwrite.c: Likewise.
	* libio/iogetdelim.c: Likewise.
	* libio/iogets.c: Likewise.
	* libio/ioputs.c: Likewise.
	* libio/iosetbuffer.c: Likewise.
	* libio/iosetvbuf.c: Likewise.
	* libio/ioungetc.c: Likewise.
	* libio/putc.c: Likewise.
	* libio/putchar.c: Likewise.
	* libio/rewind.c: Likewise.
	* stdio-common/vfprintf.c: Likewise.
	* stdio-common/vfscanf.c: Likewise.

	* libio/clearerr_u.c: Correct alias name.
	* libio/ferror_u.c: Likewise.
	* libio/fileno.c: Likewise.
	* libio/fputc_u.c: Likewise.
	* libio/getc.c: Likewise.
	* libio/getc_u.c: Likewise.
	* libio/getchar.c: Likewise.
	* libio/getchar_u.c: Likewise.
	* libio/putc.c: Likewise.
	* libio/putchar.c: Likewise.

	* libio/feof_u.c: Undefine macro with name of function before
 	definition of function itself.

	* libio/ioflockfile.c: New file.  Implementation of flockfile and
 	funlockfile.

	* libio/putchar_u.c: Fix typo.  Use stdout instead of fp.

	* malloc/malloc.h: Don't include <libc-lock.h> and don't declare
 	_malloc_loc.

	* malloc/free.c: Include <libc-lock.h>.
	* malloc/realloc.c: Likewise.
	* malloc/malloc-find.c: Likewise.
	* malloc/malloc-size.c: Likewise.
	* malloc/malloc-walk.c: Likewise.
	* malloc/memalign.c: Likewise.
	* malloc/malloc.c: Likewise.

	* sysdeps/i386/dl-machine.h: Correct clearing of _dl_starting_up.

Fri Sep  6 19:38:49 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/stub/libc-lock.h: Define __libc_lock_critical_start
	and __libc_lock_critical_end as empty macros.

	* malloc/malloc.h: Don't include <libc-lock.h> and don't declare
	__libc_malloc_lock.
	* malloc/free.c: Include <libc-lock.h>.
	* malloc/malloc-find.c: Likewise.
	* malloc/malloc-size.c: Likewise.
	* malloc/malloc-walk.c: Likewise.
	* malloc/malloc.c: Likewise.
	* malloc/memalign.c: Likewise.
	* malloc/realloc.c: Likewise.

	* Makefile: Undo change from Mon Sep  2 22:15:14 1996.  No more
	extra_solibs pass.
	* Rules: Likewise.
	* extra-lib.mk: Likewise.
	* manual/Makefile: Likewise.

	* db/Makefile (makedb): Choose dependecies based on build-shared.
	Patch by Andres Schwab.

	* sysdeps/posix/sysconf.c: Don't use PTHREAD_DESTRUCTOR_ITERATIONS
 	but _POSIX_THREAD_DESTRUCTOR_ITERATIONS.

	* sysdeps/unix/sysv/linux/errnos.h: New file.
	* sysdeps/unix/sysv/linux/schedbits.h: New file.
	* sysdeps/unix/sysv/linux/waitflags.h: New file.

	* sysdeps/unix/sysv/linux/gnu/types.h: Add definition of `key_t'.

Fri Sep  6 08:26:31 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* rpm/template: Fix typo in %build section.

Fri Sep  6 03:31:07 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/unix/sysv/linux/errnos.h: Don't define errno macro when
	building libc without thread support.
	* resolv/netdb.h: Likewise for h_errno macro.

Thu Sep  5 23:01:48 1996  Ulrich Drepper  <drepper@cygnus.com>

	* libc-symbols.h: Add new macro weak_const_function.  It's like
	weak_function, but the function is additionally marked as const.
	* features.h: Only include <sys/cdefs.h> if !__ASSEMBLER__.

Thu Sep  5 22:55:49 1996  Richard Henderson  <rth@tamu.edu>

	* inet/herrno.c (__h_errno_location): New function.
	(h_errno): Make strong_alias __h_errno so that we can access
	the variable even if `h_errno' is a macro.
	* resolv/netdb.h: Define macro h_errno to access thread specific
	version of h_errno variable.  Declare alias __h_errno for h_errno.
	* resolv/res_query (h_errno): Remove definition.
	* sysdeps/unix/sysv/linux/errnos.h [!__ASSEMBLER__ && __USE_REENTRANT]:
 	Add macro `errno' to get thread specific variable.
	* sysdeps/unix/alpha/sysdep.S [_LIBC_REENTRANT]: Set errno using
 	__errno_location function.
	(__errno_location): New function.

Thu Sep  5 21:08:44 1996  Ulrich Drepper  <drepper@cygnus.com>

	* posix/gnu/types.h: Remove definition of key_t.
	* sysdeps/generic/gnu/types.h: Move it to here.
	* sysdeps/unix/sysv/linux/gnu/types.h: Add Linux specific
	definition of key_t.

	* sysdeps/unix/sysv/linux/waitflags.h: New file.  Linux specific
	definitions.
	* sysdeps/unix/sysv/linux/schedbits.h: New file.  Include
	clone prototypes and associated flags.

Thu Sep  5 08:58:47 1996  Richard Henderson  <rth@tamu.edu>

	* sysdeps/alpha/elf/start.S: Make _start global again.

	hertz.
	here.

Wed Sep  4 16:16:13 1996  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/mach/hurd/send.c (__send): De-ANSI-fy.
	* sysdeps/mach/hurd/sendto.c (sendto): Likewise.
1996-09-07 04:10:57 +00:00
Karl Berry 474be527c8 Formatting change, define @pounds, etc. 1996-09-06 19:24:48 +00:00
289 changed files with 13305 additions and 5508 deletions
+980 -3
View File
File diff suppressed because it is too large Load Diff
+56
View File
@@ -49,6 +49,12 @@ please let me know.
[Q13] ``How do I configure GNU libc so that the essential libraries
like libc.so go into /lib and the other into /usr/lib?''
[Q14] ``When linking with the new libc I get unresolved symbols
`crypt' and `setkey'. Why aren't these functions in the
libc anymore?''
[Q15] ``What are these `add-ons'?''
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
[Q1] ``What systems does the GNU C Library run on?''
@@ -368,6 +374,56 @@ the second line the directory for file which are by tradition placed
in a directory named /etc.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
[Q14] ``When linking with the new libc I get unresolved symbols
`crypt' and `setkey'. Why aren't these functions in the
libc anymore?''
[A14] {UD} Remember the US restrictions of exporting cryptographic
programs and source code. Until this law gets abolished we cannot
ship the cryptographic function together with the libc.
But of course we provide the code and there is an very easy way to use
this code. First get the extra package. People in the US way get it
from the same place they got the GNU libc from. People outside the US
should get the code from ftp.uni-c.dk [129.142.6.74], or another
archive site outside the USA. The README explains how to install the
sources.
If you already have the crypt code on your system the reason for the
failure is probably that you failed to link with -lcrypt. The crypto
functions are in a separate library to make it possible to export GNU
libc binaries from the US.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
[Q15] ``What are these `add-ons'?''
[A15] {UD} To avoid complications with external or external source
code some optional parts of the libc are distributed as separate
packages (e.g., the crypt package, see Q14).
To ease the use as part of GNU libc the installer just has to unpack
the package and tell the configuration script about these additional
subdirectories using the --enable-add-ons option. When you add the
crypt add-on you just have to use
configure --enable-add-ons=crypt,XXX ...
where XXX are possible other add-ons and ... means the rest of the
normal option list.
You can use add-ons also to overwrite some files in glibc. The add-on
system dependent subdirs are search first. It is also possible to add
banner files (use a file named `Banner') or create shared libraries.
Using add-ons has the big advantage that the makefiles of the GNU libc
can be used. Only some few stub rules must be written to get
everything running. Even handling of architecture dependent
compilation is provided. The GNU libc's sysdeps/ directory shows how
to use this feature.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Answers were given by:
+9 -5
View File
@@ -157,7 +157,7 @@ build the GNU C library:
recommend you port GNU `make' instead. *Really.* We recommend
version GNU `make' version 3.75 or later.
* GCC 2.7.2
* GCC 2.7.2.1
On most platforms, the GNU C library can only be compiled with the
GNU C compiler. We recommend GCC version 2.7.2 or later; earlier
@@ -177,14 +177,19 @@ Supported Configurations
The GNU C Library currently supports configurations that match the
following patterns:
alpha-dec-osf1
alpha-ANYTHING-linux
alpha-ANYTHING-linuxecoff
iX86-ANYTHING-bsd4.3
iX86-ANYTHING-gnu
iX86-ANYTHING-linux
m68k-ANYTHING-linux
Former versions of this library used to support the following
configurations but the current status is unknown:
alpha-dec-osf1
iX86-ANYTHING-bsd4.3
iX86-ANYTHING-isc2.2
iX86-ANYTHING-isc3.N
iX86-ANYTHING-linux
iX86-ANYTHING-sco3.2
iX86-ANYTHING-sco3.2v4
iX86-ANYTHING-sysv
@@ -911,4 +916,3 @@ parts of the library were contributed or worked on by other people.
or `Software.Distribution@CS.CMU.EDU' any improvements or
extensions that they make and grant Carnegie Mellon the
rights to redistribute these changes.
+7 -5
View File
@@ -40,6 +40,9 @@ else
sysdep_dirs := $(addprefix $(..),$(sysdep_dirs))
endif
# Don't distribute add-on subdirs.
subdirs := $(filter-out $(add-ons),$(subdirs))
# Make sure both stdio and libio get in, whichever is in use.
subdirs += stdio libio
@@ -110,8 +113,7 @@ sources := $(filter-out $(addsuffix .c,$(basename $(.S.s))),$(sources)) $(.S.s)
$(addsuffix .c,$(sysdep_routines)) \
$(+subdir-nodist)
#foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
+tsrcs := $(filter-out $(+out) $(addprefix %/,$(+out)), \
$(sources) $(all-headers) $(distribute)) \
+tsrcs := $(filter-out $(+out), $(sources) $(all-headers) $(distribute)) \
$(+sysdeps)
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
foo:=$(shell echo generated='$(generated)' >&2)
@@ -129,8 +131,8 @@ endif
$(..)glibc-$(version):
ln -s . $@
+tsrcs := $(+tsrcs) \
TAGS
#+tsrcs := $(+tsrcs) \
# TAGS
.PHONY: TAGS
TAGS: $(..)MakeTAGS
$(MAKE) -f $< $@ -o subdir_TAGS
@@ -195,7 +197,7 @@ $(tardir).tar: dist.tar subdir_dist
@echo Files listed here have names exceeding 14 chars.
tar xfv $< -C /tmp | sed -n '/[^/]\{15,\}/p'
tar covf $@ -C /tmp $(tardir)
-rm -fr /tmp/$(tardir) &
-rm -fr /tmp/$(tardir) dist.tar &
%.Z: %
compress -c $< > $@
+5 -2
View File
@@ -166,9 +166,12 @@ $P/subdirs.pot: $(subdirs:%=$P/%.pot)
include $(common-objpfx)version.mk
# Combine all the messages into the final sorted template translation file.
$P/SYS_libc.pot: $(all-pot)
# The following code requires GNU date.
$P/libc.pot: $(all-pot)
@rm -f $@.new
sed -e 's/VERSION/$(version)/' -e "s/DATE/`date +'%Y-%m-%d %k:%M'`/" \
disp='set `date -R`; echo $$6'; \
sed -e 's/VERSION/$(version)/' \
-e "s/DATE/`date +'%Y-%m-%d %I:%M'$$disp/" \
po/header.pot > $@.new
$(XGETTEXT) -d - --omit-header -n -s $^ >> $@.new
mv -f $@.new $@
+18 -11
View File
@@ -303,7 +303,8 @@ ifndef +link
+link = $(CC) -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(filter-out $(common-objpfx)libc%,$^) \
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs) $(link-libc) $(+postinit)
endif
ifndef config-LDFLAGS
@@ -523,17 +524,23 @@ ifeq (yes, $(build-shared))
# version numbers to use when we install shared objects on this system.
-include $(common-objpfx)soversions.mk
$(common-objpfx)soversions.mk: $(..)shlib-versions $(..)Makeconfig \
$(wildcard $(patsubst %, $(..)%/shlib-versions,\
$(add-ons))) \
$(common-objpfx)config.make
sed 's/#.*$$//' $< | while read conf versions; do \
test -n "$$versions" || continue; \
case '$(config-machine)-$(config-vendor)-$(config-os)' in $$conf)\
for v in $$versions; do \
lib=`echo $$v | sed 's/=.*$$//'`; \
if eval "test -z \"\$$vers_lib$$lib\""; then \
eval vers_lib$${lib}=yes; \
echo $$v | sed "s/^.*=/$$lib.so-version=./"; \
fi; \
done ;; esac; done > $@T; exit 0
(file="$(wildcard $(patsubst %,$(..)%/shlib-versions,$(add-ons))) \
$(..)shlib-versions"; \
for f in $$file; do \
sed 's/#.*$$//' $$f | while read conf versions; do \
test -n "$$versions" || continue; \
case '$(config-machine)-$(config-vendor)-$(config-os)' in $$conf)\
for v in $$versions; do \
lib=`echo $$v | sed 's/=.*$$//'`; \
if eval "test -z \"\$$vers_lib$$lib\""; then \
eval vers_lib$${lib}=yes; \
echo $$v | sed "s/^.*=/$$lib.so-version=./"; \
fi; \
done ;; esac; done; \
done;) > $@T; exit 0
mv -f $@T $@
# Get $(version) defined with the release version number.
+24 -6
View File
@@ -26,7 +26,7 @@ endif
# This is the default target; it makes everything except the tests.
.PHONY: all
all: lib extra_solibs others
all: lib others
define autoconf-it
@-rm -f $@.new
@@ -73,9 +73,9 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
# These are the targets that are made by making them in each subdirectory.
+subdir_targets := subdir_lib extra_solibs objects objs others \
subdir_mostlyclean subdir_clean subdir_distclean \
subdir_realclean tests subdir_lint.out \
+subdir_targets := subdir_lib objects objs others subdir_mostlyclean \
subdir_clean subdir_distclean subdir_realclean \
tests subdir_lint.out \
subdir_distinfo \
subdir_echo-headers subdir_echo-distinfo \
subdir_install \
@@ -84,6 +84,7 @@ subdirs := $(filter mach,$(subdirs)) $(filter hurd,$(subdirs)) \
headers := errno.h sys/errno.h errnos.h limits.h values.h \
features.h gnu-versions.h libc-lock.h
aux = sysdep $(libc-init) version
before-compile = $(objpfx)version-info.h
echo-headers: subdir_echo-headers
@@ -129,6 +130,23 @@ $(objpfx)sysd-dirs: $(+sysdir_pfx)config.make
echo endef) > $@-tmp
mv -f $@-tmp $@
$(objpfx)version-info.h: $(..)Makefile $(+sysdir_pfx)config.make
(first=yes; \
for dir in $(subdirs); do \
if [ -r $$dir/Banner ]; then \
if [ $$first = yes ]; then \
echo "\"Available extensions:"; \
first=no; \
fi; \
sed -e '/^#/d' -e 's/^[[:space:]]*/ /' $$dir/Banner; \
fi; \
done; \
[ $$first = yes ] || echo "\"") > $@-tmp
mv -f $@-tmp $@
version.c-objects := $(addprefix $(objpfx)version,$(object-suffixes))
$(version.c-objects): $(objpfx)version-info.h
# Makerules creates a file `stub-$(subdir)' for each subdirectory, which
# contains `#define __stub_FUNCTION' for each function which is a stub.
# Here we paste all of these together into <stubs.h>.
@@ -234,12 +252,12 @@ distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
ansidecl.h mkinstalldirs move-if-change install-sh \
configure configure.in aclocal.m4 config.sub config.guess\
config.h.in config.make.in config-name.in Makefile.in \
autolock.sh munch-tmpl.c munch.awk \
autolock.sh munch-tmpl.c munch.awk interp.c \
sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions \
rpm/Makefile rpm/template rpm/rpmrc
distribute := $(strip $(distribute))
generated := $(generated) stubs.h
generated := $(generated) stubs.h version-info.h
README: README.template version.c ; # Make-dist should update README.
+25
View File
@@ -316,6 +316,15 @@ else
no-whole-archive =
endif
interp-obj = $(common-objpfx)interp.so
$(interp-obj): $(common-objpfx)%.so: $(..)%.c
$(compile-command.c)
common-generated += interp.so
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'
$(common-objpfx)libc.so: $(interp-obj)
$(patsubst %,$(objpfx)%.so,$(extra-libs)): $(interp-obj)
define build-shlib
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
-B$(csu-objpfx) \
@@ -643,6 +652,7 @@ object-suffixes-left := $(versioned)
include $(o-iterator)
ifeq (,$($(subdir)-version))
define o-iterator-doit
$(libdir)/$o$($o-version): $(libdir)/$(o:.so=)-$(version).so; $$(make-link)
endef
@@ -654,6 +664,21 @@ $(libdir)/$(o:.so=)-$(version).so: $(objpfx)$o; $$(do-install-program)
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
else
define o-iterator-doit
$(libdir)/$o$($o-version): $(libdir)/$(o:.so=)-$($(subdir)-version).so;
$$(make-link)
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
define o-iterator-doit
$(libdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o;
$$(do-install-program)
endef
object-suffixes-left := $(versioned)
include $(o-iterator)
endif
endif
define do-install-so
+1 -1
View File
@@ -104,7 +104,7 @@ Version 2.0
* The new header file <fts.h> and suite of functions simplify programs that
operate on directory trees. This code comes from 4.4 BSD.
* The resolver code has been updated from the BIND 4.9.5-T3A release.
* The resolver code has been updated from the BIND 4.9.5-T4B release.
* The new function `malloc_find_object_address' finds the starting address
of a malloc'd block, given any address within the block;
+24 -16
View File
@@ -1,22 +1,29 @@
This directory contains the version 1.93 test release of the GNU C Library.
This directory contains the version 1.94 test release of the GNU C Library.
Many bugs have been fixed since the last release.
Some bugs surely remain.
As of this release, the GNU C library has been ported to the following
As of this release, the GNU C library is known to run on the following
configurations:
*-*-gnu GNU Hurd
i[3456]86-*-linux Linux-2.0 on Intel
m68k-*-linux Linux-2.0 on Motorola 680x0
alpha-*-linux Linux-2.0 on DEC Alpha
Former releases of this library (version 1.09.1 and perhaps earlier
versions) used to run on the following configurations:
alpha-dec-osf1
i[345]86-*-bsd4.3
i[345]86-*-gnu
i[345]86-*-isc2.2
i[345]86-*-isc3
i[345]86-*-linux
i[345]86-*-sco3.2
i[345]86-*-sco3.2v4
i[345]86-*-sysv
i[345]86-*-sysv4
i[345]86-force_cpu386-none
i[345]86-sequent-bsd
i[3456]86-*-bsd4.3
i[3456]86-*-isc2.2
i[3456]86-*-isc3
i[3456]86-*-sco3.2
i[3456]86-*-sco3.2v4
i[3456]86-*-sysv
i[3456]86-*-sysv4
i[3456]86-force_cpu386-none
i[3456]86-sequent-bsd
i960-nindy960-none
m68k-hp-bsd4.3
m68k-mvme135-none
@@ -29,8 +36,9 @@ configurations:
sparc-sun-solaris2
sparc-sun-sunos4
Porting the library is not hard. If you are interested in doing a port,
please get on the mailing list by sending electronic mail to
Whether this is still true for this release is unknown. Porting the
library is not hard. If you are interested in doing a port, please
get on the mailing list by sending electronic mail to
bug-glibc-request@prep.ai.mit.edu.
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
@@ -38,7 +46,7 @@ provides the Unix `crypt' function, plus some other entry points.
Because of the United States export restriction on DES implementations,
we are distributing this code separately from the rest of the C
library. There is an extra distribution tar file just for crypt; it is
called `glibc-1.93-crypt.tar.gz'. You can just unpack the crypt
called `glibc-1.94-crypt.tar.gz'. You can just unpack the crypt
distribution along with the rest of the C library and build; you can
also build the library without getting crypt. Users outside the USA
can get the crypt distribution via anonymous FTP from ftp.uni-c.dk
+22 -14
View File
@@ -2,21 +2,28 @@ This directory contains the version VERSION test release of the GNU C Library.
Many bugs have been fixed since the last release.
Some bugs surely remain.
As of this release, the GNU C library has been ported to the following
As of this release, the GNU C library is known to run on the following
configurations:
*-*-gnu GNU Hurd
i[3456]86-*-linux Linux-2.0 on Intel
m68k-*-linux Linux-2.0 on Motorola 680x0
alpha-*-linux Linux-2.0 on DEC Alpha
Former releases of this library (version 1.09.1 and perhaps earlier
versions) used to run on the following configurations:
alpha-dec-osf1
i[345]86-*-bsd4.3
i[345]86-*-gnu
i[345]86-*-isc2.2
i[345]86-*-isc3
i[345]86-*-linux
i[345]86-*-sco3.2
i[345]86-*-sco3.2v4
i[345]86-*-sysv
i[345]86-*-sysv4
i[345]86-force_cpu386-none
i[345]86-sequent-bsd
i[3456]86-*-bsd4.3
i[3456]86-*-isc2.2
i[3456]86-*-isc3
i[3456]86-*-sco3.2
i[3456]86-*-sco3.2v4
i[3456]86-*-sysv
i[3456]86-*-sysv4
i[3456]86-force_cpu386-none
i[3456]86-sequent-bsd
i960-nindy960-none
m68k-hp-bsd4.3
m68k-mvme135-none
@@ -29,8 +36,9 @@ configurations:
sparc-sun-solaris2
sparc-sun-sunos4
Porting the library is not hard. If you are interested in doing a port,
please get on the mailing list by sending electronic mail to
Whether this is still true for this release is unknown. Porting the
library is not hard. If you are interested in doing a port, please
get on the mailing list by sending electronic mail to
bug-glibc-request@prep.ai.mit.edu.
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
+3 -3
View File
@@ -89,7 +89,8 @@ endif
ifneq "$(strip $(others) $(tests))" ""
$(addprefix $(objpfx),$(others) $(tests)): %: %.o \
$(sort $(filter $(common-objpfx)libc%,$(link-libc)))
$(sort $(filter $(common-objpfx)libc%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link)
endif
@@ -107,14 +108,13 @@ $(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence.
endif # tests
.PHONY: distclean realclean subdir_distclean subdir_realclean \
subdir_clean subdir_mostlyclean extra_solibs
subdir_clean subdir_mostlyclean
subdir_mostlyclean: mostlyclean
subdir_clean: clean
subdir_distclean: distclean
subdir_realclean: realclean
realclean: distclean
distclean: clean
extra_solibs:
.PHONY: subdir_echo-headers
subdir_echo-headers: echo-headers
+1 -1
View File
@@ -34,7 +34,7 @@ catopen (const char *cat_name, int flag)
__nl_catd result;
const char *env_var;
result = (__nl_catd) malloc (sizeof (__nl_catd));
result = (__nl_catd) malloc (sizeof (*result));
if (result == NULL)
/* We cannot get enough memory. */
return (nl_catd) -1;
+6 -4
View File
@@ -166,7 +166,7 @@ main (int argc, char *argv[])
if (do_version)
{
fprintf (stderr, "%s - GNU %s %s\n", program_invocation_name,
"libc", VERSION);
PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}
@@ -202,7 +202,8 @@ usage (int status)
fprintf (stderr, gettext ("Try `%s --help' for more information.\n"),
program_invocation_name);
else
printf(gettext ("\
{
printf(gettext ("\
Usage: %s [OPTION]... -o OUTPUT-FILE [INPUT-FILE]...\n\
%s [OPTION]... [OUTPUT-FILE [INPUT-FILE]...]\n\
Mandatory arguments to long options are mandatory for short options too.\n\
@@ -212,9 +213,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-o, --output=NAME write output to file NAME\n\
-V, --version output version information and exit\n\
If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n\
is -, output is written to standard output.\n\
Report bugs to <bug-glibc@gnu.ai.mit.edu>.\n"),
is -, output is written to standard output.\n"),
program_invocation_name, program_invocation_name);
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
}
exit (status);
}
+22 -22
View File
@@ -81,7 +81,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
i86pc:SunOS:5.*:*)
echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -332,7 +332,7 @@ EOF
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
@@ -341,7 +341,7 @@ EOF
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
echo i386-unknown-cygwin32
echo i386-pc-cygwin32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
@@ -357,26 +357,26 @@ EOF
# 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
echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then
echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0
echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then
echo "${UNAME_MACHINE}-unknown-linux" ; exit 0
echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then
echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0
echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0
elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then
echo "powerpc-unknown-linux" ; exit 0
echo "powerpc-unknown-linux-gnu" ; exit 0
elif test "${UNAME_MACHINE}" = "alpha" ; then
echo alpha-unknown-linux ; exit 0
echo alpha-unknown-linux-gnu ; exit 0
elif test "${UNAME_MACHINE}" = "sparc" ; then
echo sparc-unknown-linux ; exit 0
echo sparc-unknown-linux-gnu ; exit 0
else
# Either a pre-BFD a.out linker (linuxoldld) or one that does not give us
# useful --help. Gcc wants to distinguish between linuxoldld and linuxaout.
# Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us
# useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout.
test ! -d /usr/lib/ldscripts/. \
&& echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0
&& echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
main(argc, argv)
@@ -384,9 +384,9 @@ int argc;
char *argv[];
{
#ifdef __ELF__
printf ("%s-unknown-linux\n", argv[1]);
printf ("%s-pc-linux-gnu\n", argv[1]);
#else
printf ("%s-unknown-linuxaout\n", argv[1]);
printf ("%s-pc-linux-gnuaout\n", argv[1]);
#endif
return 0;
}
@@ -403,25 +403,25 @@ EOF
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i[34]86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-unknown-sysv32
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
Intel:Mach:3*:*)
echo i386-unknown-mach3
echo i386-pc-mach3
exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
@@ -547,7 +547,7 @@ main ()
#endif
#if defined (__386BSD__)
printf ("i386-unknown-bsd\n"); exit (0);
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
+1 -1
View File
@@ -13,7 +13,7 @@ config-vendor = @host_vendor@
config-os = @host_os@
config-sysdirs = @sysnames@
config-defines = @DEFS@
defines = @DEFINES@
elf = @elf@
have-initfini = @libc_cv_have_initfini@
Vendored
+44 -20
View File
@@ -41,6 +41,8 @@
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
@@ -62,11 +64,21 @@ case $1 in
;;
esac
# Separate what the user gave into CPU-COMPANY and OS (if any).
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
@@ -91,33 +103,33 @@ case $os in
;;
-sco5)
os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
@@ -137,7 +149,7 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
| arme[lb] | pyramid \
| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
| alpha | we32k | ns16k | clipper | i370 | sh \
@@ -146,6 +158,12 @@ case $basic_machine in
| sparc | sparclet | sparclite | sparc64)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[3456]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
@@ -325,19 +343,19 @@ case $basic_machine in
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[3456]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i[3456]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i[3456]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i[3456]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
iris | iris4d)
@@ -635,6 +653,8 @@ esac
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
@@ -646,7 +666,7 @@ case $os in
os=-sysv4
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux|'`
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
@@ -657,14 +677,18 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
| -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
| -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems*)
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -linux-gnu*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
Vendored
+31 -27
View File
@@ -2,7 +2,7 @@
# From configure.in CVSid
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.99
# Generated automatically using autoconf version 2.10
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -355,7 +355,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.99"
echo "configure generated by autoconf version 2.10"
exit 0 ;;
-with-* | --with-*)
@@ -690,7 +690,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
subdirs="$add_ons"
add_ons_pfx=
if test x$add_ons != x; then
if test x"$add_ons" != x; then
for f in $add_ons; do
add_ons_pfx="$add_ons_pfx $f/"
done
@@ -717,9 +717,9 @@ NONE)
esac
host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
# We keep the original values in `$config_*' and never modify them, so we
@@ -799,6 +799,11 @@ o=`echo $tail | sed 's/[0-9]*$//'`
if test $o != $tail; then
ostry="$ostry /$o"
fi
# For linux-gnu, try linux-gnu, then linux.
o=`echo $tail | sed 's/-.*$//'`
if test $o != $tail; then
ostry="$ostry /$o"
fi
# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
base=
@@ -878,7 +883,7 @@ if test "$elf" = yes; then
esac
for m in $mach; do
if test -d $xsrcdir${d}sysdeps$m/elf; then
elf_dirs="$elf_dirs $d$m/elf"
elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
fi
done
done
@@ -886,10 +891,6 @@ if test "$elf" = yes; then
fi
# Remove the leading slashes.
sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
# Expand the list of system names into a full list of directories
# from each element's parent name and Implies file (if present).
set $sysnames
@@ -1089,9 +1090,9 @@ NONE)
esac
build=`$ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6
if test $host != $build; then
@@ -1174,13 +1175,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 1178 "configure"
#line 1179 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1189,13 +1190,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1193 "configure"
#line 1194 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1337,7 +1338,7 @@ if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1341 "configure"
#line 1342 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
@@ -1353,7 +1354,7 @@ size_t size; wchar_t wchar;
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
if { (eval echo configure:1357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
@@ -1460,7 +1461,7 @@ if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1464 "configure"
#line 1465 "configure"
#include "confdefs.h"
int main() { return 0; }
@@ -1470,7 +1471,7 @@ asm (".section .init");
asm (".text");
; return 0; }
EOF
if { (eval echo configure:1474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
@@ -1498,7 +1499,7 @@ if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1502 "configure"
#line 1503 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() { return 0; }
@@ -1506,7 +1507,7 @@ int t() {
glibc_foobar ();
; return 0; }
EOF
if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
if { (eval echo configure:1511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
@@ -1600,7 +1601,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
-o conftest conftest.c'; { (eval echo configure:1604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c'; { (eval echo configure:1605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_ld_no_whole_archive=yes
else
libc_cv_ld_no_whole_archive=no
@@ -1621,7 +1622,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions
-o conftest conftest.c'; { (eval echo configure:1625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c'; { (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_no_exceptions=yes
else
libc_cv_gcc_no_exceptions=no
@@ -1754,6 +1755,8 @@ fi
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
config_makefile=
else
@@ -1836,7 +1839,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.99"
echo "$CONFIG_STATUS generated by autoconf version 2.10"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -1912,6 +1915,7 @@ s%@elf@%$elf%g
s%@shared@%$shared%g
s%@profile@%$profile%g
s%@omitfp@%$omitfp%g
s%@DEFINES@%$DEFINES%g
CEOF
EOF
+9 -6
View File
@@ -78,7 +78,7 @@ AC_ARG_ENABLE(add-ons, dnl
[add_ons=])
AC_CONFIG_SUBDIRS($add_ons)
add_ons_pfx=
if test x$add_ons != x; then
if test x"$add_ons" != x; then
for f in $add_ons; do
add_ons_pfx="$add_ons_pfx $f/"
done
@@ -167,6 +167,11 @@ o=`echo $tail | sed 's/[0-9]*$//'`
if test $o != $tail; then
ostry="$ostry /$o"
fi
# For linux-gnu, try linux-gnu, then linux.
o=`echo $tail | sed 's/-.*$//'`
if test $o != $tail; then
ostry="$ostry /$o"
fi
# For unix/sysv/sysv4, try unix/sysv/sysv4, then unix/sysv, then unix.
base=
@@ -248,7 +253,7 @@ if test "$elf" = yes; then
esac
for m in $mach; do
if test -d $xsrcdir${d}sysdeps$m/elf; then
elf_dirs="$elf_dirs $d$m/elf"
elf_dirs="$elf_dirs ${d}sysdeps$m/elf"
fi
done
done
@@ -256,10 +261,6 @@ if test "$elf" = yes; then
fi
# Remove the leading slashes.
sysnames="`echo $sysnames | sed -e 's@^/@@' -e 's@ /@ @g'`"
# Expand the list of system names into a full list of directories
# from each element's parent name and Implies file (if present).
set $sysnames
@@ -668,6 +669,8 @@ fi
AC_SUBST(profile)
AC_SUBST(omitfp)
AC_SUBST(DEFINES)
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
config_makefile=
else
-14
View File
@@ -1,14 +0,0 @@
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
provides the Unix `crypt' function, plus some other entry points. Because
of the United States export restriction on DES implementations, we are
distributing this code separately from the rest of the C library. There is
an extra distribution tar file just for crypt; it is called
`glibc-1.07-crypt.tar.gz'. You can just unpack the crypt distribution
along with the rest of the C library and build; you can also build the
library without getting crypt. Users outside the USA can get the crypt
distribution via anonymous FTP from ftp.uni-c.dk [129.142.6.74], or another
archive site outside the USA. Archive maintainers are encouraged to copy
this distribution to their archives outside the USA. Please get it from
ftp.uni-c.dk; transferring this distribution from prep.ai.mit.edu (or any
other site in the USA) to a site outside the USA is in violation of US
export laws.
+6 -1
View File
@@ -9,6 +9,7 @@ subdir-dirs = btree db hash mpool recno
vpath %.c $(subdir-dirs)
extra-libs := libdb
extra-libs-others := $(extra-libs)
libdb-routines := bt_close bt_conv bt_debug bt_delete bt_get \
bt_open bt_overflow bt_page bt_put bt_search \
bt_seq bt_split bt_utils \
@@ -39,4 +40,8 @@ CFLAGS-hash_func.c := -Wno-unused
# The db code outsmarts the compiler frequently.
override CFLAGS += -Wno-uninitialized
LDLIBS-makedb := db/libdb
ifeq ($(build-shared),yes)
$(objpfx)makedb: $(objpfx)libdb.so$(libdb.so-version)
else
$(objpfx)makedb: $(objpfx)libdb.a
endif
+10 -6
View File
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA. */
#include <fcntl.h>
#include <getopt.h>
#include <libintl.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -32,6 +33,7 @@ Boston, MA 02111-1307, USA. */
/* Get libc version number. */
#include "../version.h"
#define PACKAGE _libc_intl_domainname
/* Long options. */
static const struct option long_options[] =
@@ -112,7 +114,7 @@ main (argc, argv)
/* Version information is requested. */
if (do_version)
printf ("%s - GNU %s %s\n", program_invocation_name, "libc", VERSION);
printf ("%s - GNU %s %s\n", program_invocation_name, PACKAGE, VERSION);
/* Help is requested. */
if (do_help)
@@ -196,7 +198,8 @@ usage (status)
fprintf (stderr, gettext ("Try `%s --help' for more information.\n"),
program_invocation_name);
else
printf (gettext ("\
{
printf (gettext ("\
Usage: %s [OPTION]... INPUT-FILE OUTPUT-FILE\n\
%s [OPTION]... -o OUTPUT-FILE INPUT-FILE\n\
%s [OPTION]... -u INPUT-FILE\n\
@@ -207,10 +210,11 @@ Mandatory arguments to long options are mandatory for short options too.\n\
--quiet don't print messages while building database\n\
-u, --undo print content of database file, one entry a line\n\
-V, --version output version information and exit\n\
If INPUT-FILE is -, input is read from standard input.\n\
Report bugs to <bug-glibc@gnu.ai.mit.edu>.\n"),
program_invocation_name, program_invocation_name,
program_invocation_name);
If INPUT-FILE is -, input is read from standard input.\n"),
program_invocation_name, program_invocation_name,
program_invocation_name);
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
}
exit (status);
}
+3 -2
View File
@@ -37,7 +37,8 @@ rtld-routines := rtld $(dl-routines) dl-sysdep dl-minimal
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
soinit.c sofini.c ldd.sh.in eval.c
extra-libs = libdl
extra-libs = libdl
extra-libs-others = $(extra-libs)
libdl-routines := dlopen dlclose dlsym dlerror dladdr
@@ -46,7 +47,7 @@ all: # Make this the default target; it will be defined in Rules.
include ../Makeconfig
ifeq (yes,$(build-shared))
extra-objs = $(rtld-routines:=.so) soinit.so sofini.so
extra-objs = $(rtld-routines:=.so) soinit.so sofini.so eval.so
generated = librtld.so dl-allobjs.so
install-others = $(slibdir)/$(rtld-installed-name)
install-bin = ldd
+9 -1
View File
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <unistd.h>
#include <dlfcn.h>
static void *funcall (char **stringp);
@@ -27,6 +28,13 @@ funcall (char **stringp)
/* Swallow closing paren. */
++*stringp;
if (args[0] == NULL)
{
static const char unknown[] = "Unknown function\n";
write (1, unknown, sizeof unknown - 1);
return NULL;
}
/* Do it to it. */
__builtin_return (__builtin_apply (args[0],
&argcookie,
@@ -81,7 +89,7 @@ eval (char **stringp)
value = p;
do
++p;
while (*p != '\0' && !isspace (*p) && !ispunct (*p));
while (*p != '\0' && !isspace (*p) && (!ispunct (*p) || *p == '_'));
c = *p;
*p = '\0';
value = dlsym (NULL, value);
+2 -2
View File
@@ -28,7 +28,7 @@ alltypes-$(lib) := $(foreach o,$(object-suffixes-$(lib)),\
ifeq (,$(filter $(lib),$(extra-libs-others)))
lib-noranlib: $(alltypes-$(lib))
ifeq (yes,$(build-shared))
extra_solibs: $(objpfx)$(lib).so$($(lib).so-version)
lib-noranlib: $(objpfx)$(lib).so$($(lib).so-version)
endif
else
others: $(alltypes-$(lib))
@@ -37,7 +37,7 @@ endif
# The linked shared library is never a dependent of lib-noranlib,
# because linking it will depend on libc.so already being built.
ifneq (,$(filter .so,$(object-suffixes-$(lib))))
extra_solibs: $(objpfx)$(lib).so
others: $(objpfx)$(lib).so
endif
+5 -1
View File
@@ -29,6 +29,8 @@ Cambridge, MA 02139, USA. */
_BSD_SOURCE ANSI, POSIX, and 4.3BSD things.
_SVID_SOURCE ANSI, POSIX, and SVID things.
_GNU_SOURCE All of the above, plus GNU extensions.
_REENTRANT Select additionally reentrant object.
_THREAD_SAFE Same as _REENTRANT, often used by other systems.
The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__.
If none of these are defined, the default is all but _GNU_SOURCE.
@@ -137,7 +139,7 @@ Cambridge, MA 02139, USA. */
#define __USE_GNU 1
#endif
#if defined (__USE_GNU) || defined (__USE_MISC)
#if defined (_REENTRANT) || defined (_THREAD_SAFE)
#define __USE_REENTRANT 1
#endif
@@ -160,7 +162,9 @@ Cambridge, MA 02139, USA. */
/* This is here only because every header file already includes this one. */
#ifndef __ASSEMBLER__
#include <sys/cdefs.h>
#endif
/* This is here only because every header file already includes this one. */
#ifndef _LIBC
-75
View File
@@ -1,75 +0,0 @@
#error This file is obsolete.
/* Copyright (C) 1991, 1992, 1994 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. */
#ifndef __GNU_STABS_H
#define __GNU_STABS_H 1
#ifdef HAVE_GNU_LD
/* Alias a function:
function_alias(creat, _creat, int, (file, mode),
DEFUN(creat, (file, mode),
CONST char *file AND int mode))
Yes, this is very repetitive. Nothing you can do about it, so shut up. */
#define function_alias(name, _name, type, args, defun) \
symbol_alias (_name, name);
#define function_alias_void(name, _name, args, defun) \
symbol_alias (_name, name);
#ifdef NO_UNDERSCORES
#define __SYMBOL_PREFIX
#else
#define __SYMBOL_PREFIX "_"
#endif
/* Make references to ALIAS refer to SYMBOL. */
#define symbol_alias(symbol, alias) \
asm(".stabs \"" __SYMBOL_PREFIX #alias "\",11,0,0,0\n"\
".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0")
/* Issue a warning message from the linker whenever SYMBOL is referenced. */
#define warn_references(symbol, msg) \
asm(".stabs \"" msg "\",30,0,0,0\n" \
".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0")
#define stub_warning(name) \
warn_references(name, \
"warning: " #name " is not implemented and will always fail")
#define text_set_element(set, symbol) \
asm(".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
#define data_set_element(set, symbol) \
asm(".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
#define bss_set_element(set, symbol) \
asm(".stabs \"" __SYMBOL_PREFIX #set "\",27,0,0," __SYMBOL_PREFIX #symbol)
#else /* No GNU stabs. */
#define function_alias(name, _name, type, args, defun) \
type defun { return _name args; }
#define function_alias_void(name, _name, args, defun) \
void defun { _name args; }
#endif /* GNU stabs. */
#endif /* gnu-stabs.h */
+11 -2
View File
@@ -49,7 +49,7 @@ routines = hurdstartup hurdinit \
privports \
msgportdemux \
fopenport \
vpprintf \
vpprintf \
ports-get ports-set hurdports hurdmsg \
$(sig) $(dtable) hurdinline port-cleanup report-wait
sig = hurdsig hurdfault siginfo hurd-raise preempt-sig \
@@ -59,7 +59,7 @@ dtable = dtable port2fd new-fd alloc-fd intern-fd \
getdport openport \
fd-close fd-read fd-write hurdioctl ctty-input ctty-output
distribute = hurdstartup.h hurdfault.h hurdhost.h \
faultexc.defs intr-rpc.defs intr-rpc.h
faultexc.defs intr-rpc.defs intr-rpc.h intr-msg.h Notes
# XXX this is a temporary hack; see hurdmalloc.h
routines += hurdmalloc
@@ -68,6 +68,15 @@ distribute += hurdmalloc.h
include ../mach/Machrules
include ../Rules
# XXX sunrpc doesn't build yet for Hurd, but one of its headers is
# crucial nontheless. So sysdeps/mach/hurd/Makefile elides sunrpc
# from $(subdirs), and this rule arranges for the header in question
# to get installed.
install-headers-nosubdir: $(includedir)/rpc/netdb.h
$(includedir)/rpc/netdb.h: $(top_srcdir)/sunrpc/rpc/netdb.h
$(do-install)
# intr-rpc.defs defines the INTR_INTERFACE macro to make the generated RPC
# stubs import <hurd/signal.h> and #define __mach_msg to
# _hurd_intr_rpc_mach_msg.
+2 -1
View File
@@ -31,6 +31,8 @@ struct hurd_port *_hurd_ports;
unsigned int _hurd_nports;
mode_t _hurd_umask;
sigset_t _hurdsig_traced;
char **__libc_argv;
error_t
_hurd_ports_use (int which, error_t (*operate) (mach_port_t))
@@ -165,7 +167,6 @@ _hurd_setproc (process_t procserver)
{
error_t err;
mach_port_t oldmsg;
extern char **__libc_argv;
/* Give the proc server our message port. */
if (err = __proc_setmsgport (procserver, _hurd_msgport, &oldmsg))
-25
View File
@@ -1,25 +0,0 @@
BEGIN { intr=0; wantcall=0; calls=""; }
$1 == "/*" && $2 == "INTR" && $3 == "*/" { intr=1; }
NF == 1 && $1 == "routine" { wantcall=1; next; }
intr != 0 && wantcall == 0 && NF >= 2 && $1 == "routine" \
{
if (substr($2, length($2)-2, 1) == "(")
calls = calls " " substr($2, 0, length($2)-1);
else calls = calls " " $2;
intr=0;
}
wantcall != 0 && NF >= 1 \
{
if (substr($1, length($1)-2, 1) == "(")
calls = calls " " substr($1, 0, length($1)-1);
else calls = calls " " $1;
intr=0;
}
{ wantcall=0; }
END { print varname " :=" calls; }
-45
View File
@@ -1,45 +0,0 @@
# Icky intimate knowledge of MiG output.
BEGIN \
{
nprotolines=0; proto=0;
args=""; echo=1; isintr=0;
intrcall = "__hurd_intr_rpc_" call;
print "#include <hurd/signal.h>";
}
$NF == intrcall { isintr=1; }
NF == 1 && $1 == ")" { proto=0; }
proto \
{
protolines[nprotolines++] = $0;
arg = $NF;
if (substr(arg, 1, 1) == "*")
arg = substr(arg, 2, length(arg)-1);
args = args arg;
}
NF == 1 && $1 == "(" { proto=1; }
NF == 3 && $1 == "InP->Head.msgh_request_port" \
{ portarg = substr($3, 1, length($3)-1); }
{ print $0; }
END \
{
if (isintr)
{
print "\n\n/* User-callable interrupt-handling stub. */";
print "kern_return_t __" call;
print "(";
for (i = 0; i < nprotolines; ++i)
print protolines[i];
print ")";
print "{";
print " return HURD_EINTR_RPC (" portarg ", " \
intrcall "(" args "));";
print "}";
}
print "weak_alias (__" call ", " call ")"
}
-37
View File
@@ -1,37 +0,0 @@
/* Copyright (C) 1994 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/fs.h>
error_t
__hurd_invoke_translator (file_t file, int flags, file_t *newport)
{
error_t err;
enum retry_type doretry;
char retryname[1024]; /* XXX string_t LOSES! */
err = __file_invoke_translator (file, flags, &doretry, retryname, newport);
if (! err)
err = __USEPORT (CRDIR, __hurd_file_name_lookup_retry (port,
doretry, retryname,
flags, 0, newport));
return err;
}
+1 -1
View File
@@ -22,7 +22,7 @@
subdir := inet
headers := netinet/ether.h netinet/in.h netinet/if_ether.h \
$(wildcard arpa/*.h protocols/*.h)
netinet/tcp.h $(wildcard arpa/*.h protocols/*.h)
routines := ntohl ntohs htonl htons \
inet_lnaof inet_mkadr \
+13 -1
View File
@@ -16,7 +16,19 @@ 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 <features.h>
/* We need to have the error status variable of the resolver
accessible in the libc. */
int h_errno;
int __h_errno = 0;
strong_alias (__h_errno, h_errno)
/* When threaded, h_errno may be a per-process variable. */
#ifdef __USE_REENTRANT
int *
weak_const_function
__h_errno_location (void)
{
return &__h_errno;
}
#endif
+1 -1
View File
@@ -173,7 +173,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
from.sin_port >= IPPORT_RESERVED ||
from.sin_port < IPPORT_RESERVED / 2) {
(void)fprintf(stderr,
_("socket: protocol failure in circuit setup.\n"));
_("socket: protocol failure in circuit setup\n"));
goto bad2;
}
}
+6 -18
View File
@@ -1,4 +1,5 @@
/* Copyright (C) 1995 Free Software Foundation, Inc.
/* interp - add information about dynamic loader to shared libray obejcts.
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
@@ -13,21 +14,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., 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. */
#include <math.h>
#undef __isnanl
#undef isnanl
/* Return nonzero if VALUE is not a number. */
int
__isnanl (long double value)
{
return 0;
}
weak_alias (__isnanl, isnanl);
const char __invoke_dynamic_linker__[] __attribute__ ((section (".interp")))
= RUNTIME_LINKER;
+4
View File
@@ -48,6 +48,8 @@ Cambridge, MA 02139, USA. */
/* Enable declarations of GNU extensions, since we are compiling them. */
#define _GNU_SOURCE 1
/* And we also need the data for the reentrant functions. */
#define _REENTRANT 1
#include <config.h>
/*
@@ -202,6 +204,7 @@ extern const char _libc_intl_domainname[];
/* This comes between the return type and function name in
a function definition to make that definition weak. */
#define weak_function __attribute__ ((weak))
#define weak_const_function __attribute__ ((weak, __const__))
#endif /* HAVE_WEAK_SYMBOLS. */
#endif /* Not ASSEMBLER, and GCC 2.7 or later. */
@@ -213,6 +216,7 @@ extern const char _libc_intl_domainname[];
directive for the function symbol, and a `.weak' directive in addition
will produce an error from the assembler. */
#define weak_function /* empty */
#define weak_const_function /* empty */
#endif
+1
View File
@@ -0,0 +1 @@
GNU libio by Per Bothner
+10 -1
View File
@@ -36,9 +36,18 @@ routines := \
\
libc_fatal
include ../Makeconfig
ifneq (,$(filter %REENTRANT, $(defines)))
routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u \
iofflush_u putc_u putchar_u
CPPFLAGS += -D_IO_MTSAFE_IO
endif
aux := \
cleanup fileops genops stdfiles stdio strops
distribute := iolibio.h libioP.h strfile.h
distribute := iolibio.h libioP.h strfile.h Banner
include ../Rules
+2 -2
View File
@@ -24,9 +24,9 @@ clearerr (fp)
FILE *fp;
{
CHECK_FILE (fp, /*nothing*/);
flockfile (fp);
_IO_flockfile (fp);
_IO_clearerr (fp);
funlockfile (fp);
_IO_funlockfile (fp);
}
#ifdef _IO_MTSAFE_IO
+1 -1
View File
@@ -27,4 +27,4 @@ __clearerr_unlocked (fp)
_IO_clearerr (fp);
}
weak_alias (clearerr_unlocked, __clearerr_unlocked)
weak_alias (__clearerr_unlocked, clearerr_unlocked)
+2
View File
@@ -24,6 +24,8 @@ the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#include "stdio.h"
#undef feof_unlocked
int
feof_unlocked (fp)
_IO_FILE* fp;
+2
View File
@@ -24,6 +24,8 @@ the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#include "stdio.h"
#undef ferror_unlocked
int
ferror_unlocked (fp)
_IO_FILE* fp;
+3 -2
View File
@@ -31,8 +31,9 @@ fgetc (fp)
{
int result;
CHECK_FILE (fp, EOF);
flockfile (fp);
__libc_cleanup_region_start (_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_getc_unlocked (fp);
funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+2 -2
View File
@@ -42,6 +42,6 @@ fileno (fp)
it only accesses once a single variable and this is already atomic
(at least at thread level). */
weak_alias (fileno_unlocked, fileno)
weak_alias (fileno_locked, fileno)
weak_alias (fileno, fileno_unlocked)
weak_alias (fileno, fileno_locked)
#endif
+4 -1
View File
@@ -32,8 +32,11 @@ fputc (c, fp)
{
int result;
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_putc_unlocked (c, fp);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
weak_alias (fputc, fputc_locked)
+1 -1
View File
@@ -36,4 +36,4 @@ __fputc_unlocked (c, fp)
return _IO_putc_unlocked (c, fp);
}
weak_alias (fputc_unlocked, __fputc_unlocked)
weak_alias (__fputc_unlocked, fputc_unlocked)
+3 -2
View File
@@ -35,8 +35,9 @@ freopen (filename, mode, fp)
CHECK_FILE (fp, NULL);
if (!(fp->_flags & _IO_IS_FILEBUF))
return NULL;
flockfile (fp);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_freopen (filename, mode, fp);
funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+5 -4
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1993, 1995 Free Software Foundation
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -22,8 +22,8 @@ the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "stdio.h"
#include "libioP.h"
#include "stdio.h"
int
fseek (fp, offset, whence)
@@ -33,8 +33,9 @@ fseek (fp, offset, whence)
{
int result;
CHECK_FILE (fp, -1);
flockfile (fp);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_fseek (fp, offset, whence);
funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+2 -2
View File
@@ -466,7 +466,7 @@ DEFUN(_IO_init, (fp, flags),
fp->_markers = NULL;
fp->_cur_column = 0;
#ifdef _IO_MTSAFE_IO
_IO_mutex_init (fp->_lock);
__libc_lock_init (fp->_lock);
#endif
}
@@ -501,7 +501,7 @@ DEFUN(_IO_default_finish, (fp),
}
#ifdef _IO_MTSAFE_IO
_IO_mutex_destroy (fp->_lock);
__libc_lock_fini (fp->_lock);
#endif
_IO_un_link(fp);
+3 -2
View File
@@ -33,14 +33,15 @@ getc (fp)
{
int result;
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_getc_unlocked (fp);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
#ifdef _IO_MTSAFE_IO
# undef getc_locked
weak_alias (getc_locked, getc)
weak_alias (getc, getc_locked)
#endif
+1 -1
View File
@@ -35,4 +35,4 @@ __getc_unlocked (fp)
return _IO_getc_unlocked (fp);
}
weak_alias (getc_unlocked, __getc_unlocked)
weak_alias (__getc_unlocked, getc_unlocked)
+3 -2
View File
@@ -31,14 +31,15 @@ int
getchar ()
{
int result;
__libc_cleanup_region_start (&_IO_funlockfile, stdin);
_IO_flockfile (stdin);
result = _IO_getc_unlocked (stdin);
_IO_funlockfile (stdin);
__libc_cleanup_region_end (1);
return result;
}
#ifdef _IO_MTSAFE_IO
# undef getchar_locked
weak_alias (getchar_locked, getchar)
weak_alias (getchar, getchar_locked)
#endif
+1 -1
View File
@@ -33,4 +33,4 @@ __getchar_unlocked ()
return _IO_getc_unlocked (stdin);
}
weak_alias (getchar_unlocked, __getchar_unlocked)
weak_alias (__getchar_unlocked, getchar_unlocked)
+2 -1
View File
@@ -35,6 +35,7 @@ _IO_fclose (fp)
CHECK_FILE(fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
status = _IO_file_close_it (fp);
@@ -46,7 +47,7 @@ _IO_fclose (fp)
fp->_IO_file_flags = 0;
free(fp);
}
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return status;
}
+24 -15
View File
@@ -39,7 +39,13 @@ _IO_fdopen (fd, mode)
{
int read_write;
int posix_mode = 0;
struct _IO_FILE_plus *fp;
struct locked_FILE
{
struct _IO_FILE_plus fp;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
} *new_f;
int fd_flags;
switch (*mode++)
@@ -97,28 +103,31 @@ _IO_fdopen (fd, mode)
}
#endif
fp = (struct _IO_FILE_plus *) malloc (sizeof (struct _IO_FILE_plus));
if (fp == NULL)
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
if (new_f == NULL)
return NULL;
_IO_init (&fp->file, 0);
_IO_JUMPS (&fp->file) = &_IO_file_jumps;
_IO_file_init (&fp->file);
#if !_IO_UNIFIED_JUMPTABLES
fp->vtable = NULL;
#ifdef _IO_MTSAFE_IO
new_f->fp.file._lock = &new_f->lock;
#endif
if (_IO_file_attach (&fp->file, fd) == NULL)
_IO_init (&new_f->fp.file, 0);
_IO_JUMPS (&new_f->fp.file) = &_IO_file_jumps;
_IO_file_init (&new_f->fp.file);
#if !_IO_UNIFIED_JUMPTABLES
new_f->fp.vtable = NULL;
#endif
if (_IO_file_attach (&new_f->fp.file, fd) == NULL)
{
_IO_un_link (&fp->file);
free (fp);
_IO_un_link (&new_f->fp.file);
free (new_f);
return NULL;
}
fp->file._flags &= ~_IO_DELETE_DONT_CLOSE;
new_f->fp.file._flags &= ~_IO_DELETE_DONT_CLOSE;
fp->file._IO_file_flags =
_IO_mask_flags (&fp->file, read_write,
new_f->fp.file._IO_file_flags =
_IO_mask_flags (&new_f->fp.file, read_write,
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
return (_IO_FILE *) fp;
return (_IO_FILE *) &new_f->fp;
}
weak_alias (_IO_fdopen, fdopen)
+4 -3
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1993, 1995 Free Software Foundation
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -33,10 +33,11 @@ _IO_fflush (fp)
else
{
int result;
_IO_flockfile (fp);
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_SYNC (fp) ? EOF : 0;
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
}
+3 -2
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1993, 1995 Free Software Foundation
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -33,9 +33,10 @@ _IO_fgetpos (fp, posp)
{
_IO_fpos_t pos;
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
if (pos == _IO_pos_BAD)
{
#ifdef EIO
+3 -2
View File
@@ -35,7 +35,8 @@ _IO_fgets (buf, n, fp)
CHECK_FILE (fp, NULL);
if (n <= 0)
return NULL;
_IO_flockfile (fp);
__libc_cleanup_region_start (&__funlockfile, fp);
__flockfile (fp);
count = _IO_getline (fp, buf, n - 1, '\n', 1);
if (count == 0 || (fp->_IO_file_flags & _IO_ERR_SEEN))
result = NULL;
@@ -44,7 +45,7 @@ _IO_fgets (buf, n, fp)
buf[count] = '\0';
result = buf;
}
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+43
View File
@@ -0,0 +1,43 @@
/*
Copyright (C) 1996 Free Software Foundation
This file is part of the GNU IO Library. This library 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 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.
You should have received a copy of the GNU General Public License
along with this library; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, if you link this library with files
compiled with a GNU compiler to produce an executable, this does not cause
the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#include <libc-lock.h>
void
_IO_flockfile (s)
_IO_FILE *s;
{
__libc_lock_lock (s->_lock);
}
weak_alias (_IO_flockfile, flockfile)
void
_IO_funlockfile (s)
_IO_FILE *s;
{
__libc_lock_unlock (s->_lock);
}
weak_alias (_IO_funlockfile, funlockfile)
+22 -13
View File
@@ -32,20 +32,29 @@ _IO_fopen (filename, mode)
const char *filename;
const char *mode;
{
struct _IO_FILE_plus *fp =
(struct _IO_FILE_plus *) malloc (sizeof (struct _IO_FILE_plus));
if (fp == NULL)
return NULL;
_IO_init (&fp->file, 0);
_IO_JUMPS (&fp->file) = &_IO_file_jumps;
_IO_file_init (&fp->file);
#if !_IO_UNIFIED_JUMPTABLES
fp->vtable = NULL;
struct locked_FILE
{
struct _IO_FILE_plus fp;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
if (_IO_file_fopen (&fp->file, filename, mode) != NULL)
return (_IO_FILE *) fp;
_IO_un_link (&fp->file);
free (fp);
} *new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
if (new_f == NULL)
return NULL;
#ifdef _IO_MTSAFE_IO
new_f->fp.file._lock = &new_f->lock;
#endif
_IO_init (&new_f->fp.file, 0);
_IO_JUMPS (&new_f->fp.file) = &_IO_file_jumps;
_IO_file_init (&new_f->fp.file);
#if !_IO_UNIFIED_JUMPTABLES
new_f->fp.vtable = NULL;
#endif
if (_IO_file_fopen (&new_f->fp.file, filename, mode) != NULL)
return (_IO_FILE *) &new_f->fp;
_IO_un_link (&new_f->fp.file);
free (new_f);
return NULL;
}
+20 -12
View File
@@ -128,7 +128,13 @@ fopencookie (cookie, mode, io_functions)
_IO_cookie_io_functions_t io_functions;
{
int read_write;
struct _IO_cookie_file *cfile;
struct locked_FILE
{
struct _IO_cookie_file cfile;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
} *new_f;
switch (*mode++)
{
@@ -147,21 +153,23 @@ fopencookie (cookie, mode, io_functions)
if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+'))
read_write &= _IO_IS_APPENDING;
cfile = (struct _IO_cookie_file *) malloc (sizeof (struct _IO_cookie_file));
if (cfile == NULL)
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
if (new_f == NULL)
return NULL;
#ifdef _IO_MTSAFE_IO
new_f->cfile.file._lock = &new_f->lock;
#endif
_IO_init (&cfile->file, 0);
_IO_JUMPS (&cfile->file) = &_IO_cookie_jumps;
cfile->cookie = cookie;
cfile->io_functions = io_functions;
_IO_init (&new_f->cfile.file, 0);
_IO_JUMPS (&new_f->cfile.file) = &_IO_cookie_jumps;
new_f->cfile.cookie = cookie;
new_f->cfile.io_functions = io_functions;
_IO_file_init(&cfile->file);
_IO_file_init(&new_f->cfile.file);
cfile->file._IO_file_flags =
_IO_mask_flags (&cfile->file, read_write,
new_f->cfile.file._IO_file_flags =
_IO_mask_flags (&new_f->cfile.file, read_write,
_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
return &cfile->file;
return &new_f->cfile.file;
}
+2 -1
View File
@@ -33,12 +33,13 @@ _IO_fputs (str, fp)
_IO_size_t len = strlen (str);
int result;
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
if (_IO_sputn (fp, str, len) != len)
result = EOF;
else
result = 1;
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+2 -1
View File
@@ -36,9 +36,10 @@ _IO_fread (buf, size, count, fp)
CHECK_FILE (fp, 0);
if (bytes_requested == 0)
return 0;
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return bytes_requested == bytes_read ? count : bytes_read / size;
}
weak_alias (_IO_fread, fread)
+2 -1
View File
@@ -32,6 +32,7 @@ _IO_fsetpos (fp, posp)
{
int result;
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
if (_IO_seekpos (fp, *posp, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD)
{
@@ -44,7 +45,7 @@ _IO_fsetpos (fp, posp)
}
else
result = 0;
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+3 -2
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1993, 1995 Free Software Foundation
Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -32,9 +32,10 @@ _IO_ftell (fp)
{
_IO_pos_t pos;
CHECK_FILE (fp, -1L);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
if (pos == _IO_pos_BAD)
{
#ifdef EIO
+3 -2
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1993 Free Software Foundation
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -36,9 +36,10 @@ _IO_fwrite (buf, size, count, fp)
CHECK_FILE (fp, 0);
if (request == 0)
return 0;
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
written = _IO_sputn (fp, (const char *) buf, request);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
/* Many traditional implementations return 0 if size==0 && count > 0,
but ANSI seems to require us to return count in this case. */
if (written == request)
+3 -2
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1994 Free Software Foundation
Copyright (C) 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -54,6 +54,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
return -1;
}
CHECK_FILE (fp, -1);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
if (_IO_ferror_unlocked (fp))
{
@@ -115,7 +116,7 @@ _IO_getdelim (lineptr, n, delimiter, fp)
result = cur_len;
unlock_return:
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+3 -2
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1993 Free Software Foundation
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -32,6 +32,7 @@ _IO_gets (buf)
_IO_size_t count;
int ch;
__libc_cleanup_region_start (&_IO_funlockfile, _IO_stdin);
_IO_flockfile (_IO_stdin);
ch = _IO_getc_unlocked (_IO_stdin);
if (ch == EOF)
@@ -45,7 +46,7 @@ _IO_gets (buf)
if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN)
return NULL;
}
_IO_funlockfile (_IO_stdin);
__libc_cleanup_region_end (1);
buf[count] = 0;
return buf;
}
+16 -4
View File
@@ -149,10 +149,22 @@ _IO_FILE *
DEFUN(_IO_popen, (command, mode),
const char *command AND const char *mode)
{
_IO_proc_file *fpx = (_IO_proc_file*)malloc(sizeof(_IO_proc_file));
_IO_FILE *fp = (_IO_FILE*)fpx;
if (fp == NULL)
struct locked_FILE
{
struct _IO_proc_file fpx;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
} *new_f;
_IO_FILE *fp;
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
if (new_f == NULL)
return NULL;
#ifdef _IO_MTSAFE_IO
new_f->fpx.file.file._lock = &new_f->lock;
#endif
fp = (_IO_FILE*)&new_f->fpx;
_IO_init(fp, 0);
_IO_JUMPS(fp) = &_IO_proc_jumps;
_IO_file_init(fp);
@@ -161,7 +173,7 @@ DEFUN(_IO_popen, (command, mode),
#endif
if (_IO_proc_open (fp, command, mode) != NULL)
return fp;
free (fpx);
free (new_f);
return NULL;
}
+3 -2
View File
@@ -30,13 +30,14 @@ _IO_puts (str)
{
int result;
_IO_size_t len = strlen (str);
_IO_flockfile (fp);
__libc_cleanup_region_start (&_IO_funlockfile, _IO_stdout);
_IO_flockfile (_IO_stdout);
if (_IO_sputn (_IO_stdout, str, len) == len
&& _IO_putc_unlocked ('\n', _IO_stdout) != EOF)
result = len + 1;
else
result = EOF;
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
weak_alias (_IO_puts, puts)
+2 -1
View File
@@ -31,12 +31,13 @@ _IO_setbuffer (fp, buf, size)
_IO_size_t size;
{
CHECK_FILE (fp, );
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
fp->_flags &= ~_IO_LINE_BUF;
if (!buf)
size = 0;
(void) _IO_SETBUF (fp, buf, size);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
}
weak_alias (_IO_setbuffer, setbuffer)
+3 -2
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1993 Free Software Foundation
Copyright (C) 1993, 1996 Free Software Foundation, Inc.
This file is part of the GNU IO Library. This library is free
software; you can redistribute it and/or modify it under the
@@ -37,6 +37,7 @@ _IO_setvbuf (fp, buf, mode, size)
{
int result;
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
switch (mode)
{
@@ -88,7 +89,7 @@ _IO_setvbuf (fp, buf, mode, size)
}
result = _IO_SETBUF (fp, buf, size) == NULL ? EOF : 0;
unlock_return:
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+2 -1
View File
@@ -33,9 +33,10 @@ _IO_ungetc (c, fp)
CHECK_FILE (fp, EOF);
if (c == EOF)
return EOF;
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_sputbackc (fp, (unsigned char) c);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
+7
View File
@@ -32,7 +32,14 @@ _IO_vsprintf (string, format, args)
_IO_va_list args;
{
_IO_strfile sf;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
int ret;
#ifdef _IO_MTSAFE_IO
sf._f._lock = &lock;
#endif
_IO_init ((_IO_FILE *) &sf, 0);
_IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
_IO_str_init_static ((_IO_FILE *) &sf, string, -1, string);
+4
View File
@@ -30,6 +30,10 @@ DEFUN(_IO_vsscanf, (string, format, args),
const char *string AND const char *format AND _IO_va_list args)
{
_IO_strfile sf;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
sf._f._lock = &lock;
#endif
_IO_init((_IO_FILE*)&sf, 0);
_IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
_IO_str_init_static ((_IO_FILE*)&sf, (char*)string, 0, NULL);
+3 -3
View File
@@ -150,7 +150,7 @@ typedef struct
/* Handle lock. */
#ifdef _IO_MTSAFE_IO
typedef pthread_mutex_t _IO_lock_t;
#include <stdio-lock.h>
#else
typedef void _IO_lock_t;
#endif
@@ -272,10 +272,10 @@ extern int _IO_putc_locked __P ((int, _IO_FILE *));
extern void _IO_flockfile __P ((_IO_FILE *));
extern void _IO_funlockfile __P ((_IO_FILE *));
#if !defined(_REENTRANT) && !defined(_THREAD_SAFE)
#ifndef _IO_MTSAFE_IO
# define _IO_flockfile(FILE) /**/
# define _IO_funlockfile(FILE) /**/
#endif /* _REENTRANT || _THREAD_SAFE */
#endif /* !_IO_MTSAFE_IO */
extern int _IO_vfscanf __P((_IO_FILE*, const char*, _IO_va_list, int*));
+10 -1
View File
@@ -26,6 +26,7 @@ the executable file might be covered by the GNU General Public License. */
#ifndef errno
extern int errno;
#endif
#include <libc-lock.h>
#include "iolibio.h"
@@ -341,10 +342,18 @@ extern int _IO_vscanf __P((const char *, _IO_va_list));
#else
#define _IO_FJUMP &_IO_file_jumps,
#endif
#ifdef _IO_MTSAFE_IO
/* check following! */
#define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \
{ _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, _IO_FJUMP FD}
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, _IO_FJUMP FD, \
0, 0, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }
#else
/* check following! */
#define FILEBUF_LITERAL(CHAIN, FLAGS, FD) \
{ _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, CHAIN, _IO_FJUMP FD }
#endif
/* VTABLE_LABEL defines NAME as of the CLASS class.
CNLENGTH is strlen(#CLASS). */
+22 -14
View File
@@ -16,8 +16,8 @@ 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 "strfile.h"
#include "libioP.h"
#include "strfile.h"
#include <stdio.h>
#include <stdlib.h>
@@ -64,26 +64,34 @@ open_memstream (bufloc, sizeloc)
char **bufloc;
_IO_size_t *sizeloc;
{
struct _IO_FILE_memstream *fp;
struct locked_FILE
{
struct _IO_FILE_memstream fp;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
} *new_f;
char *buf;
fp = (struct _IO_FILE_memstream *)
malloc (sizeof (struct _IO_FILE_memstream));
if (fp == NULL)
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
if (new_f == NULL)
return NULL;
#ifdef _IO_MTSAFE_IO
new_f->fp._sf._f._lock = &new_f->lock;
#endif
buf = ALLOC_BUF (_IO_BUFSIZ);
_IO_init (&fp->_sf._f, 0);
_IO_JUMPS (&fp->_sf._f) = &_IO_mem_jumps;
_IO_str_init_static (&fp->_sf._f, buf, _IO_BUFSIZ, buf);
fp->_sf._f._flags &= ~_IO_USER_BUF;
fp->_sf._s._allocate_buffer = (_IO_alloc_type) malloc;
fp->_sf._s._free_buffer = (_IO_free_type) free;
_IO_init (&new_f->fp._sf._f, 0);
_IO_JUMPS (&new_f->fp._sf._f) = &_IO_mem_jumps;
_IO_str_init_static (&new_f->fp._sf._f, buf, _IO_BUFSIZ, buf);
new_f->fp._sf._f._flags &= ~_IO_USER_BUF;
new_f->fp._sf._s._allocate_buffer = (_IO_alloc_type) malloc;
new_f->fp._sf._s._free_buffer = (_IO_free_type) free;
fp->bufloc = bufloc;
fp->sizeloc = sizeloc;
new_f->fp.bufloc = bufloc;
new_f->fp.sizeloc = sizeloc;
return &fp->_sf._f;
return &new_f->fp._sf._f;
}
+3 -2
View File
@@ -28,14 +28,15 @@ putc (c, fp)
{
int result;
CHECK_FILE (fp, EOF);
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_putc_unlocked (c, fp);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
return result;
}
#ifdef _IO_MTSAFE_IO
# undef putc_locked
weak_alias (putc_locked, putc)
weak_alias (putc, putc_locked)
#endif
+4
View File
@@ -29,3 +29,7 @@ putc_unlocked (c, fp)
CHECK_FILE (fp, EOF);
return _IO_putc_unlocked (c, fp);
}
#ifdef _LIBC_REENTRANT
weak_alias (putc_unlocked, _IO_putc_unlocked)
#endif
+3 -2
View File
@@ -26,14 +26,15 @@ putchar (c)
int c;
{
int result;
__libc_cleanup_region_start (&_IO_funlockfile, _IO_stdout);
_IO_flockfile (_IO_stdout);
result = _IO_putc_unlocked (c, _IO_stdout);
_IO_funlockfile (_IO_stdout);
__libc_cleanup_region_end (1);
return result;
}
#ifdef _IO_MTSAFE_IO
# undef putchar_locked
weak_alias (putchar_locked, putchar)
weak_alias (putchar, putchar_locked)
#endif
+2 -2
View File
@@ -25,6 +25,6 @@ int
putchar_unlocked (c)
int c;
{
CHECK_FILE (fp, EOF);
return _IO_putc_unlocked (c, fp);
CHECK_FILE (stdout, EOF);
return _IO_putc_unlocked (c, stdout);
}
+3 -2
View File
@@ -21,15 +21,16 @@ the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "stdio.h"
#include "libioP.h"
#include "stdio.h"
void
rewind (fp)
_IO_FILE* fp;
{
CHECK_FILE (fp, );
__libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
_IO_rewind (fp);
_IO_funlockfile (fp);
__libc_cleanup_region_end (1);
}
+7 -1
View File
@@ -31,10 +31,16 @@ the executable file might be covered by the GNU General Public License. */
#include "libioP.h"
#ifdef _IO_MTSAFE_IO
#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_init; \
struct _IO_FILE_plus NAME \
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps}
#else
#define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
struct _IO_FILE_plus NAME \
= {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps}
#endif
DEF_STDFILE(_IO_stdin_, 0, 0, _IO_NO_WRITES);
DEF_STDFILE(_IO_stdout_, 1, &_IO_stdin_.file, _IO_NO_READS);
+29 -24
View File
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define EOF (-1)
#endif
#ifndef BUFSIZ
#define BUFSIZ 1024
#define BUFSIZ _IO_BUFSIZ
#endif
#define _IOFBF 0 /* Fully buffered. */
@@ -206,39 +206,44 @@ extern const char *const _sys_errlist[];
#endif
/* Handle locking of streams. */
#if defined(_REENTRANT) || defined(_THREAD_SAFE)
#ifdef __USE_REENTRANT
extern void clearerr_locked __P ((FILE *));
extern void clearerr_unlocked __P ((FILE *));
extern void fileno_unlocked __P ((FILE *));
extern int feof_locked __P ((FILE *));
extern int feof_unlocked __P ((FILE *));
extern int ferror_locked __P ((FILE*));
extern int ferror_unlocked __P ((FILE*));
extern int fileno_locked __P ((FILE *));
extern int fileno_unlocked __P ((FILE *));
extern void flockfile __P ((FILE *));
extern void funlockfile __P ((FILE *));
extern int fclose_unlocked __P ((FILE *));
extern int fflush_locked __P ((FILE *));
extern int fflush_unlocked __P ((FILE *));
extern size_t fread_unlocked __P ((void *, size_t, size_t, FILE *));
extern size_t fwrite_unlocked __P ((const void *, size_t, size_t, FILE *));
# define getc_unlocked(fp) _IO_getc_unlocked (fp)
# define getc_locked(fp) _IO_fgetc (fp)
# define getchar_unlocked() getc_unlocked (stdin)
# define getchar_locked() getc_locked (stdin)
# define getc(fp) getc_locked (fp)
extern int fputc_locked __P ((int, FILE*));
extern int fputc_unlocked __P ((int, FILE*));
extern int getc_locked __P ((FILE *));
extern int getc_unlocked __P ((FILE *));
extern int getchar_locked __P ((void));
extern int getchar_unlocked __P ((void));
extern int putc_locked __P ((int, FILE *));
extern int putc_unlocked __P ((int, FILE *));
extern int putchar_locked __P ((int));
extern int putchar_unlocked __P ((int));
# define putc_unlocked(c, fp) _IO_putc_unlocked (c, fp)
# define putc_locked(c, fp) _IO_putc_locked (c, fp)
# define putchar_unlocked(c) putc_unlocked (c, stdout)
# define putchar_locked(c) putc_locked (c, stdout)
# define putc(c, fp) putc_locked (c, fp)
# ifndef _LIBC
# define getc_unlocked(fp) _IO_getc_unlocked (fp)
# define getc_locked(fp) fgetc (fp)
# define getchar_unlocked() _IO_getc_unlocked (stdin)
# define getchar_locked() getc (stdin)
# define putchar_unlocked(c) _IO_putc_unlocked (c, stdout)
# define putchar_locked(c) putc (c, stdout)
# endif
# define feof_unlocked(fp) _IO_feof_unlocked (fp)
# define ferror_unlocked(fp) _IO_ferror_unlocked (fp)
#else
# define getc(fp) _IO_getc_unlocked (fp)
# define putc(c, fp) _IO_putc_unlocked (c, fp)
#endif /* _REENTRANT || _THREAD_SAFE */
#define flockfile(FILE) _IO_flockfile (FILE)
#define funlockfile(FILE) _IO_funlockfile (FILE)
#endif /* __USE_REENTRANT */
#define putchar(c) putc (c, stdout)
#define getchar() getc (stdin)
+6
View File
@@ -38,10 +38,16 @@ _IO_vasprintf (result_ptr, format, args)
const _IO_size_t init_string_size = 100;
char *string;
_IO_strfile sf;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
int ret;
string = ALLOC_BUF(init_string_size);
if (string == NULL)
return -1;
#ifdef _IO_MTSAFE_IO
sf._f._lock = &lock;
#endif
_IO_init((_IO_FILE*)&sf, 0);
_IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
_IO_str_init_static ((_IO_FILE*)&sf, string, init_string_size, string);
+6
View File
@@ -32,8 +32,14 @@ _IO_vdprintf (d, format, arg)
_IO_va_list arg;
{
struct _IO_FILE_plus tmpfil;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
#endif
int done;
#ifdef _IO_MTSAFE_IO
tmpfil.file._lock = &lock;
#endif
_IO_init (&tmpfil.file, 0);
_IO_JUMPS (&tmpfil.file) = &_IO_file_jumps;
_IO_file_init (&tmpfil.file);
+4
View File
@@ -34,6 +34,10 @@ _IO_vsnprintf (string, maxlen, format, args)
{
_IO_strfile sf;
int ret;
#ifdef _IO_MTSAFE_IO
_IO_lock_t lock;
sf._f._lock = &lock;
#endif
_IO_init ((_IO_FILE *) &sf, 0);
_IO_JUMPS ((_IO_FILE *) &sf) = &_IO_str_jumps;
_IO_str_init_static ((_IO_FILE *) &sf, string, maxlen - 1, string);
+1
View File
@@ -25,6 +25,7 @@ headers = locale.h langinfo.h
distribute = localeinfo.h categories.def iso-4217.def weight.h \
strlen-hash.h \
$(addprefix programs/, \
locale.c localedef.c \
$(localedef-modules:=.c) $(locale-modules:=.c) \
$(lib-modules:=.c) config.h simple-hash.h \
charmap-kw.gperf charmap-kw.h locfile-token.h \
+1 -3
View File
@@ -1,6 +1,4 @@
/* Define a constant for the dgettext domainname for libc internal messages,
so the string constant is not repeated in dozens of object files. */
#include "../version.h"
const char _libc_intl_domainname[] = "SYS_GNU_libc-" VERSION;
const char _libc_intl_domainname[] = "libc";
+4 -1
View File
@@ -137,12 +137,15 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (D_FMT, "d_fmt", std, string)
DEFINE_ELEMENT (T_FMT, "t_fmt", std, string)
DEFINE_ELEMENT (T_FMT_AMPM, "t_fmt_ampm", std, string)
DEFINE_ELEMENT (ERA, "era", opt, string)
DEFINE_ELEMENT (ERA, "era", opt, stringarray, 0, 100)/*XXX*/
DEFINE_ELEMENT (ERA_YEAR, "era_year", opt, string)
DEFINE_ELEMENT (ERA_D_FMT, "era_d_fmt", opt, string)
DEFINE_ELEMENT (ALT_DIGITS, "alt_digits", opt, stringarray, 0, 100)
DEFINE_ELEMENT (ERA_D_T_FMT, "era_d_t_fmt", opt, string)
DEFINE_ELEMENT (ERA_T_FMT, "era_t_fmt", opt, string)
DEFINE_ELEMENT (_NL_TIME_ERA_NUM_ENTRIES, "time-era-num-entries", opt, word)
DEFINE_ELEMENT (_NL_TIME_ERA_ENTRIES_EB, "time-era-entries-eb", opt, string)
DEFINE_ELEMENT (_NL_TIME_ERA_ENTRIES_EL, "time-era-entries-el", opt, string)
), NO_POSTLOAD, NULL, NULL, NULL)
+4
View File
@@ -101,6 +101,10 @@ typedef enum
ERA_D_T_FMT, /* Date and time in alternate era format. */
ERA_T_FMT, /* Time in alternate era format. */
_NL_TIME_ERA_NUM_ENTRIES, /* Number entries in the era arrays. */
_NL_TIME_ERA_ENTRIES_EB, /* Structure with era entries in usable form.*/
_NL_TIME_ERA_ENTRIES_EL,
_NL_NUM_LC_TIME, /* Number of indices in LC_TIME category. */
/* LC_COLLATE category: text sorting.
-18
View File
@@ -217,21 +217,3 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
__close (fd);
file->data = newdata;
}
void
_nl_free_locale (const struct locale_data *data)
{
int save = errno;
if (data == NULL)
/* Ignore a null pointer, like free does. */
return;
if (data->name != NULL)
free ((void *) data->name);
if (__munmap ((caddr_t) data->filedata, data->filesize) < 0)
{
if (errno == ENOSYS)
free ((void *) data->filedata);
errno = save;
}
free ((void *) data);
}
+1 -4
View File
@@ -64,7 +64,7 @@ enum coll_sort_rule
sort_mask
};
/* We can map the types of the entries into four categories. */
/* We can map the types of the entries into a few categories. */
enum value_type
{
none,
@@ -113,9 +113,6 @@ extern const struct locale_data *_nl_find_locale (const char *locale_path,
/* Try to load the file described by FILE. */
extern void _nl_load_locale (struct loaded_l10nfile *file, int category);
/* Free the locale data read in by a `_nl_load_locale' call. */
extern void _nl_free_locale (const struct locale_data *);
/* Global variables for LC_COLLATE category data. */
extern const u_int32_t *__collate_table;
+30 -12
View File
@@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA. */
void *xmalloc (size_t __n);
void *xrealloc (void *__p, size_t __n);
/* The real definition of the struct for the LC_TIME locale. */
@@ -53,7 +54,8 @@ struct locale_time_t
const char *d_fmt;
const char *t_fmt;
const char *t_fmt_ampm;
const char *era;
const char **era;
size_t era_num;
const char *era_year;
const char *era_d_t_fmt;
const char *era_t_fmt;
@@ -115,6 +117,7 @@ time_output (struct localedef_t *locale, const char *output_path)
{
struct locale_time_t *time = locale->categories[LC_TIME].time;
struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME)
+ (time->era_num > 0 ? time->era_num - 1 : 0)
+ time->cur_num_alt_digits];
struct locale_file data;
u_int32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)];
@@ -203,22 +206,27 @@ time_output (struct localedef_t *locale, const char *output_path)
iov[2 + cnt].iov_base = (void *) (time->t_fmt_ampm ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
++cnt;
last_idx = ++cnt;
iov[2 + cnt].iov_base = (void *) (time->era ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
++cnt;
idx[1 + last_idx] = idx[last_idx];
for (num = 0; num < time->era_num; ++num, ++cnt)
{
iov[2 + cnt].iov_base = (void *) time->era[num];
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
++last_idx;
iov[2 + cnt].iov_base = (void *) (time->era_year ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len;
++cnt;
++last_idx;
iov[2 + cnt].iov_base = (void *) (time->era_d_fmt ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
idx[1 + cnt] = idx[cnt] + iov[2 + cnt].iov_len;
last_idx = ++cnt;
idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len;
++cnt;
++last_idx;
idx[1 + last_idx] = idx[last_idx];
for (num = 0; num < time->cur_num_alt_digits; ++num, ++cnt)
@@ -267,8 +275,7 @@ too many values for field `%s' in category `LC_TIME'"), \
time->cat[time->cur_num_##cat++] = ""; \
} \
else \
time->cat[time->cur_num_##cat++] \
= code->val.str.start; \
time->cat[time->cur_num_##cat++] = code->val.str.start; \
break
STRARR_ELEM (abday, 7);
@@ -278,6 +285,18 @@ too many values for field `%s' in category `LC_TIME'"), \
STRARR_ELEM (am_pm, 2);
STRARR_ELEM (alt_digits, 100);
case tok_era:
if (code->val.str.start == NULL)
lr_error (lr, _("unknown character in field `%s' of category `%s'"),
"era", "LC_TIME");
else
{
++time->era_num;
time->era = xrealloc (time->era, time->era_num * sizeof (char *));
time->era[time->era_num - 1] = code->val.str.start;
}
break;
#define STR_ELEM(cat) \
case tok_##cat: \
if (time->cat != NULL) \
@@ -298,7 +317,6 @@ field `%s' in category `%s' declared more than once"), \
STR_ELEM (d_fmt);
STR_ELEM (t_fmt);
STR_ELEM (t_fmt_ampm);
STR_ELEM (era);
STR_ELEM (era_year);
STR_ELEM (era_d_t_fmt);
STR_ELEM (era_d_fmt);
+7 -5
View File
@@ -183,7 +183,7 @@ main (int argc, char *argv[])
/* Version information is requested. */
if (do_version)
{
fprintf (stderr, "%s - GNU %s %s\n", __progname, "libc", VERSION);
fprintf (stderr, "%s - GNU %s %s\n", __progname, PACKAGE, VERSION);
exit (EXIT_SUCCESS);
}
@@ -234,7 +234,8 @@ usage (int status)
fprintf (stderr, gettext ("Try `%s --help' for more information.\n"),
__progname);
else
printf (gettext ("\
{
printf (gettext ("\
Usage: %s [OPTION]... name\n\
Mandatory arguments to long options are mandatory for short options too.\n\
-h, --help display this help and exit\n\
@@ -244,9 +245,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
-m, --charmaps write names of available charmaps\n\
\n\
-c, --category-name write names of selected categories\n\
-k, --keyword-name write names of selected keywords\n\
Report bugs to <bug-glibc@gnu.ai.mit.edu>."),
__progname);
-k, --keyword-name write names of selected keywords\n"),
__progname);
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
}
exit (status);
}
+7 -5
View File
@@ -174,7 +174,7 @@ main (int argc, char *argv[])
if (do_version)
{
fprintf (stderr, "%s - GNU %s %s\n", program_invocation_short_name,
"libc", VERSION);
PACKAGE, VERSION);
exit (0);
}
@@ -383,7 +383,8 @@ usage (int status)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_invocation_name);
else
printf (_("\
{
printf (_("\
Usage: %s [OPTION]... name\n\
Mandatory arguments to long options are mandatory for short options too.\n\
-c, --force create output even if warning messages were issued\n\
@@ -396,9 +397,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\
--posix be strictly POSIX conform\n\
\n\
System's directory for character maps: %s\n\
locale files : %s\n\
Report bugs to <bug-glibc@gnu.ai.mit.edu>."),
program_invocation_name, CHARMAP_PATH, LOCALE_PATH);
locale files : %s\n"),
program_invocation_name, CHARMAP_PATH, LOCALE_PATH);
printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
}
exit (status);
}
+9 -35
View File
@@ -326,40 +326,22 @@ setlocale (int category, const char *locale)
&newnames[category]);
if (newdata[category] == NULL)
goto abort_composite;
break;
}
else
{
/* The data is never used; just change the name. */
newnames[category] = clever_copy (newnames[category]);
if (newnames[category] == NULL)
goto abort_composite;
break;
}
/* Create new composite name. */
composite = new_composite_name (LC_ALL, newnames);
if (composite == NULL)
{
/* Loading this part of the locale failed. Abort the
composite load. */
int save_errno;
category = -1;
abort_composite:
save_errno = errno;
while (++category < LC_ALL)
if (_nl_current[category] != NULL
&& newdata[category] != _nl_C[category])
_nl_free_locale (newdata[category]);
else
if (_nl_current[category] == NULL
&& newnames[category] != _nl_C_name)
free (newnames[category]);
errno = save_errno;
composite = NULL;
}
if (category >= 0
|| (composite = new_composite_name (LC_ALL, newnames)) == NULL)
/* Loading this part of the locale failed. Abort the
composite load. */
composite = NULL;
else
{
/* Now we have loaded all the new data. Put it in place. */
@@ -379,7 +361,7 @@ setlocale (int category, const char *locale)
else
{
const struct locale_data *newdata = NULL;
char *newname = NULL;
char *newname = (char *) locale;
/* Protect global data. */
__libc_lock_lock (lock);
@@ -387,7 +369,6 @@ setlocale (int category, const char *locale)
if (_nl_current[category] != NULL)
{
/* Only actually load the data if anything will use it. */
newname = (char *) locale;
newdata = _nl_find_locale (locale_path, locale_path_len, category,
(char **) &newname);
if (newdata == NULL)
@@ -398,14 +379,7 @@ setlocale (int category, const char *locale)
composite = new_composite_name (category, &newname);
if (composite == NULL)
{
/* If anything went wrong free what we managed to allocate
so far. */
int save_errno = errno;
if (_nl_current[category] != NULL)
_nl_free_locale (newdata);
errno = save_errno;
/* Say that we don't have any data loaded. */
abort_single:
newname = NULL;
}
+1 -1
View File
@@ -56,7 +56,7 @@ tests := hello
# `err_*.sub'. Leaving the wildcard allows Make-dist to find all matching
# files in all sysdep directories.
distribute += Machrules syscalls.awk shortcut.awk \
errorlib.h err_*.sub
errorlib.h err_*.sub errsystems.awk
# Clear any environment value.

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