Compare commits

...
Author SHA1 Message Date
Ulrich Drepper 45cfe22efe Update. 1997-12-28 18:24:23 +00:00
Ulrich Drepper cc3685d59f Correctly handle inclusion by stdio.h. 1997-12-28 18:24:07 +00:00
Ulrich Drepper 50b73048e7 (__yp_bind): Make sure socket is closed. 1997-12-28 18:22:49 +00:00
Ulrich Drepper 3ff46a85e2 (RELEASE): Set to "production". 1997-12-28 18:22:33 +00:00
Ulrich Drepper fe361d46d1 Fix typo. Correct check for available add-ons. 1997-12-28 18:22:05 +00:00
Ulrich Drepper c7263463b0 Regenerated: autoconf configure.in 1997-12-28 16:31:10 +00:00
Ulrich Drepper 6dfd809c7c Update. 1997-12-25 00:20:43 +00:00
Ulrich Drepper ad483c3ee8 Linux/Alpha specific definition 1997-12-25 00:20:06 +00:00
Ulrich Drepper 747fe02fc4 Fix typo. 1997-12-24 21:09:13 +00:00
Ulrich Drepper 384dc53f06 Don't redefine _LINUX_TYPES_H. 1997-12-24 21:08:38 +00:00
Ulrich Drepper 7f5a317d8b Define FOPEN_MAX also when included directly. 1997-12-24 21:08:25 +00:00
Ulrich Drepper ad9dd14dbe timespec is in <time.h>. 1997-12-24 21:07:41 +00:00
Ulrich Drepper c0f9cb02b8 Correct handling of overflow. 1997-12-24 21:07:25 +00:00
Ulrich Drepper b1aa8394ef Always define MB_LEN_MAX. 1997-12-24 21:05:48 +00:00
Ulrich Drepper 3c37f45c06 Fix type. Correct check for available add-ons. 1997-12-24 21:05:09 +00:00
Ulrich Drepper 0497df82f5 Update. 1997-12-24 21:04:27 +00:00
Ulrich Drepper 5cc33d237d Regenerated: autoconf configure.in 1997-12-24 14:17:13 +00:00
Ulrich Drepper 4d22dd08e2 Regenerated: autoconf configure.in 1997-12-24 14:16:38 +00:00
Ulrich Drepper 372bb6b15b Regenerated: autoconf configure.in 1997-12-24 03:07:41 +00:00
Ulrich Drepper e1c5692ec0 Update. 1997-12-21 21:24:40 +00:00
Ulrich Drepper 6a4e2e6647 Use __ipc_pid_t for shm_cpid and shm_lpid field. 1997-12-21 21:24:26 +00:00
Ulrich Drepper 91a1478924 Use __ipc_pid_t for msg_lspid and msg_lrpid field. 1997-12-21 21:23:46 +00:00
Ulrich Drepper c6c29e492a Define __ipc_pid_t type. 1997-12-21 21:22:51 +00:00
Ulrich Drepper 87a827b056 Rewrite to recognize __need_FOPEN_MAX. 1997-12-21 21:22:09 +00:00
Ulrich Drepper f376f730eb Generate file which recognizes __need_FOPEN_MAX. 1997-12-21 21:21:02 +00:00
Ulrich Drepper 367179a7f9 (callrpc): Use strncpy instead of strcpy for security reasons. 1997-12-21 21:20:11 +00:00
Ulrich Drepper 355fca3b07 (res_querydomain): Avoid potential buffer overrun. 1997-12-21 21:19:24 +00:00
Ulrich Drepper b1923b80f1 (internal_nis_getservent_r): Use strncpy instead of strcpy for
security reasons.
1997-12-21 21:19:00 +00:00
Ulrich Drepper 2a4bf7e797 (internal_nis_getrpcent_r): Use strncpy instead of strcpy for
security reasons.
1997-12-21 21:18:27 +00:00
Ulrich Drepper 1d806c1fb9 (internal_nis_getprotoent_r): Use strncpy instead of strcpy for
security reasons.
1997-12-21 21:17:55 +00:00
Ulrich Drepper 3ac58092a2 (LINE_PARSER): Use pointer of correct type for map_v4v6_hostent call. 1997-12-21 21:17:10 +00:00
Ulrich Drepper 8841bd89aa (internal_nis_getetherent_r): Use strncpy instead of strcpy for
security reasons.
1997-12-21 21:15:59 +00:00
Ulrich Drepper 6bb6f6d3b7 (do_ypcall): Don't free dom_binding twice. 1997-12-21 21:14:57 +00:00
Ulrich Drepper 5b627ca39d (compile): Use parameter names without __. 1997-12-21 21:14:45 +00:00
Ulrich Drepper 6b6f9ff898 Use correct cast from pointer value. 1997-12-21 21:12:27 +00:00
Ulrich Drepper ec19e4247b (map_collection_max, map_collection_act): Define as size_t. 1997-12-21 21:11:52 +00:00
Ulrich Drepper daaae3fef3 Include stdio_lim.h to get definition of FOPEN_MAX.
Define STREAM_MAX using FOPEN_MAX.
1997-12-21 21:10:46 +00:00
Ulrich Drepper b6c8aca476 (libc_cv_gcc_alpha_ng_prefix): Correct quoting. 1997-12-21 21:09:45 +00:00
Ulrich Drepper 4312093551 Regenerated: autoconf configure.in 1997-12-17 00:40:56 +00:00
Ulrich Drepper 057050b673 update 1997-12-15 02:08:55 +00:00
Ulrich Drepper a7a1285310 Update. 1997-12-12 03:04:39 +00:00
Ulrich Drepper 116a3df36c (__FDMASK): Cast constant 1 to be shifted correctly. 1997-12-12 02:36:13 +00:00
Ulrich Drepper 755feef47c Empty file. 1997-12-12 02:34:06 +00:00
Ulrich Drepper 87f1cf848c (exit): Handle recursive calls to exit (). 1997-12-12 02:33:49 +00:00
Ulrich Drepper 8ad9e4d159 (inet_neta): Change type of first parameter to u_int32_t. 1997-12-12 02:33:38 +00:00
Ulrich Drepper 548a8f3140 (inet_addr): Change return type to u_int32_t. 1997-12-12 02:33:26 +00:00
Ulrich Drepper 7b9a9e4735 Update from glibc 2.1. 1997-12-12 02:33:12 +00:00
Ulrich Drepper 350bcbed8d Update from 2.1. 1997-12-12 02:32:56 +00:00
Ulrich Drepper 3d86ce7fef Reset the blacklist correct, fix return code for non existent +name
entries.
1997-12-12 02:30:31 +00:00
Ulrich Drepper 3af3bc37bf Change types of inet_neta and inet_addr. 1997-12-12 02:30:05 +00:00
Ulrich Drepper 72a5ba9b39 Don't count in multiply reference object in number of prelaoded
objects.  [PR libc/375].
1997-12-12 02:29:49 +00:00
Ulrich Drepper 25c1dd5cbb Add more information of build environment and flags. 1997-12-12 02:29:35 +00:00
Ulrich Drepper b9dbb25306 If --enable-add-ons is given without an argument, set the addons list
to all subdirs with a configure script.
1997-12-12 02:29:18 +00:00
Ulrich Drepper 374d511f46 Regenerated: autoconf configure.in 1997-12-11 23:36:52 +00:00
Ulrich Drepper 995f39cc17 longjmp imlementation for Alpha 1997-12-10 00:43:30 +00:00
Ulrich Drepper 9f960aaf7f Wrapper to make sure we don't have revoke references 1997-12-10 00:42:36 +00:00
Ulrich Drepper 9839483dfd Net interface definition 1997-12-10 00:41:41 +00:00
Ulrich Drepper 19c2c5516d prtcl interface for Linux 1997-12-10 00:41:05 +00:00
Ulrich Drepper de78ade548 Remove setjmp_aux.c. 1997-12-10 00:21:36 +00:00
Ulrich Drepper 158158d2f1 Update. 1997-12-10 00:00:16 +00:00
Ulrich Drepper c5ff2318d8 Return value with expected byte order. 1997-12-09 23:59:57 +00:00
Ulrich Drepper d963ca0bce Add test for isw* functions. 1997-12-09 23:59:04 +00:00
Ulrich Drepper ff7521abb3 Not used anymore. 1997-12-09 23:57:55 +00:00
Ulrich Drepper 99d7ff2522 Care for prefix. 1997-12-09 23:57:43 +00:00
Ulrich Drepper a774024501 Add prctl. 1997-12-09 23:57:19 +00:00
Ulrich Drepper d9b7883dde Add AF_* and PF_ constants from Linux headers. 1997-12-09 23:56:44 +00:00
Ulrich Drepper d00708f29e Add __libc_accept as alias. 1997-12-09 23:56:19 +00:00
Ulrich Drepper 09dbe9e30b [$(subdir)=misc] (sysdep_headers):
Remove sys/module.h.  Add sys/prctl.h and scsi/sg.h.
[$(subdir)=inet] (sysdep_headers): Add net/if_slip.h, net/if_packet.h.
1997-12-09 23:55:24 +00:00
Ulrich Drepper c8e10a1504 Add scsi/sg.h, net/if_packet.h, net/if_slip.h, and sys/prctl.h.
Remove sys/module.h.
1997-12-09 23:53:30 +00:00
Ulrich Drepper af953bfc42 Header for generic SCSI interface 1997-12-09 23:52:12 +00:00
Ulrich Drepper 644f943742 Define socket syscalls with __libc_* names. 1997-12-09 23:51:24 +00:00
Ulrich Drepper c66492a560 Define sysv_signal as weak alias. 1997-12-09 23:50:48 +00:00
Ulrich Drepper 35b27b4cf9 (convert_mask, __sigvec): Don't check int mask beyound its size. 1997-12-09 23:50:07 +00:00
Ulrich Drepper 69de0a9a88 (__sigsetmask): Don't check int mask beyound its size. 1997-12-09 23:49:51 +00:00
Ulrich Drepper c96c016788 (__sigblock): Don't check int mask beyound its size. 1997-12-09 23:49:41 +00:00
Ulrich Drepper e8cd5d9ebd [NO_LONG_DOUBLE]: Correct cabsl. 1997-12-09 23:49:24 +00:00
Ulrich Drepper 8d2880144f Remove cabs definition. 1997-12-09 23:48:27 +00:00
Ulrich Drepper 7234565423 (_dl_runtime_resolve): Care for prefix.
(_start): Likewise.
1997-12-09 23:47:37 +00:00
Ulrich Drepper 3bfd87851a Backport setjmp/longjmp rewrite. 1997-12-09 23:47:06 +00:00
Ulrich Drepper b9ccfd5db2 Rename cu_wait from timeout to not shadow the variable in the outer
scope.
1997-12-09 23:46:25 +00:00
Ulrich Drepper dec3f3e9f4 (__WAIT_INT): Don't use complex version with __typeof for C++ since
this fails for class members.
1997-12-09 23:45:43 +00:00
Ulrich Drepper 4a301c0019 Make sure digits_dots.c sees `resbuf' as struct and not a pointer.
Little optimizations.
1997-12-09 23:44:38 +00:00
Ulrich Drepper bd8cad7a28 Place result' in resbuf and not in buffer'. 1997-12-09 23:44:27 +00:00
Ulrich Drepper 4628e9b01e If buffer is to small, set the file handle for /etc/shadow back in
some more cases.
1997-12-09 23:43:56 +00:00
Ulrich Drepper ee28823eee If buffer is to small, set the file handle for /etc/passwd back in
some more cases.
1997-12-09 23:43:43 +00:00
Ulrich Drepper 50093870ac If buffer is to small, set the file handle for /etc/group back in some
more cases.
1997-12-09 23:43:33 +00:00
Ulrich Drepper d0479b8e41 (malloc_update_mallinfo): Initialize struct for return value. 1997-12-09 23:43:13 +00:00
Ulrich Drepper 028e4ac4ac locale/programs/ld-ctype.c: Write 32bit char classes in correct byte
order.
1997-12-09 23:42:46 +00:00
Ulrich Drepper e5173587a6 Correct data for isw* functions. 1997-12-09 23:41:18 +00:00
Ulrich Drepper 89160f07cb Increase buffer if it is too small. 1997-12-09 23:40:42 +00:00
Ulrich Drepper d88f19572f (libc_cv_gcc_alpha_ng_prefix): New check. 1997-12-09 23:40:11 +00:00
Ulrich Drepper 4716ba4332 (ASM_ALPHA_NG_SYMBOL_PREFIX): New entry. 1997-12-09 23:40:00 +00:00
Ulrich Drepper 83664d664b (compile.S, COMPILE.S, COMPILE.s): Use $(ASFLAGS-*) variable as well. 1997-12-09 23:39:10 +00:00
Ulrich Drepper 27d9ce970e Regenerated: autoconf configure.in 1997-12-06 06:36:13 +00:00
Ulrich Drepper 00e6ecfdca (MAP_FAILED): Add constant. Suggested by Petter Reinholdtsen
<pere@sleeper.link.no> [PR libc/367].
1997-12-03 15:12:16 +00:00
Ulrich Drepper e6894bef41 Update. 1997-11-20 00:13:22 +00:00
Ulrich Drepper 647f47400d (CFLAGS-charmap.c): Add -Wno-char-subscripts.
(CFLAGS-locfile.c): Likewise.
1997-11-20 00:04:45 +00:00
Ulrich Drepper 6ff8657462 (__mktime_internal): Declare sec_requested even if
!LEAP_SECONDS_POSSIBLE, since it's needed at the end when checking
	for time_t overflow.
1997-11-19 23:54:48 +00:00
Ulrich Drepper 43fa95836b (__tzfile_compute): Use negated value of offset for timezone
variable.
1997-11-19 23:54:38 +00:00
Ulrich Drepper cac8e36b1b Update from tzdata1997i. 1997-11-19 23:54:22 +00:00
Ulrich Drepper c7eff75461 Change prototype accordingly. 1997-11-19 23:54:02 +00:00
Ulrich Drepper 7625bfe1d1 cfsetspeed): Change return value to int. 1997-11-19 23:53:54 +00:00
Ulrich Drepper 0303cef99b Include <asm/types.h>. 1997-11-19 23:53:33 +00:00
Ulrich Drepper 30db44f8d9 Correct return value. 1997-11-19 23:53:02 +00:00
Ulrich Drepper 9b04bf4644 Add new values. 1997-11-19 23:52:36 +00:00
Ulrich Drepper f13925433e Correct loading of return address. 1997-11-19 23:50:47 +00:00
Ulrich Drepper 611efa860e Add new values and correct types in struct cmsghdr. 1997-11-19 23:49:49 +00:00
Ulrich Drepper cbc25bc472 Define __need_NULL to get definition of NULL. 1997-11-19 23:46:48 +00:00
Ulrich Drepper 64266ab682 Correct end condition. 1997-11-19 23:46:30 +00:00
Ulrich Drepper bf32638564 Correct test for too small buffer. 1997-11-19 23:45:39 +00:00
Ulrich Drepper 1c989f9456 Include <libc-lock.h>, not <bits/libc-lock.h>. 1997-11-19 23:45:09 +00:00
Ulrich Drepper 816ce03a33 Define __cabs_complex locally and switch to ISO C form. 1997-11-19 23:44:23 +00:00
Ulrich Drepper 24f24fa2c8 Correct result for NAN, Inf, 0.0. 1997-11-19 23:43:24 +00:00
Ulrich Drepper 6de37310f7 Correct result value for x==y. 1997-11-19 23:42:16 +00:00
Ulrich Drepper 7be6856d20 Cleanup. 1997-11-19 23:41:16 +00:00
Ulrich Drepper 67ca47ad67 Don't use casts, use element access. 1997-11-19 23:40:20 +00:00
Ulrich Drepper 8fc071c9ae Define REVOKE to use revoke function.
Replace revoke call by use of REVOKE.
1997-11-19 23:38:16 +00:00
Ulrich Drepper f5d3e6bb77 Include needed headers and declare myaddress. 1997-11-19 23:37:06 +00:00
Ulrich Drepper e6a8d860ba Add missing casts. 1997-11-19 23:27:31 +00:00
Ulrich Drepper 5e38f61608 Handle input like 0.0e1000 correctly. 1997-11-19 23:26:56 +00:00
Ulrich Drepper a49d90cee9 Remove optimization of mblen. 1997-11-19 23:25:45 +00:00
Ulrich Drepper 3f558f73cd Change to real implementation, do not call mbtowc. 1997-11-19 23:25:18 +00:00
Ulrich Drepper 9f930d245f Define NDEBUG only if not yet defined. 1997-11-19 23:24:28 +00:00
Ulrich Drepper 11e0388374 Make sure h_errno is set correctly when returning an error. 1997-11-19 23:23:16 +00:00
Ulrich Drepper 5cce0f327c Define GLOB_ABORTED and GLOB_ABEND only if __USE_GNU. 1997-11-19 23:22:07 +00:00
Ulrich Drepper fd23e93905 (glob): If calling glob_in_dir for a list which was generated by
a glob call disable GLOB_ERR since there might be non-directories
in the list.
1997-11-19 23:06:55 +00:00
Ulrich Drepper 8052cb40a3 Ignore errors while installing catalog. 1997-11-19 23:06:31 +00:00
Ulrich Drepper 6b9d770d9a Rename struct keydat to struct keydat_t for C++. 1997-11-19 23:05:45 +00:00
Ulrich Drepper 3e20ab6af4 Carry over several patches from glibc 2.1 development version to
fix some more severe bugs.
1997-11-19 23:05:28 +00:00
Ulrich Drepper 77e821b1b5 Declare pselect only if __USE_POSIX. 1997-11-19 23:04:59 +00:00
Ulrich Drepper 9d9c8e087e (hsearch_r): Avoid undefinitely search for non-existing entry if
the table is full.
1997-11-19 23:03:59 +00:00
Ulrich Drepper b038dd54b2 Use version fromglibc 2.1 which corrects several bugs. 1997-11-19 23:03:33 +00:00
Ulrich Drepper e5000c7fc1 Remove declaration of infnan and cabs. 1997-11-19 23:02:54 +00:00
Ulrich Drepper 6e17e42224 Correct result type of __ieee754_rem_pio2{,f,l} and
__kernel_rem_pio2{,f,l}.
1997-11-19 23:02:10 +00:00
Ulrich Drepper 6db91a6419 Update from 2.1 version. 1997-11-19 23:00:23 +00:00
Ulrich Drepper ba664d7a58 (Scanning Directory Content): Document error case more. 1997-11-19 22:59:50 +00:00
Ulrich Drepper 4d37e7a049 Define new Linux errors. 1997-11-19 22:59:27 +00:00
Ulrich Drepper 94689d261f Remove malloc_key-data definition. 1997-11-19 22:58:49 +00:00
Ulrich Drepper 0982ec0149 (obstack_empty_p): New definition. 1997-11-19 22:57:20 +00:00
Ulrich Drepper a865a9eded (setname): Only free the correct memory. 1997-11-19 22:56:27 +00:00
Ulrich Drepper 8ed0d0c8f8 Don't use _POSIX_SOURCE in header. 1997-11-19 22:55:40 +00:00
Ulrich Drepper e4dfe2462d Don't discard lines after comments. 1997-11-19 22:55:04 +00:00
Ulrich Drepper 3c3d34f3da Correct logic in test for file size. 1997-11-19 22:54:13 +00:00
Ulrich Drepper 25e31e7224 Ignore possible errors from select function. 1997-11-19 22:53:29 +00:00
Ulrich Drepper 8a97758454 Make sure recents gccs don't reorder the code. 1997-11-19 22:52:47 +00:00
Ulrich Drepper 7987660df7 (VERSION): Bump to 2.0.6. 1997-11-19 22:51:06 +00:00
Ulrich Drepper c17d32749e Update. 1997-11-19 22:48:41 +00:00
Ulrich Drepper 76f4abd8df Regenerated from ../sysdeps/gnu/errlist.awk ../manual/errno.texi 1997-11-15 02:24:37 +00:00
Ulrich Drepper aaa1db3849 Regenerated: autoconf configure.in 1997-11-15 02:04:05 +00:00
Ulrich Drepper 3849cb52b2 Remade for experimental-2.0.6 1997-11-13 21:22:30 +00:00
Ulrich Drepper 158944e642 (_dl_load_cache_lookup): Favour exact matching of version function
if both the general (1) and glibc-specific (3) entry are present.
1997-10-25 01:59:59 +00:00
Ulrich Drepper 3efbc51540 Update 1997-09-25 03:50:34 +00:00
Ulrich Drepper 26aed5edaf . 1997-09-10 21:08:12 +00:00
Ulrich Drepper 5b9f9e328d Update 1997-09-09 12:44:00 +00:00
Ulrich Drepper 801c353ac5 Change for 2.0.5b 1997-09-09 01:45:55 +00:00
Ulrich Drepper b0486b1cbd (catopen): Correctly determine length of string in NLSPATH environment
variable.
1997-08-29 18:19:23 +00:00
Ulrich Drepper ae1b66e6c8 . 1997-08-29 18:18:35 +00:00
Ulrich Drepper a28c2ca07a Update. 1997-08-25 20:52:36 +00:00
Ulrich Drepper 75a48d1464 Define macros in a special way if gcc is not used and so dev_t is an
array.
1997-08-25 20:47:28 +00:00
Ulrich Drepper c1f5a90b59 Include features.h instead of sys/cdefs.h. Pretty print. 1997-08-25 20:47:19 +00:00
Ulrich Drepper 76fb30131e Correct assembler versions to work even for descriptors >= 32. 1997-08-25 20:46:27 +00:00
Ulrich Drepper fb737d0259 Change name of parameters in prototypes of xdr_reference,
xdrmem_create, and xdrstdio_create because of clash with g++ internal
symbols.
1997-08-25 20:46:13 +00:00
Ulrich Drepper e59c6045ad Add missing __END_DECLS. 1997-08-25 20:46:01 +00:00
Ulrich Drepper 9f089c0d61 Don't define alloca to __alloca since if gcc is used __alloca is not
defined to __builtin_alloca and so might not be available.
1997-08-25 20:45:52 +00:00
Ulrich Drepper fc1f40bf90 Update. 1997-08-23 22:49:13 +00:00
Ulrich Drepper f5ce128519 Update for more recent ISO 4217 1997-08-23 22:48:11 +00:00
Ulrich Drepper 67e7e6c268 Update. 1997-08-23 21:52:43 +00:00
Ulrich Drepper d59621d7d8 (__tzset_internal): Fix memory leak when the user specifies a TZ value
that uses a default rule file.  Do not assume US DST rules when the
user specifies that there is no DST.
1997-08-23 21:52:31 +00:00
Ulrich Drepper f1cc48bbec Remove the IS_* macros, they operate on internal kernel structures and
have no place in a user header.
1997-08-23 21:52:20 +00:00
Ulrich Drepper fd75287886 Fix typo. 1997-08-23 21:52:07 +00:00
Ulrich Drepper 703e6213a7 Don't use fstat, use fxstat. 1997-08-23 21:51:53 +00:00
Ulrich Drepper 944599f7c3 (__srandom_r): Don't use seed 0. Use 1 in this case. 1997-08-23 21:51:19 +00:00
Ulrich Drepper a0fcfbc608 Make {,v}snprintf functions available is __USE_BSD. 1997-08-23 21:50:48 +00:00
Ulrich Drepper 70c6868cfc Regenerated from source files 1997-08-21 02:13:54 +00:00
Ulrich Drepper e875dd8ff7 . 1997-08-16 21:33:07 +00:00
Ulrich Drepper 476a48d27b Add cthreads.c. 1997-08-16 21:25:02 +00:00
Ulrich Drepper 553ee6fa18 Update. 1997-08-16 19:51:21 +00:00
Ulrich Drepper b6808c631a Interpret no DST information in user provided time zone specification
as it is meant: no DST.
1997-08-16 19:51:08 +00:00
Ulrich Drepper 1552fb26cc CThread interface for glibc. 1997-08-16 19:50:53 +00:00
Ulrich Drepper 301d6d0704 [subdir=misc] (sysdep_routines): Add cthreads. 1997-08-16 19:50:34 +00:00
Ulrich Drepper 977ea13751 Introduce thread-specific key handling functions. 1997-08-16 19:49:29 +00:00
Ulrich Drepper ca9af6c739 Include <gnu/types.h>, not <bits/types.h>. 1997-08-16 19:48:07 +00:00
Ulrich Drepper 4397bc8b70 (getpeername): Correct type of len argument. 1997-08-16 19:47:17 +00:00
Ulrich Drepper 30d1c15022 utmpname implementation. 1997-08-16 19:46:03 +00:00
Ulrich Drepper 33e426f9a1 Rewrite lock handling. 1997-08-16 19:45:54 +00:00
Ulrich Drepper 1925e81be5 Removed since no direct db backend will ever exist. 1997-08-16 19:44:10 +00:00
Ulrich Drepper 7f4fa63a5e Reformat and correct typos. 1997-08-16 19:43:54 +00:00
Ulrich Drepper 983dbceaf8 Update for changed internal functions. 1997-08-16 19:43:20 +00:00
Ulrich Drepper 1918f9d183 Rewrite to use jump table correctly. 1997-08-16 19:42:40 +00:00
Ulrich Drepper 130913a557 (logout): Correct test for result of utmpname and pututline. Handle
ut_type field correctly if it exists.
1997-08-16 19:42:17 +00:00
Ulrich Drepper 65307d4417 (login): Correct test for result of utmpname.
Use updwtmp instead of implementing this here again.
1997-08-16 19:41:12 +00:00
Ulrich Drepper 2462764678 Rename to __getutline and make getutline a weak alias. 1997-08-16 19:38:59 +00:00
Ulrich Drepper e4a0cfa85d Rewrite to use jump table correctly. 1997-08-16 19:38:35 +00:00
Ulrich Drepper 3890740829 Rename to __getutid and make getutid a weak alias. 1997-08-16 19:38:06 +00:00
Ulrich Drepper 2b64f75daa Rename to __getutent and make getutent a weak alias. 1997-08-16 19:36:36 +00:00
Ulrich Drepper d41591e758 (routines): Add utmpname, remove utmp_db. 1997-08-16 19:36:00 +00:00
Ulrich Drepper ae76aa42e3 (usage): Fix help text. 1997-08-16 19:34:33 +00:00
Ulrich Drepper 2cdd6c918f [__USE_GNU]: Undefine assert_perror. 1997-08-16 19:33:41 +00:00
Ulrich Drepper d31dff5d5b Update. 1997-08-08 00:38:31 +00:00
Ulrich Drepper e1ee8d3a68 Linux specific configuration file for libio. 1997-08-08 00:38:17 +00:00
Ulrich Drepper 727ad8dd5e (__libc_once_define): Add new parameter for object class. 1997-08-08 00:37:56 +00:00
Ulrich Drepper b2b0a411a8 Correct comment. 1997-08-08 00:37:04 +00:00
Ulrich Drepper a3412bbd3d (profile_waiter): Do vm_deallocate
after releasing lock.  Use special RPC stubs and avoid assert,
thus making this function entirely independent of the threadvar
mechanism and of cthreads.
(lock): Convert to be a spin lock instead of a mutex, so that the
waiter thread need not use cthreads.  Use a fork prepare hook
instead of _hurd_fork_locks to make sure we are clean before
forking.
(fork_profil_child): Renamed from fork_profil.
(profil_reply_port): New variable.
(profil_vm_deallocate, profil_task_get_sampled_pcs): Special RPC
stubs made by special hacks.
(fetch_samples): New function, guts from profile_waiter.
(profile_waiter): Use fetch_samples.
(profil): When turning off profiling, fetch the last bunch of
samples before disabling PC sampling.
(fetch_samples): Add prototype.
(fetch_samples): Sample buffer need not be vm_deallocated; it's a stack buffer.
(profil_vm_deallocate): Delete prototype.
(#include <../mach/RPC_vm_deallocate_rpc.c>): Drop this inclusion.
(fetch_samples): Initialize NSAMPLES.
(fetch_samples): Do arithmetic on PC's in long long to avoid overflow.
(fetch_samples): Put parens in the right place.
1997-08-08 00:36:47 +00:00
Ulrich Drepper 21b29282a2 ($(common-objpfx)hurd/../mach/RPC_vm_deallocate_rpc.c): Delete this
rule.
Give normal rules for the mach RPC source included by profil.c instead
of trying to use before-compile grot.
(before-compile): Add the mach RPC source files that profil.c needs if
we are in the gmon directory.
1997-08-08 00:35:33 +00:00
Ulrich Drepper 181e1431e4 (__libc_once, __libc_once_define): New macros. 1997-08-08 00:34:55 +00:00
Ulrich Drepper c58fe9a2dc Replace call to abort by infinite loop, to avoid dragging stdio into
the dynamic linker.
1997-08-08 00:34:35 +00:00
Ulrich Drepper ee63ca1ce5 No new code in 2.0.x 1997-08-08 00:33:54 +00:00
Ulrich Drepper 4a8fce64a2 ix87 assembler implementation of cbrt 1997-08-08 00:32:00 +00:00
Ulrich Drepper 3bb7ff9838 Complete rewrite 1997-08-08 00:31:26 +00:00
Ulrich Drepper 80bacf0c42 Generic definitions for libio. 1997-08-08 00:28:33 +00:00
Ulrich Drepper 03b209a101 (__ttyname_r): Correct comment. 1997-08-08 00:28:20 +00:00
Ulrich Drepper 9de8ae84ce (__mach_setup_thread): Delete avoidance of a cthreads bug that hasn't
existed for two years.
1997-08-08 00:28:01 +00:00
Ulrich Drepper 655224ac2a Definition of updwtmp function. 1997-08-08 00:27:32 +00:00
Ulrich Drepper 4a5bd8f420 Move definition of updwtmp to updwtmp.c. 1997-08-08 00:27:22 +00:00
Ulrich Drepper 990c55ad93 (routines): Add updwtmp. 1997-08-08 00:26:28 +00:00
Ulrich Drepper 87c7eecff7 (_libio_using_thunks): Define if _G_USING_THUNKS is defined. 1997-08-08 00:25:59 +00:00
Ulrich Drepper eb908948fe Moved to sysdeps/generic. 1997-08-08 00:25:49 +00:00
Ulrich Drepper ed56dc0d9b Add static to parameter list for __libc_once_init. 1997-08-08 00:25:38 +00:00
Ulrich Drepper c9d6495f98 Add prototype for write_profiling. 1997-08-08 00:24:58 +00:00
Ulrich Drepper 14a418c633 (write_gmon): New function; guts from _mcleanup.
(_mcleanup): Use write_gmon.
(write_profiling): This function can be safely called at any time
to write a current histogram without interfering with ongoing
profiling.
1997-08-08 00:24:13 +00:00
Ulrich Drepper 26c9179ab9 we only have incl-chapters 1997-08-05 23:37:37 +00:00
Ulrich Drepper 044b16f4e9 update for 2.0.5pre1 1997-08-05 23:36:21 +00:00
Ulrich Drepper c59a94711c Remade for experimental-2.0.5 1997-08-05 22:08:05 +00:00
Ulrich Drepper 12b69d326e Regenerated: autoconf configure.in 1997-08-05 01:08:43 +00:00
Ulrich Drepper a92f117fec . 1997-05-26 21:36:35 +00:00
Ulrich Drepper 5b9ac69a65 Use AC_PROG_CC_LOCAL instead of AC_PROC_CC. 1997-05-26 21:28:52 +00:00
Ulrich Drepper 654665b7c7 Add AC_PROG_CC_LOCAL which does not fail for environments in which linking
is not possible at configure time (since te libc is just build).
1997-05-26 21:28:20 +00:00
Ulrich Drepper f0271955ec Regenerated: autoconf configure.in 1997-05-26 21:21:00 +00:00
Ulrich Drepper aa01a02424 Regenerated: autoconf sysdeps/generic/configure.in 1997-05-26 21:18:57 +00:00
Ulrich Drepper 620432767f Regenerated: autoconf sysdeps/unix/configure.in 1997-05-26 21:18:55 +00:00
Ulrich Drepper 752069ed74 Regenerated: autoconf sysdeps/unix/common/configure.in 1997-05-26 21:18:54 +00:00
Ulrich Drepper b75d05951a Regenerated: autoconf configure.in 1997-05-26 21:18:52 +00:00
Ulrich Drepper 104f19466b Update. 1997-05-26 20:55:31 +00:00
Ulrich Drepper 8c557d5e3e (__initstate_r): Initialize randomizer type in state array only at
right place.
1997-05-26 20:51:30 +00:00
Ulrich Drepper aff7685365 Remade for experimental-2.0.4 1997-05-26 19:24:19 +00:00
Ulrich Drepper 27bd4a1e78 . 1997-05-26 17:00:08 +00:00
Ulrich Drepper 0a5d42def7 (__erand48_r): Don't generate numbers in [0.5,1.0) but really in [0.0, 1.0). 1997-05-26 16:59:47 +00:00
Ulrich Drepper 4d3a95a6b6 Clarify status of other ports. 1997-05-26 12:17:11 +00:00
Ulrich Drepper fdc5571f25 Update. 1997-05-26 12:14:16 +00:00
Ulrich Drepper 0e04de001a . 1997-05-25 19:08:30 +00:00
Ulrich Drepper 5d42a4c2cc (__data_start): Change local label "nofini" to ".Lnofini". 1997-05-25 19:08:15 +00:00
Ulrich Drepper 0ad9e46784 Use GOT, instead of GOTOFF. 1997-05-25 19:07:24 +00:00
Ulrich Drepper 68b192d0dd Print warning if _XOPEN_SOURCE and _SVID_SOURCE are not defined. 1997-05-25 18:22:14 +00:00
Ulrich Drepper c0a119316e Make 2nd para for scheck const. Update zic.c. 1997-05-25 15:50:36 +00:00
Ulrich Drepper ae2eaff13e updated to most recent tzdata 1997-05-25 01:46:21 +00:00
Ulrich Drepper 6a5f96bfef . 1997-05-25 01:25:42 +00:00
Ulrich Drepper 98bec7469c (_mcleanup): Free tostruct array allocated in monstartup. 1997-05-25 01:24:53 +00:00
Ulrich Drepper 4b4a00eb13 Fix typo. 1997-05-24 22:57:14 +00:00
Ulrich Drepper 51b2586797 Update. 1997-05-24 22:56:14 +00:00
Ulrich Drepper 4e5f9db6ba (elf_machine_runtime_setup): Update skeleton definition. 1997-05-24 22:55:58 +00:00
Ulrich Drepper 6cfad51303 (elf_machine_runtime_setup): Return lazy. 1997-05-24 22:55:45 +00:00
Ulrich Drepper 88c3891b7a atan2 for long double. 1997-05-24 22:55:25 +00:00
Ulrich Drepper 2c606f0f92 (elf_machine_runtime_setup): If we are
not looking at the new thread-safe .plt, don't be lazy about relocs.
(_dl_runtime_resolve): Fix up arithmetic for new .plt layout.
(elf_alpha_fix_plt): Insert wmb as appropriate to ensure safety.
1997-05-24 22:51:29 +00:00
Ulrich Drepper 62bb57925d (svc_register): Change type of protocol parameter to u_long. 1997-05-24 22:51:17 +00:00
Ulrich Drepper f844eec463 (ELF_DYNAMIC_RELOCATE): Let elf_machine_runtime_setup() decide if we
can actually be lazy.
1997-05-24 22:50:15 +00:00
Ulrich Drepper 0f1f93279b (_dl_relocate_object): Don't call elf_machine_runtime_setup. 1997-05-24 22:50:06 +00:00
Ulrich Drepper a83b0f09cb (logb): Fix thinko, reverse output values. 1997-05-24 22:45:51 +00:00
Ulrich Drepper c6c955c542 . 1997-05-22 23:59:20 +00:00
Ulrich Drepper 9e1cbaf632 . 1997-05-22 16:45:26 +00:00
Ulrich Drepper ee96242d57 (logb): Remove second value placed on stack by fxtract. 1997-05-22 16:37:46 +00:00
Ulrich Drepper db4703c178 . 1997-05-22 15:46:05 +00:00
Ulrich Drepper 6b280740cc _nl_current has LC_ALL + 1 elements. 1997-05-22 15:45:37 +00:00
Ulrich Drepper 22e8d11155 (seed48_r): Incldue limits.h to get definition of USHRT_MAX. 1997-05-22 15:44:55 +00:00
Ulrich Drepper 3ab24a1afb (shmat): Add cast to prevent warning. 1997-05-22 15:43:55 +00:00
Ulrich Drepper 396e0415e4 Update. 1997-05-21 23:34:07 +00:00
Ulrich Drepper 3ff6d686a4 Linux specific tty definitions 1997-05-21 22:30:17 +00:00
Ulrich Drepper 7f42b77318 SunOS specific tty definitions 1997-05-21 22:28:39 +00:00
Ulrich Drepper 9279ceae42 Generic tty definitions 1997-05-21 22:27:35 +00:00
Ulrich Drepper 0ed18d6c0c Remade for experimental-2.0.4 1997-05-21 22:02:08 +00:00
Ulrich Drepper f860dce906 (VERSION): Bump to 2.0.4. 1997-05-21 21:59:21 +00:00
Ulrich Drepper 7645b65271 . 1997-05-21 16:08:40 +00:00
Ulrich Drepper 079f7c691f Depend on libc.so for dynamic loading and for Linux ld.so. 1997-05-21 16:08:17 +00:00
Ulrich Drepper 00b97dc29c (CFLAGS-s_copysignl.c): Define for gcc bug workaround. 1997-05-21 00:20:00 +00:00
Ulrich Drepper 08ed359420 Update. 1997-05-21 00:08:19 +00:00
Ulrich Drepper 3090a1d9d9 (strptime_internal): Fix %I format specifier being off by one. 1997-05-21 00:08:10 +00:00
Ulrich Drepper ea72be0702 (add): Respect `0' padding flag. 1997-05-21 00:07:57 +00:00
Ulrich Drepper 780f64dfed Moved to sysdeps. 1997-05-21 00:07:41 +00:00
Ulrich Drepper 4360912968 Add cacheflush. 1997-05-21 00:07:27 +00:00
Ulrich Drepper 57790ddd15 Likewise tuck the thread data onto the new thread's stack. 1997-05-21 00:07:08 +00:00
Ulrich Drepper ae62f3fd1a Don't presume that the kernel will preserve non-call-saved registers;
save and restore a0 across the system call.
1997-05-21 00:07:00 +00:00
Ulrich Drepper a53b62005c Add nfsservctl. 1997-05-21 00:06:42 +00:00
Ulrich Drepper 4f81f15b9f Add cast in call to __ipc. 1997-05-21 00:06:27 +00:00
Ulrich Drepper caf512f51a (shmat): For Linux-2.0 and up the kernel can return negative values.
Only fail when return value is in range in range which is never
returned as valid address.
1997-05-21 00:05:52 +00:00
Ulrich Drepper f301b57542 Save errno. 1997-05-21 00:05:38 +00:00
Ulrich Drepper ba11b11f3f We have a real implementation now. 1997-05-21 00:05:21 +00:00
Ulrich Drepper 6750d9b090 Make second argument of setitimer const. 1997-05-21 00:05:00 +00:00
Ulrich Drepper 716a8a8a1a Fix test for sign of argument. 1997-05-21 00:04:31 +00:00
Ulrich Drepper 45ca822c29 Fix sign of result. 1997-05-21 00:04:23 +00:00
Ulrich Drepper 5d08e3e8ab Fix test for x < 1. 1997-05-21 00:04:16 +00:00
Ulrich Drepper 26753f62d6 Generate invalid exception correctly. 1997-05-21 00:03:54 +00:00
Ulrich Drepper 48956dfd0f Mmoved to here from inet/netinet. 1997-05-21 00:01:59 +00:00
Ulrich Drepper b7c667f2ff Fix typo. 1997-05-21 00:01:41 +00:00
Ulrich Drepper 54a1813de5 (svc_exit): New, declared. 1997-05-21 00:01:17 +00:00
Ulrich Drepper 402a46171b (svc_exit): New, defined.
(svc_run): Test for svc_stop variable.
1997-05-21 00:01:07 +00:00
Ulrich Drepper ae4b002f02 Also reset a' and c' to default values. 1997-05-21 00:00:01 +00:00
Ulrich Drepper 83817a84c3 (_sys_siglist, sys_siglist): Use _NSIG, not NSIG in declaration. 1997-05-20 23:58:24 +00:00
Ulrich Drepper 09390d612a Merge with GNU awk version. 1997-05-20 23:58:00 +00:00
Ulrich Drepper 311e8a4a28 Merge with GNU awk version.
(regex_compile): Use ISO C/amend 1 functions for character class handling.
1997-05-20 23:57:55 +00:00
Ulrich Drepper 0d0f83ce42 Declare as master copy. 1997-05-20 23:57:41 +00:00
Ulrich Drepper 12ef0fc101 eclare as master copy. 1997-05-20 23:57:35 +00:00
Ulrich Drepper 6eb3b349ee Updated. 1997-05-20 23:57:17 +00:00
Ulrich Drepper c5b46a461f Remove ENOMEDIUM and EMEDIUMTYPE errors. 1997-05-20 23:56:54 +00:00
Ulrich Drepper 430896bd6a (obstack_specify_allocation_with_arg, obstack_chunkfun,
obstack_freefun): Fix casts.
1997-05-20 23:56:09 +00:00
Ulrich Drepper 5dd4da2d24 Include <config.h>. Include <stdlib.h> only if __GNU_LIBRARY__ or
HAVE_STDLIB_H is defined.
1997-05-20 23:55:36 +00:00
Ulrich Drepper f688a75efb Check whether output of `locale -a' really is locale directory. Also
print locale aliases.
1997-05-20 23:54:01 +00:00
Ulrich Drepper 7bd83db5a4 (CPPFLAGS): Add definition for LOCALE_ALIAS_PATH. 1997-05-20 23:53:16 +00:00
Ulrich Drepper 04c524c4b0 Move to sysdeps/generic/netinet/tcp.h. 1997-05-20 23:52:22 +00:00
Ulrich Drepper 71584f8abc (_hurdsig_preemptors): Provide initialization.
(_hurdsig_init): Double size of sigthread stack; msg_add_auth was
overflowing it.
1997-05-20 23:51:55 +00:00
Ulrich Drepper 26765111ad (_hurdsig_fault_preemptor): Provide initialization. 1997-05-20 23:51:35 +00:00
Ulrich Drepper 066d68b563 (_S_msg_add_auth): Implement correctly. 1997-05-20 23:50:59 +00:00
Ulrich Drepper 65c0c1fd36 (_dl_lookup_symbol_skip): Call _dl_signal_error when we can't find the
symbol.
1997-05-20 23:50:34 +00:00
Ulrich Drepper ee815d3f29 ($(objpfx)initfini.s): Add CPPFLAGS, CFLAGS and -g0 to command line of
compiler.
1997-05-20 23:50:12 +00:00
Ulrich Drepper 4be6b7a59e Emit definition of `cross_compiling'. 1997-05-20 23:36:37 +00:00
Ulrich Drepper e4e9c3596e Set cross-compiling from configure result. 1997-05-20 23:36:29 +00:00
Ulrich Drepper a67fb77b6b Don't set cross-compiling based on $(BUILD_CC) != $(CC). 1997-05-20 23:36:22 +00:00
Ulrich Drepper 8bbe90f014 Regenerated from ../sysdeps/gnu/errlist.awk ../manual/errno.texi 1997-05-20 15:25:19 +00:00
Ulrich Drepper e13ea31465 Regenerated: autoconf configure.in 1997-05-20 14:56:34 +00:00
Ulrich Drepper b2cbddd0a4 . 1997-05-08 10:01:33 +00:00
Ulrich Drepper ba8c210b3e . 1997-05-02 01:15:24 +00:00
Ulrich Drepper bab0a98c67 Use <netinet/ip_icmp.h> not <netinet/icmp.h>. 1997-04-26 11:36:56 +00:00
Ulrich Drepper 758999db4f . 1997-04-21 14:29:19 +00:00
Ulrich Drepper 5346455569 Also reset a' and c' to default values. 1997-04-21 14:26:11 +00:00
Ulrich Drepper 8e619d6a10 Update. 1997-04-21 13:35:05 +00:00
Ulrich Drepper e9e8bfe716 Place ALIGN instruction at correct positions. 1997-04-21 13:34:44 +00:00
Ulrich Drepper e2d554858b Handle files in the same directory correctly. 1997-04-21 13:34:31 +00:00
Ulrich Drepper b9b2307456 Update. 1997-04-19 15:20:00 +00:00
Ulrich Drepper fdd1a62962 Update to XPG4.2 interface. 1997-04-19 15:19:45 +00:00
Ulrich Drepper e49ad9b365 Set *RESULT to NULL before returning error. 1997-04-19 15:19:31 +00:00
Ulrich Drepper 5105c5e94b Add prototype for updwtmp. 1997-04-19 15:19:19 +00:00
Ulrich Drepper 392ca57fdd Add new function updwtmp which allows to write a complete record to
the wtmp file.
1997-04-19 15:19:11 +00:00
Ulrich Drepper b0d7c39e33 (distribute): Add defs.awk. 1997-04-19 15:14:02 +00:00
Ulrich Drepper bb267dc296 Don't automatically ignore .c files os .S or .s files are ignored. 1997-04-19 15:13:27 +00:00
root 1769a89be6 Not used anymore. 1997-04-19 14:42:49 +00:00
Ulrich Drepper 54cd01e24f Update. 1997-04-18 15:39:46 +00:00
Ulrich Drepper 7384dd3fbe Remade for experimental-2.0.3 1997-04-18 15:37:54 +00:00
Ulrich Drepper 51b221ee43 Update. 1997-04-18 00:19:40 +00:00
Ulrich Drepper bff1832b2d Rewrite of initfini. 1997-04-18 00:17:44 +00:00
Ulrich Drepper 70d7ddbbcc (strftime): Remove __restrict in declaration. 1997-04-17 23:31:35 +00:00
Ulrich Drepper b7c5a468dc Interpret year number 00-59 as 2000--2059. 1997-04-17 23:30:22 +00:00
Ulrich Drepper f9652c80ae (memset_space): Increment pointer. 1997-04-17 23:30:13 +00:00
Ulrich Drepper 39dbc7be16 (TTYDEF_OFLAG): Use either OXTABS or TAB3, if one of them is defined. 1997-04-17 23:29:52 +00:00
Ulrich Drepper dd5aac0f53 (shmat, shmdt): Correct types. 1997-04-17 23:29:39 +00:00
Ulrich Drepper 1452bbc1aa Define _LINUX_TYPES_H to avoid use of kernel types. 1997-04-17 23:29:29 +00:00
Ulrich Drepper 4a6fbb12f2 (struct ip_timestamp): Correct typos. 1997-04-17 23:29:18 +00:00
Ulrich Drepper 3cf9054816 Include <sys/socket.h> to get definition of sa_family_t for
<linux/atalk.h>.
1997-04-17 23:29:03 +00:00
Ulrich Drepper fc8c13e9e1 (OXTABS): Don't define. 1997-04-17 23:28:40 +00:00
Ulrich Drepper 3cfd9c9ac9 Don't use kernel header because of type clashes. Add all definitions
here.
Correct types according to XPG4.2.
1997-04-17 23:28:26 +00:00
Ulrich Drepper 49d05ecd64 Don't use kernel header because of type clashes. Add all definitions
here.
1997-04-17 23:28:10 +00:00
Ulrich Drepper a0e78d4ebe Corrected. The mantissa has only 63 bits. 1997-04-17 23:27:35 +00:00
Ulrich Drepper da3b378848 Remove references to byte order macros. Don't include <endian.h>. 1997-04-17 23:26:52 +00:00
Ulrich Drepper 14f82daac6 [_LIBC]: Define __clearenv and make clearenv a weak alias. 1997-04-17 23:26:33 +00:00
Ulrich Drepper 0c07dfee2c Not needed anymore. 1997-04-17 23:26:23 +00:00
Ulrich Drepper cdd3026022 Remove old math implementation files. 1997-04-17 23:26:09 +00:00
Ulrich Drepper f21e0750a8 Correctly handle array of odd length. 1997-04-17 23:25:08 +00:00
Ulrich Drepper f854c0566e (tests): Correct 64-bit entry. 1997-04-17 23:24:55 +00:00
Ulrich Drepper b75f2c28f9 (erand48_r): Build double value using ieee754_double union and use
random bits in different order to increase effect of seed.
1997-04-17 23:24:44 +00:00
Ulrich Drepper 6393f70acb (__getopt_nonoption_flags): Remove extern. 1997-04-17 23:24:25 +00:00
Ulrich Drepper 3d5a869794 (_getopt_initialize): Preserve optind.
(_getopt_internal): Set optind to 1 if optind == 0 before
calling _getopt_initialize ().
1997-04-17 23:24:07 +00:00
Ulrich Drepper 12fc66d651 Correct prototype in memmem documentation. 1997-04-17 23:23:45 +00:00
Ulrich Drepper f1ecbef29e Correct a few typos and errors. 1997-04-17 23:23:26 +00:00
Ulrich Drepper 0c1ed45457 Update malloc documentation for new malloc. 1997-04-17 23:23:09 +00:00
Ulrich Drepper bf5806397a (dir-add.texi): Simplify. 1997-04-17 23:22:47 +00:00
Ulrich Drepper bf094836d8 (fREe): Small optimization. Before returning,
add fast check whether the heap containing top can go away.
(mALLOc, rEALLOc, cALLOc, mEMALIGn): When
failing to allocate a new chunk, also try the main_arena.  It may
be that we are only running out of mmapped regions, and other
arenas cannot be enlarged sufficiently.
(new_heap, malloc_extend_top): Handle top_pad more consistently,
i.e. only in new_heap().
1997-04-17 23:22:29 +00:00
Ulrich Drepper 0b67eee38b (proc_utmp_eq): Only use ut_id field if valid. 1997-04-17 23:22:11 +00:00
Ulrich Drepper 82bf05a0ce (_nl_current): Add element with index LC_ALL. 1997-04-17 23:21:42 +00:00
Ulrich Drepper ea09d877ca (_IO_flush_all_linebuffered): Don't flush on a read-only stream. 1997-04-17 23:21:30 +00:00
Ulrich Drepper aef475bc34 Rewrite. Don't use the ugly BSD way to write
headers but instead add comments and parameter names.
Don't use BSD specific types in prototypes.
1997-04-17 23:21:04 +00:00
Ulrich Drepper a0713d8d9b (iruserok): Use access instead of euidaccess. 1997-04-17 23:20:49 +00:00
Ulrich Drepper 5bae2227b8 Make work even in presence of symlinks. 1997-04-17 23:20:34 +00:00
Ulrich Drepper 5703aac7be (depfiles): Remove $(test-srcs). 1997-04-17 23:20:09 +00:00
Ulrich Drepper c9b41a4451 Add rule to easily generate dir-add.texi file. 1997-04-17 23:19:47 +00:00
Ulrich Drepper d78af38fec (all): Make sure this is always the default goal. 1997-04-17 23:18:16 +00:00
Ulrich Drepper f958e42835 Fix reverse arguments. 1997-04-10 20:01:42 +00:00
Ulrich Drepper 5e0fd15720 . 1997-04-10 18:23:27 +00:00
Ulrich Drepper 99f1dfad31 (sunrpc-headers): Add clnt.h. 1997-04-10 18:22:55 +00:00
Ulrich Drepper d33c4d286a . 1997-04-06 13:53:55 +00:00
Ulrich Drepper 7f0ddd1987 (ut_xtime): New symbol.
(ut_time): define it only if _NO_UT_TIME is not defined.
1997-04-06 01:01:56 +00:00
Ulrich Drepper 9359e4cbf3 (__finitel): Shift return value by 31 positions to get 0/1 result. 1997-04-06 00:48:10 +00:00
Ulrich Drepper 72de2dcd21 (_IO_file_overflow): Set error when try to write on a read-only
stream.
1997-04-06 00:43:48 +00:00
Ulrich Drepper ab8080455c Use autoconf macro to check for compiler. 1997-04-05 00:48:45 +00:00
Ulrich Drepper f1698e08cc Optimize writing of profiling info. 1997-04-05 00:48:13 +00:00
Ulrich Drepper b8a7384521 Correct result of parse_line correctly. 1997-04-05 00:47:27 +00:00
Ulrich Drepper d97aad47e3 Don't use fixed static buffers. 1997-04-05 00:47:09 +00:00
Ulrich Drepper 789a98d932 Describe new error codes and strerror_r function. 1997-04-05 00:46:39 +00:00
Ulrich Drepper c075fbc99c Make sure out of memory error is correctly signaled. 1997-04-05 00:46:10 +00:00
Ulrich Drepper eb0740ad73 Correct handling of overflow in reading trailing list. 1997-04-05 00:45:20 +00:00
Ulrich Drepper 9106c38136 Correct handling of installable printf handlers. 1997-04-05 00:43:06 +00:00
Ulrich Drepper 5cb9ee6746 Add prototype for __clearenv. 1997-04-05 00:42:16 +00:00
Ulrich Drepper 72b6c2b1c7 Fix typo. 1997-04-05 00:42:01 +00:00
Ulrich Drepper ffc30dcbea Correct handling of local labels. 1997-04-05 00:41:43 +00:00
Ulrich Drepper 0043ae9883 Update from tzcode1997d 1997-04-05 00:40:15 +00:00
Ulrich Drepper 477f40256e Provide ITIMER* values also as macros. 1997-04-05 00:30:24 +00:00
Ulrich Drepper 67c27119f8 Regenerated from ../sysdeps/gnu/errlist.awk ../manual/errno.texi 1997-04-04 22:56:12 +00:00
Ulrich Drepper f23649c50d Regenerated: autoconf configure.in 1997-04-04 22:34:32 +00:00
Ulrich Drepper 2143456bb3 . 1997-04-04 20:07:58 +00:00
Ulrich Drepper 473167dcc7 [$(subdir)=inet] (sysdep_headers): Remove netinet/icmp.h. 1997-04-04 20:03:48 +00:00
Ulrich Drepper 9216338892 Rename atalk.h to at.h 1997-04-04 15:46:30 +00:00
Ulrich Drepper 1559585ef1 Add former contents of <netinet/icmp.h>. 1997-04-04 15:45:15 +00:00
Ulrich Drepper dc0d0c616e Clear LD_LIBRARY_PATH environment variable before running process. 1997-04-04 15:42:45 +00:00
Ulrich Drepper 16afa991d0 Make string parameters `const'. 1997-04-04 15:39:36 +00:00
Ulrich Drepper 9ad114ad58 Add prototypes for rcmd, rexec, ruserok, and rresvport. 1997-04-04 15:37:54 +00:00
Ulrich Drepper b0b60fc2f1 Add sigisempty, sigorset, and sigandset 1997-04-04 15:34:33 +00:00
Ulrich Drepper 6a11e51e2c Add declaration for glob_pattern_p. 1997-04-04 15:29:23 +00:00
Ulrich Drepper 0f884de176 (next_brace_sub): Decrement depth counter when '}' is found.
Rename glob_pattern_p to __glob_pattern_p and
make glob_pattern_p a weak alias.  This function is used in other
packages (e.g. bash).
1997-04-04 15:29:09 +00:00
Ulrich Drepper 2c218fa5d9 Remove since we have ip_icmp.h 1997-04-04 15:25:12 +00:00
Ulrich Drepper 3c0bfe141d Include <stddef.h> only once. 1997-04-04 15:23:08 +00:00
Ulrich Drepper 58611c4757 Update. 1997-04-03 18:23:45 +00:00
Ulrich Drepper 6ad469c1c4 Regenerated from source files 1997-03-30 17:09:00 +00:00
Ulrich Drepper ca911f45cf (VERSION): Bump to 2.0.3. 1997-03-30 15:56:16 +00:00
Ulrich Drepper a80f36629b (BUILD_CFLAGS): Fix reference to config file. 1997-03-26 14:17:39 +00:00
Ulrich Drepper 133192c659 Update. 1997-03-22 04:10:50 +00:00
Ulrich Drepper 07e85a9e7e (OXTABS): Define as alias for XTABS. 1997-03-22 04:09:48 +00:00
Ulrich Drepper 6c60c46fcd Update. 1997-03-22 03:47:53 +00:00
Ulrich Drepper 438171b5ba Remove special case when OXTABS is not defined. Revert patch of
Sun Dec 15 16:33:44 1996.
1997-03-22 03:40:09 +00:00
Ulrich Drepper 4a764e3d3b Update. 1997-03-22 03:12:33 +00:00
Ulrich Drepper 0b25d4905e Update. 1997-03-22 01:16:50 +00:00
Ulrich Drepper 2dd2b17df7 i386 specific definitions for gmon. 1997-03-21 21:40:39 +00:00
Ulrich Drepper 870eeeb6b2 Update. 1997-03-21 21:26:15 +00:00
Ulrich Drepper 582b8e86e0 (distribute): Add BUGS. 1997-03-21 21:26:03 +00:00
Ulrich Drepper bab280f93a List of known bugs. 1997-03-21 21:25:26 +00:00
Ulrich Drepper 4749ee6c81 Update. 1997-03-21 20:56:28 +00:00
Ulrich Drepper 1a1f354cd7 (CALL_MCOUNT): Clear this macro so ENTRY(__syscall_error) doesn't
insert a call to _mcount, which clobbers %eax.
1997-03-21 20:33:04 +00:00
Ulrich Drepper 71e4ceb22b Include ctype.h for isdigit. 1997-03-21 20:32:45 +00:00
Ulrich Drepper 6f7922d89c Don't emulate writev with small UIO_FASTIOV value by multiple writev
calls since we need atomicity.
1997-03-21 20:32:23 +00:00
Ulrich Drepper a16d0942d7 Don't emulate readv with small UIO_FASTIOV value by multiple readv
calls since we need atomicity.
1997-03-21 20:32:12 +00:00
Ulrich Drepper fea444e4d2 Rename and alias readv to __readv and writev to __writev. 1997-03-21 20:31:55 +00:00
Ulrich Drepper 797f8dc9d5 Rename and alias readv to __readv. 1997-03-21 20:31:30 +00:00
Ulrich Drepper 20ce139ac1 Rename and alias writev to __writev. 1997-03-21 20:31:11 +00:00
Ulrich Drepper eb46a9a4e2 Define __LIBC_M81_MATH_INLINES instead of __NO_M81_MATH_INLINES. 1997-03-21 20:30:36 +00:00
Ulrich Drepper 0af17c40df [PROF] (_dl_runtime_resolve): Don't use regparam mechanism for call of
`fixup' call.
1997-03-21 20:27:07 +00:00
Ulrich Drepper b9cec87760 [$(subdir)=gmon] (sysdep_routines): Add i386-mcount. 1997-03-21 20:26:58 +00:00
Ulrich Drepper 98d289f6b6 Initialize quotient' and mask'. 1997-03-21 20:26:31 +00:00
Ulrich Drepper f175ece367 Exit with error status when we have an error. 1997-03-21 20:26:20 +00:00
Ulrich Drepper a91b462b62 (main): Save the value of errno since printf may modify it, use the
saved errno everywhere.
1997-03-21 20:25:54 +00:00
Ulrich Drepper 5e9e4d273d Correct tests.
(main): Save the value of errno since printf may modify it, use the
saved errno everywhere.
1997-03-21 20:25:44 +00:00
Ulrich Drepper a7071cbe63 It is not illegal to parse a minus sign in the strtouXX functions.
The results gets simply negated.
1997-03-21 20:25:21 +00:00
Ulrich Drepper ceb4bfd63d Declare __writev and __readv. 1997-03-21 20:25:02 +00:00
Ulrich Drepper 1cb5fbec42 Revert the bulk of the 960930 changes, as they affect the alignment,
and therefore the end padding of the structs.
1997-03-21 20:24:49 +00:00
Ulrich Drepper 6cc0f29734 Declare the variables with aligned tags to compensate.
Use __writev instead of write for the I/O.
1997-03-21 20:24:36 +00:00
Ulrich Drepper 7ec30d5937 [$(elf)=yes] (+prector, +postctor): New variables for
crtbegin.o/crtend.o, using gcc to find them.
(+link): Use them.
1997-03-21 20:24:04 +00:00
Ulrich Drepper ae6f93ebf0 Fix typo. 1997-03-21 20:23:20 +00:00
Ulrich Drepper 8fa5aed6e8 ix86 specific mcount entry point which preserves all registers. 1997-03-21 15:26:52 +00:00
Ulrich Drepper 1d7d57a23c Add machine-gmon.h. 1997-03-21 06:12:59 +00:00
Ulrich Drepper ec6bc3a6c1 Additional ix86 specific files to distribute. 1997-03-21 05:41:51 +00:00
Ulrich Drepper c544156ecf (glob): Fix completely broken handling of GLOB_BRACE and partly borken
handling of GLOB_TILDE:
1997-03-21 04:55:48 +00:00
Ulrich Drepper 14b1c93b79 Some more optimization and unused variables removed. 1997-03-20 03:46:05 +00:00
Ulrich Drepper 03a5167722 (RESOLVE): Don't try to resolve local symbols. 1997-03-20 03:39:46 +00:00
Ulrich Drepper d17c16a1c0 (tests): Add $(test-srcs). 1997-03-20 03:37:09 +00:00
Ulrich Drepper 46139b3cfb (depfiles, common-mostlyclean): Add $(test-srcs). 1997-03-20 03:37:00 +00:00
Ulrich Drepper ba18232742 (all-sources): Add $(test-srcs). 1997-03-20 03:36:48 +00:00
Ulrich Drepper d03cbf630d (srcs): Add $(test-srcs). 1997-03-20 03:36:33 +00:00
Ulrich Drepper d9c42342a1 Update. 1997-03-20 03:27:48 +00:00
Ulrich Drepper cfa805f954 (msync): Add parameter `flags' to match generic prototype. 1997-03-20 03:26:18 +00:00
Ulrich Drepper c55caac80e Add definition for `signbit' function. Future releases will have this
function.
1997-03-20 03:23:21 +00:00
Ulrich Drepper 46da0971fe Handle x == +-0 as a special case since tanh(-0) == -0. 1997-03-20 03:21:53 +00:00
Ulrich Drepper c1691f4661 Correct former completely bogus code. It never worked correctly. 1997-03-20 03:21:35 +00:00
Ulrich Drepper 41e2d09648 Optimize code by avoiding unneeded access to FP number. 1997-03-20 03:21:26 +00:00
Ulrich Drepper d69e5f014e Handle x == +-0 as a special case since expm1(-0) == -0. 1997-03-20 03:21:13 +00:00
Ulrich Drepper 630ee40e92 Correct recognition of mantissa overflow. 1997-03-20 03:20:56 +00:00
Ulrich Drepper 637a638f30 Correct fatal bug in jump to `__sigsetjmp' in PIC code. 1997-03-20 03:20:35 +00:00
Ulrich Drepper 0b4a289092 Include <sys/types.h>. 1997-03-20 03:19:46 +00:00
Ulrich Drepper d6b95af8bb Change references of ANSI C to ISO C. 1997-03-20 03:17:26 +00:00
Ulrich Drepper 80e41ab46e Avoid whitespace before argument of macro call that is used as
function name.
1997-03-20 03:16:24 +00:00
Ulrich Drepper f47163fad3 Make compatible with traditional preprocessor;
requires carefull placement of whitespace in macro arguments.
Use __CONCAT instead of ##.
Declare long double functions only if __STDC__ or __GNUC__.
Include <__math.h> also if __LIBC_M81_MATH_INLINES is defined.
Include <__math.h> if __NO_MATH_INLINES is not defined and we want
optimization.
1997-03-20 03:16:12 +00:00
Ulrich Drepper 4bf5771c23 (output/write_some): Don't try and write more than IO_INBAND_MAX in a
single call to device_write_inband.
1997-03-20 03:10:16 +00:00
Ulrich Drepper 66284f47ac Correct dependencies for test-tz. 1997-03-19 21:24:03 +00:00
Ulrich Drepper 43e2ba6ef6 Don't use MAX_IOVEC. Test for UIO_FASTIOV and set to 8 if not available. 1997-03-19 21:09:31 +00:00
Ulrich Drepper 6227894ac9 Update feature tests.
(fabs): Remove defininition, it is a gcc builtin.
(sqrt, __sqrt): Remove definition, they have wrappers in libm.
1997-03-19 20:56:14 +00:00
Ulrich Drepper fa8ceb1f2c Update. 1997-03-19 20:26:33 +00:00
Ulrich Drepper 2c44d7573c Include <kernel_stat.h>, not "kernel_stat.h". 1997-03-19 20:22:43 +00:00
Ulrich Drepper 35d80b24e3 Update. 1997-03-19 04:23:23 +00:00
Ulrich Drepper f6bf4da124 SCO 3.2.4 specific files to distribute. 1997-03-19 04:22:27 +00:00
Ulrich Drepper e22307c48b Add __getpgid.c and __setpgid.c. 1997-03-19 04:21:42 +00:00
Ulrich Drepper 9ca318cc03 Add glob. 1997-03-19 04:18:49 +00:00
Ulrich Drepper 254249b29a Add bsdstat.h, setrguid.c, and setruid.c. 1997-03-19 04:18:20 +00:00
Ulrich Drepper 288238a6ea Add direct.h. 1997-03-19 04:16:48 +00:00
Ulrich Drepper 5286bb7e27 Add netinet/tcp.h. 1997-03-19 04:16:17 +00:00
Ulrich Drepper 94941d2212 [$(subdir)=inet] (sysdep_headers): Remove netinet/ip.h. 1997-03-19 04:12:09 +00:00
Ulrich Drepper 257b878d90 (headers): Add netinet/ip.h again. 1997-03-19 04:11:33 +00:00
Ulrich Drepper 0e6e45afa2 Genric IP definitions 1997-03-19 04:10:36 +00:00
Ulrich Drepper 68c0fa52a2 Move to sysdeps/generic/netinet 1997-03-19 04:10:22 +00:00
Ulrich Drepper ff48318555 Update. 1997-03-19 03:45:17 +00:00
Ulrich Drepper daa5c348d6 ($(tardir).tar): Prefer writing temporary file to $TMPDIR is
available.  The default is /tmp.
1997-03-19 03:45:09 +00:00
Ulrich Drepper b234e8652a Update. 1997-03-19 03:41:44 +00:00
Ulrich Drepper 2018d9e2ee (headers): Remove netinet/ip.h. 1997-03-19 03:23:19 +00:00
Ulrich Drepper b8d4e46167 [$(subdir)=inet] (sysdep_headers): Add netinet/ip.h. 1997-03-19 03:23:02 +00:00
Ulrich Drepper f581e9ca08 Remade for experimental-2.0.2 1997-03-19 03:15:58 +00:00
Ulrich Drepper 0966931ed7 Compatibility versions for early 2.0 version of the kernel 1997-03-19 03:13:02 +00:00
Ulrich Drepper dd4831ce37 Update. 1997-03-19 03:11:23 +00:00
Ulrich Drepper db7cdaaaa4 Add stat, fstat, xstat, readv, and writev syscalls. 1997-03-19 03:11:05 +00:00
Ulrich Drepper 721869072d Update from 2.1.x branch. 1997-03-19 03:10:36 +00:00
Ulrich Drepper 83bbbdd08c (__setjmp): Fix fatal bug where 0 argument is placed in wrong place on
the stack.
1997-03-19 00:45:07 +00:00
Ulrich Drepper b44c1e14db (__offtime): Change type of `yg' to long int. 1997-03-18 22:19:12 +00:00
Ulrich Drepper 18d41844f1 (PPP_VERSION): Define to 2.2.0 to prevent version mismatch. 1997-03-18 22:09:30 +00:00
Ulrich Drepper ea00844dfb (_nss_nis_getservbyname_r): Allow protocol=NULL to match any protocol
rather than returning an error.
1997-03-18 04:24:53 +00:00
Ulrich Drepper 59c37b6b21 (servbyname): Match any protocol if proto==NULL. 1997-03-18 04:22:18 +00:00
Ulrich Drepper f42bf1bcfa Don't define O_NORW. 1997-03-18 04:16:04 +00:00
Ulrich Drepper 6718095b09 (setenv): Don't copy name when we reuse the buffer for replacement. 1997-03-18 04:13:50 +00:00
Ulrich Drepper b41fb4250f Update. 1997-03-17 05:49:11 +00:00
Ulrich Drepper 7e165c9059 update from main archive 970316 1997-03-17 05:25:34 +00:00
Ulrich Drepper d4fff052ce Add handling of correct stat structure 1997-03-17 04:34:39 +00:00
Ulrich Drepper 22c4356832 m68k specific infinity values 1997-03-17 04:33:29 +00:00
Ulrich Drepper 6f69fa17e5 ix87 specific infinity values 1997-03-17 04:33:16 +00:00
Ulrich Drepper a23087343b regex test suite 1997-03-17 04:32:23 +00:00
Ulrich Drepper ba2ccfa167 (recursive): Return rp to caller.
(strptime_internal): First check for long names, then abbreviated
(month & weekday).
strptime_internal) [case 'Y']: Always subtract 1900 from year,
regardless of century.
1997-03-17 04:14:50 +00:00
Ulrich Drepper 71c5289b0f Update from tzcode1997c. 1997-03-17 04:14:27 +00:00
Ulrich Drepper 1893ec6a38 Don't use incompatible kernel header. 1997-03-17 04:13:52 +00:00
Ulrich Drepper e2f8a38f47 Add PF_FILE as synonym for PF_LOCAL and AF_FILE as synonym for
AF_LOCAL.
1997-03-17 04:13:32 +00:00
Ulrich Drepper e16db41ba6 (struct stat): Change definition to use prescribed types for elements. 1997-03-17 04:13:15 +00:00
Ulrich Drepper 13babeb0d3 Add copyright. 1997-03-17 04:12:54 +00:00
Ulrich Drepper c424f2da59 [__USE_GNU]: Add O_READ, O_WRITE and O_NORW. 1997-03-17 04:12:44 +00:00
Ulrich Drepper cac34d519a Add kernel_stat.h. 1997-03-17 04:12:29 +00:00
Ulrich Drepper b47d1816eb Don't copy whole `struct dirent' record, only reclen bytes. 1997-03-17 04:11:37 +00:00
Ulrich Drepper 8fbe82ee26 Update copyright.
Define O_FSYNC as alias of O_SYNC.  Add BSD compatibility macros
FAPPEND, FFSYNC, FNONBLOCK, and FNDELAY.
1997-03-17 04:11:21 +00:00
Ulrich Drepper dd23f3b0d6 Update copyright. 1997-03-17 04:10:55 +00:00
Ulrich Drepper 3365152cb0 Define as __euidaccess and make euidaccess weak alias. 1997-03-17 04:10:16 +00:00
Ulrich Drepper 4b3769bc7c Add cast to prevent warning. 1997-03-17 04:10:07 +00:00
Ulrich Drepper cf2b29bfe0 Distinguish error cases for x is +0 or -0. 1997-03-17 04:09:18 +00:00
Ulrich Drepper 98e994340a Do not raise exception expect when in SVID mode. 1997-03-17 04:08:39 +00:00
Ulrich Drepper f4a0465b69 (huge, tiny): Adapt values for long double type. 1997-03-17 04:08:21 +00:00
Ulrich Drepper 1908c08641 Rewrite to return -1 for -inf. 1997-03-17 04:08:05 +00:00
Ulrich Drepper 31d7822815 Correct return value. Discard first stack element after fxtract. 1997-03-17 04:07:07 +00:00
Ulrich Drepper 9b5225b600 Return -1 for -inf. 1997-03-17 04:06:58 +00:00
Ulrich Drepper f13f1b26e4 Change return value for -inf argument to -1.0. 1997-03-17 04:06:49 +00:00
Ulrich Drepper 967578d96c Major rewrite to handle special cases. 1997-03-17 04:06:35 +00:00
Ulrich Drepper 421dcdf3a9 Optimize branch code. 1997-03-17 04:04:45 +00:00
Ulrich Drepper 87a5e8a7a4 Fix bug in FPU stack handling. 1997-03-17 04:04:21 +00:00
Ulrich Drepper a2a3fc55fd Remove definition of long double definition. Make it the same as the
double definition.
1997-03-17 04:03:42 +00:00
Ulrich Drepper 02f25bd59b (nofini): *Really* align stack to 8-byte boundary. 1997-03-17 04:02:41 +00:00
Ulrich Drepper c7b0194ac3 (msync): Add third parameter. 1997-03-17 04:02:24 +00:00
Ulrich Drepper 885ba00117 (__need_error_t): New macro, before including <errno.h>
[!__const] (__const): New macro.
[!__error_t_defined] (error_t): New typedef.
1997-03-17 04:00:15 +00:00
Ulrich Drepper 3cfcebc885 (_tens_in_limb) [BITS_PER_MP_LIMB > 32]: Make all numbers unsigned to
make buggy gccs happy.
1997-03-17 03:59:57 +00:00
Ulrich Drepper 2047317f3b Use __va_copy if available. 1997-03-17 03:59:42 +00:00
Ulrich Drepper ac7c207f14 (vasprintf): Give full prototype. 1997-03-17 03:59:30 +00:00
Ulrich Drepper a18be620a1 Add prototype for __euidaccess. 1997-03-17 03:59:07 +00:00
Ulrich Drepper 177f9d5cd4 Merge with regex sources from Arnold Robbins' version in GNU awk. 1997-03-17 03:58:51 +00:00
Ulrich Drepper afc1d235b7 (distribute): Add TESTS, TESTS2C.sed, and testcases.h.
(tests): Add runtests.
(before-compile): Add testcases.h.
(testcases.h): New rule to generate header with tests.
1997-03-17 03:58:40 +00:00
Ulrich Drepper c293f9bc63 (_nss_files_gethostbyname2_r): New functions. Compare result for
correct address type.
1997-03-17 03:57:34 +00:00
Ulrich Drepper 24ea71e942 (_nss_nis_gethostbyname2_r): New functions. Compare result for
correct address type.
(_nss_nis_gethostbyname_r): Use _nss_nis_gethostbyname2_r.
1997-03-17 03:57:03 +00:00
Ulrich Drepper 79df061031 Rewrite NIS code to allow empty keys. 1997-03-17 03:56:41 +00:00
Ulrich Drepper 375676b1b6 Rewrite NIS code to allow empty keys.
Don't ignore return value of yp_all.
1997-03-17 03:56:37 +00:00
Ulrich Drepper 94f1773041 (__yp_bind): Fix possible buffer overflow. 1997-03-17 03:55:56 +00:00
Ulrich Drepper 77055d99e4 New example for scandir function. 1997-03-17 03:55:21 +00:00
Ulrich Drepper fb63ae13d0 (EXIT_FAILURE): Fix typo. Patch by robbe@orcus.priv.at. 1997-03-17 03:54:07 +00:00
Ulrich Drepper 44a09a3306 Add documentation for scandir and alphasort. 1997-03-17 03:53:51 +00:00
Ulrich Drepper 579749498e (mprotect) [_LIBC]: Define as __mprotect to clean up namespace. 1997-03-17 03:53:39 +00:00
Ulrich Drepper 52cff2eeb6 Include <mach/kern_return.h>. 1997-03-17 03:53:24 +00:00
Ulrich Drepper 94f8647f1c Include <mach/mach_traps.h>.
(__spin_lock_solid): Provide arg to swtch_pri.
1997-03-17 03:53:15 +00:00
Ulrich Drepper 88f4537c77 Include <mach/mig_support.h>. 1997-03-17 03:52:56 +00:00
Ulrich Drepper 32fff90d82 (mach_error_string, mach_error, mach_error_type): Always provide
prototypes.
1997-03-17 03:52:48 +00:00
Ulrich Drepper 00aec83a30 (mach_error_string_int): Give full prototype. 1997-03-17 03:52:38 +00:00
Ulrich Drepper ff046934fd (__mach_error_map_compat): Give full prototype. 1997-03-17 03:52:14 +00:00
Ulrich Drepper 31f43cffe0 When named file not found and not absolute use path in I18NPATH. 1997-03-17 03:49:00 +00:00
Ulrich Drepper 4c2d948abe Don't use LOCALE_PATH to find binary locale files. Use LOCALEDIR
only.
1997-03-17 03:48:46 +00:00
Ulrich Drepper c5cb336b87 Use __ protected versions of non-standard functions.
(iruserok): Use euidaccess instead of half-hearted
switching of UID before opening .rhosts.
1997-03-17 03:44:01 +00:00
Ulrich Drepper 8d7899fbb6 (pwrite, vpprintf): Likewise. 1997-03-17 03:43:36 +00:00
Ulrich Drepper bca9fd93a8 (_hurd_set_host_config): Cast second arg to __file_name_split. 1997-03-17 03:43:27 +00:00
Ulrich Drepper 9f3168cf9a (vpprintf): Include <stdarg.h>. New declaration. 1997-03-17 03:43:17 +00:00
Ulrich Drepper 24a09ef771 Include <features.h>. 1997-03-17 03:42:40 +00:00
Ulrich Drepper f0427c13e4 (alphasort): Interpret arguments as pointers to pointers to directory
entries so that alphasort really can be used as argument for scandir.
1997-03-17 03:42:23 +00:00
Ulrich Drepper 347415b76e (__big_delete): Don't call __free_ovflpage without testing for
last_bfp to be NULL.
1997-03-17 03:42:07 +00:00
Ulrich Drepper ff407b13b9 (catopen): Always add NLSPATH to search path for catalogs, not only if
the envvar NLSPATH is not available.
1997-03-17 03:41:49 +00:00
Ulrich Drepper 265ede2a16 (build-shlib): Also create symlink if library is versioned. 1997-03-17 03:41:34 +00:00
Ulrich Drepper 1bdf7624dc (localtime-file): Don't define using installation directory.
(inst_localtime-file): New variable.
1997-03-17 03:41:17 +00:00
Ulrich Drepper 95a5089d2f The user- and kernel-level sigaction structure is different. handle
this correctly.
1997-03-07 04:27:25 +00:00
Ulrich Drepper 760f9f4cd0 (_dl_load_cache_lookup): Recognize cache type 1 or 3. 1997-03-06 20:36:16 +00:00
Ulrich Drepper 3a1db3bf88 . 1997-03-06 04:58:33 +00:00
Ulrich Drepper 0b7f4318c0 (_dl_load_cache_lookup): Also recognize cache entries with flag == 3. 1997-03-06 04:57:52 +00:00
Ulrich Drepper 3316c605ba update from tzdata1997c 1997-03-05 22:14:38 +00:00
Ulrich Drepper aa8ecd3c01 Add <sys/types.h>. 1997-03-05 21:41:57 +00:00
Ulrich Drepper d35ffac1c7 (_IO_str_finish): Add second parameter, which is ignored. 1997-03-05 21:17:30 +00:00
Ulrich Drepper b1f911a801 (_IO_file_finish): Add second parameter, which is ignored. 1997-03-05 21:16:43 +00:00
Ulrich Drepper 5b2cfa7797 (_IO_mem_finish): Add second parameter, which is ignored. 1997-03-05 21:15:19 +00:00
Ulrich Drepper 3967ae2f20 (_IO_default_finish): Add second parameter, which is ignored. 1997-03-05 21:13:53 +00:00
Ulrich Drepper 3a7c62f09a (_IO_finish_t): Take additional parameter, to match the hidden
__in_chrg parameter of the destructor.
(_IO_FINISH): Pass zero for it.
1997-03-05 21:12:58 +00:00
Ulrich Drepper 571286fe50 Don't disable canonical input. 1997-03-05 21:09:54 +00:00
Ulrich Drepper 28b5b97f16 Change prototypes to use types with explicit width. `unsigned long'
is different on 64 bit systems.
1997-03-05 21:08:28 +00:00
Ulrich Drepper 4db14580ca (htonl, htons, ntohl, ntohs): Change prototypes to use types with
explicit width.  `unsigned long' is different on 64 bit systems.
1997-03-05 21:06:12 +00:00
Ulrich Drepper 379091f89d Clear upper half of word containing exponent before comparing. 1997-03-05 21:01:25 +00:00
Ulrich Drepper a6a5f54f28 *** empty log message *** 1997-03-05 20:59:58 +00:00
Ulrich Drepper a06faff6c1 Add rules to run and distribute xtract-typefun. 1997-03-05 20:59:11 +00:00
Ulrich Drepper e3d3d6c990 $(tzfiles:%=$(objpfx)z.%): Remove unneeded depedencies between
installed $(tzlinks) and $(tzbases) files.
1997-03-05 20:56:54 +00:00
Ulrich Drepper 00926c6660 Add s_poll. 1997-03-05 20:51:56 +00:00
Ulrich Drepper 2f54e18d8b Update from tzdata1997b. 1997-03-05 20:51:24 +00:00
Ulrich Drepper eb3b8b2ea7 Update from tzcode1997b. 1997-03-05 20:51:02 +00:00
Ulrich Drepper 731640fc24 Implement poll function by falling back to select-based implementation
if syscall isn't available.
1997-03-05 20:46:08 +00:00
Ulrich Drepper 1f574fe0be Support both the Linux/i386 and OSF/1 style brk syscalls. We may want
to change Linux/Alpha for the benefit of running foreign binaries.
1997-03-05 20:36:45 +00:00
Ulrich Drepper 1b4d62a18d (STRTOF): Make sure return value is large enough so that clearing
second word is necessary.
1997-03-05 20:35:18 +00:00
Ulrich Drepper ce328bf180 Don't use kernel header since it is wrong for 64 bit systems. 1997-03-05 20:34:19 +00:00
Ulrich Drepper 58f6951944 (__ivaliduser): Don't use getline, but __getline instead to avoid
namespace problems.
1997-03-05 20:31:16 +00:00
Ulrich Drepper 450867ffea Update. 1997-03-05 20:29:21 +00:00
Ulrich Drepper 992b2c400b Correct handling of `position' levels with no non-IGNOREd element and
handling of NUL byte.
1997-03-05 20:28:57 +00:00
Ulrich Drepper 6145c5ea69 Implement --quiet option. 1997-03-05 20:26:24 +00:00
Ulrich Drepper e3f24cf1bf Declare be_quiet variable. 1997-03-05 20:26:15 +00:00
Ulrich Drepper 1217a671f4 Don't print warnings if quiet option was given. 1997-03-05 20:26:00 +00:00
Ulrich Drepper 8814d1a72e Ethernet specific definition, Linux versin 1997-02-26 03:37:26 +00:00
Ulrich Drepper d730f1d27c Update. 1997-02-26 03:31:13 +00:00
Ulrich Drepper 2e12a92961 (LINE_PARSER): Add missing ')'. 1997-02-26 03:30:27 +00:00
Ulrich Drepper 4f72518358 update from main archive 970226 1997-02-26 01:06:05 +00:00
Ulrich Drepper 655fe31070 update from main archive 970221 1997-02-22 01:07:27 +00:00
Ulrich Drepper 9652be3de8 update from main archive 970217 1997-02-18 04:08:52 +00:00
672 changed files with 28074 additions and 13113 deletions
+74
View File
@@ -0,0 +1,74 @@
List of known bugs (certainly very incomplete)
----------------------------------------------
Time-stamp: <1997-12-28T12:54:55+0100 drepper>
This following list contains those bugs which I'm aware of. Please
make sure that bugs you report are not listed here. If you can fix one
of these bugs/limitations I'll certainly be glad to receive a patch.
Another source of information about bugs is the problem data base of the
GNU project. There is an easy to use WWW interface available at
http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl
I would appreciate it very much if you could verify the problem was not
reported before by looking through the database. To make the information
in this database as useful as possible please report bugs always using the
`glibcbug' shell script which gets installed with GNU libc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Severity: [ *] to [***]
[ **] There are problems with signal handling when using LinuxThreads.
[ **] The libm-ieee `log2' function seems to be very inaccurate.
[ *] The libm-ieee `asin' function gives wrong results (at least for 0.5).
[ *] The precision of the `sinhl' and/or `asinhl' function do not seem
to be the best.
[ *] The syslog function should print to the console if the LOG_CONS
flag was given.
[PR libc/72]
[ *] On Linux, there should be a way to prevent defining the symbol
NGROUPS_MAX in the <linux/limits.h> header file. In glibc it
is defined in <posix1_lim.h> which must not make the other
symbols in <linux/limits.h> available.
[PR libc/140]
[ *] When assembling a locale definition, that uses the "copy"
directive, with localedef, not only the copied category is
checked for errors, but the whole file containing the same
category.
[PR libc/207]
[ *] The localedef program should not generate errors if for categories
which are not used for the output there are characters referenced
which are not defined in the charmap.
[PR libc/229]
[ *] _IO_getline can loop forever, at least with C++
[PR libc/332]
[ *] The rcmd() functions (more concrete: the handling of .rhosts) does
not support netgroups and wildcards (+).
[ **] When popen() was called with an illegal command the function still
returns with a value not equal to NULL.
[ *] setlocale() leaks memory. This becomes only a problem if a program
calls this function very often which normally is not the case. The
problem is fixed for glibc 2.1.
[ *] Using the NSS modules from statically linked programs sometimes
fails (for very large entries). The problem is fixed in glibc 2.1.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ulrich Drepper
drepper@cygnus.com
+3052 -1
View File
File diff suppressed because it is too large Load Diff
+724 -512
View File
File diff suppressed because it is too large Load Diff
+34 -70
View File
@@ -157,20 +157,32 @@ 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.1
* GCC 2.7.2.3
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
versions may have problems.
* `binutils' 2.7
* `binutils' 2.8.1
Using the GNU `binutils' (assembler, linker, and related tools) is
preferable when possible, and they are required to build an ELF
shared C library. We recommend `binutils' version 2.7 or later;
shared C library. We recommend `binutils' version 2.8 or later;
earlier versions are known to have problems or to not support all
architectures.
If you change any configuration file you will need also
* `autoconf' 2.12
and if you change any of the message translation files you will also need
* `GNU gettext' 0.10 or later
If you upgrade your source tree using the patches made available you probably
will need those package above in any case.
Supported Configurations
------------------------
@@ -183,8 +195,8 @@ following patterns:
iX86-ANYTHING-linux
m68k-ANYTHING-linux
Former versions of this library used to support the following
configurations but the current status is unknown:
Former releases of this library (version 1.09.1 and perhaps earlier
versions) used to run on the following configurations:
alpha-dec-osf1
iX86-ANYTHING-bsd4.3
@@ -208,7 +220,13 @@ configurations but the current status is unknown:
sparc-sun-solaris2.N
sparc-sun-sunos4.N
Each case of `iX86' can be `i386', `i486', `i586', or `i686'.. All
Since no one has volunteered to test and fix the above
configurations, these are not supported at the moment. It's expected
that these don't work anymore. Porting the library is not hard. If
you are interested in doing a port, please contact the glibc
maintainers by sending electronic mail to <bug-glibc@prep.ai.mit.edu>.
Each case of `iX86' can be `i386', `i486', `i586', or `i686'. All
of those configurations produce a library that can run on any of these
processors. The library will be optimized for the specified processor,
but will not use instructions not available on all of them.
@@ -258,11 +276,11 @@ and `config.make' which are created by running `configure'; they will
be in whatever directory was current when you ran `configure'.
If you think you have found some way in which the GNU C library does
not conform to the ANSI and POSIX standards (*note Standards and
not conform to the ISO and POSIX standards (*note Standards and
Portability::.), that is definitely a bug. Report it!
Send bug reports to the Internet address `bug-glibc@prep.ai.mit.edu'
or the UUCP path `mit-eddie!prep.ai.mit.edu!bug-glibc'. If you have
Send bug reports to the Internet address <bug-glibc@prep.ai.mit.edu>
or the UUCP path <mit-eddie!prep.ai.mit.edu!bug-glibc>. If you have
other problems with installation or use, please report those as well.
If you are not sure how a function should behave, and this manual
@@ -270,8 +288,8 @@ doesn't tell you, that's a bug in the manual. Report that too! If the
function's behavior disagrees with the manual, then either the library
or the manual has a bug, so report the disagreement. If you find any
errors or omissions in this manual, please report them to the Internet
address `bug-glibc-manual@prep.ai.mit.edu' or the UUCP path
`mit-eddie!prep.ai.mit.edu!bug-glibc-manual'.
address <bug-glibc-manual@prep.ai.mit.edu> or the UUCP path
<mit-eddie!prep.ai.mit.edu!bug-glibc-manual>.
Adding New Functions
====================
@@ -773,10 +791,9 @@ parts of the library were contributed or worked on by other people.
platforms was written by Per Bothner and modified by Ulrich
Drepper.
* Some of the Internet-related code (most of the `inet'
subdirectory) and several other miscellaneous functions and
header files have been included from 4.4 BSD with little or no
modification.
* The Internet-related code (most of the `inet' subdirectory) and
several other miscellaneous functions and header files have been
included from 4.4 BSD with little or no modification.
All code incorporated from 4.4 BSD is under the following
copyright:
@@ -827,7 +844,7 @@ parts of the library were contributed or worked on by other people.
`rand' and `srand' functions, were written by Earl T. Cohen for
the University of California at Berkeley and are copyrighted by the
Regents of the University of California. They have undergone minor
changes to fit into the GNU C library and to fit the ANSI C
changes to fit into the GNU C library and to fit the ISO C
standard, but the functional code is Berkeley's.
* The Internet resolver code is taken directly from BIND 4.9.5,
@@ -914,59 +931,6 @@ parts of the library were contributed or worked on by other people.
Carnegie Mellon University
Pittsburgh PA 15213-3890
or `Software.Distribution@CS.CMU.EDU' any improvements or
or <Software.Distribution@CS.CMU.EDU> any improvements or
extensions that they make and grant Carnegie Mellon the
rights to redistribute these changes.
* The `getaddrinfo' function is written by Craig Metz and it has the
following copyright:
The Inner Net License, Version 2.00
===================================
The author(s) grant permission for redistribution and use in source and
binary forms, with or without modification, of the software
and documentation provided that the following conditions are met:
0. If you receive a version of the software that is
specifically labelled as not being for redistribution
(check the version message and/or README), you are not
permitted to redistribute that version of the software in
any way or form.
1. All terms of the all other applicable copyrights and
licenses must be followed.
2. Redistributions of source code must retain the authors'
copyright notice(s), this list of conditions, and the
following disclaimer.
3. Redistributions in binary form must reproduce the authors'
copyright notice(s), this list of conditions, and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
4. All advertising materials mentioning features or use of
this software must display the following acknowledgement
with the name(s) of the authors as specified in the
copyright notice(s) substituted where indicated:
This product includes software developed by <name(s)>, The Inner
Net, and other contributors.
5. Neither the name(s) of the author(s) nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY ITS AUTHORS AND CONTRIBUTORS ``AS
IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
If these license terms cause you a real problem, contact the author.
+9 -9
View File
@@ -118,8 +118,8 @@ foo:=$(shell echo '+out=$(+out)' >&2; echo foofoo >&2)
$(+sysdeps)
foo:=$(shell echo 'made +tsrcs=$(+tsrcs)'>&2)
foo:=$(shell echo generated='$(generated)' >&2)
generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
foo:=$(shell echo now generated='$(generated)' >&2)
#generated := $(sort $(generated) $(generated:.S=.c) $(generated:.s=.c))
#foo:=$(shell echo now generated='$(generated)' >&2)
+tsrcs := $(sort $(filter-out $(generated),$(+tsrcs)))
foo:=$(shell echo '+tsrcs=$(+tsrcs)'>&2)
foo:=$(shell echo foobie, dammit! >&2)
@@ -142,10 +142,10 @@ ifdef subdir
foo:=$(shell echo subdir foo >&2)
+tsrcs := Makefile $(+tsrcs) \
$(addsuffix .c,$(others) $(tests)) \
$(wildcard $(addsuffix .input,$(tests)) \
$(addsuffix .args,$(tests)))
+tsrcs := Makefile $(+tsrcs) \
$(addsuffix .c,$(others) $(tests) $(test-srcs)) \
$(wildcard $(addsuffix .input,$(tests) $(test-srcs)) \
$(addsuffix .args,$(tests) $(test-srcs)))
+tardeps := $(strip $(+tsrcs))
verbose = v
@@ -195,9 +195,9 @@ dist.tar: README $(tardir) $(+tsrcs)
$(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) dist.tar &
tar xfv $< -C $${TMPDIR-/tmp} | sed -n '/[^/]\{15,\}/p'
tar covf $@ -C $${TMPDIR-/tmp} $(tardir)
-rm -fr $${TMPDIR-/tmp}/$(tardir) dist.tar &
%.Z: %
compress -c $< > $@
+1 -1
View File
@@ -88,7 +88,7 @@ sources += $(foreach lib,$(extra-libs),$($(lib)-routines:=.c))
# sysdep directories, so don't bother searching them.
sysdep-sources := $(filter-out $(wildcard $(sources)), $(sources))
all-sources = $(wildcard $(sort $(sources) $(sources:.c=.S) $(sources:.c=.s) \
$(others:=.c) $(tests:=.c))) \
$(others:=.c) $(tests:=.c) $(test-srcs:=.c))) \
$(foreach dir,$(all-dirs),\
$(wildcard \
$(addprefix $(dir)/,\
+8 -9
View File
@@ -23,6 +23,8 @@ ifneq (,)
This makefile requires GNU Make.
endif
all: # Make this the default goal
ifneq "$(origin +included-Makeconfig)" "file"
+included-Makeconfig := yes
@@ -239,7 +241,8 @@ endif
# other than there, so the zoneinfo directory contains only universal data,
# localizing the configuration data elsewhere.
ifndef localtime-file
localtime-file = $(inst_sysconfdir)/localtime
localtime-file = $(sysconfdir)/localtime
inst_localtime-file = $(install_root)$(localtime-file)
endif
# What to use for leap second specifications in compiling the default
@@ -319,10 +322,10 @@ endif
ifndef +link
+link = $(CC) -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+prector) \
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs) $(link-libc) $(+postinit)
$(link-extra-libs) $(link-libc) $(+postctor) $(+postinit)
endif
ifndef config-LDFLAGS
ifeq (yes,$(build-shared))
@@ -366,6 +369,8 @@ endif
ifeq ($(elf),yes)
+preinit = $(addprefix $(csu-objpfx),crti.o)
+postinit = $(addprefix $(csu-objpfx),crtn.o)
+prector = `$(CC) --print-file-name=crtbegin.o`
+postctor = `$(CC) --print-file-name=crtend.o`
endif
csu-objpfx = $(common-objpfx)csu/
elf-objpfx = $(common-objpfx)elf/
@@ -516,12 +521,6 @@ endif
ifndef BUILD_CC
BUILD_CC = $(CC)
endif
ifneq ($(BUILD_CC),$(CC))
cross-compiling := yes
else
cross-compiling := no
endif
# Figure out the version numbers from version.h.
+4 -1
View File
@@ -279,7 +279,7 @@ parent_echo-distinfo:
# Make the distribution tarfile.
distribute := README INSTALL FAQ NOTES NEWS PROJECTS \
distribute := README INSTALL FAQ NOTES NEWS PROJECTS BUGS \
COPYING.LIB COPYING ChangeLog ChangeLog.[0-9] \
Makefile Makeconfig Makerules Rules Make-dist MakeTAGS \
extra-lib.mk o-iterator.mk \
@@ -303,6 +303,9 @@ makeinfo --no-validate --no-warn --no-headers $< -o $@
endef
INSTALL: manual/maint.texi; $(format-me)
NOTES: manual/creature.texi; $(format-me)
manual/dir-add.texi manual/dir-add.info: FORCE
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
FORCE:
rpm/%: subdir_distinfo
$(MAKE) $(PARALLELMFLAGS) -C $(@D) subdirs='$(subdirs)' $(@F)
+10 -13
View File
@@ -278,9 +278,9 @@ endif
# GCC can grok options after the file name, and it looks nicer that way.
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
compile.S = $(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS)
COMPILE.S = $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS)
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
compile.S = $(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.S = $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS) $(ASFLAGS-$(suffix $@))
# We need this for the output to go in the right place. It will default to
# empty if make was configured to work with a cc that can't grok -c and -o
@@ -339,6 +339,8 @@ $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
-Wl,--whole-archive $^ $(no-whole-archive) \
$(LDLIBS-$(@F:lib%.so=%).so)
test -z "$($(@F)-version)" || \
(rm -f $@$($(@F)-version); $(LN_S) $(@F) $@$($(@F)-version))
endef
# Don't try to use -lc when making libc.so itself.
@@ -354,12 +356,6 @@ $(common-objpfx)libc.so: $(elfobjdir)/soinit.so \
$(common-objpfx)libc_pic.a \
$(elfobjdir)/sofini.so $(elfobjdir)/ld.so
$(build-shlib)
ifdef libc.so-version
$(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
rm -f $@
ln -s $(<F) $@ || ln $< $@
endif
endif
# Some files must not be compiled with the exception handler mechanism
@@ -811,7 +807,7 @@ $(BUILD_CC) $(BUILD_CFLAGS) $(<:$(common-objpfx)%=$(..)%) -o $(..)$(@F)
endef
# We always want to use configuration definitions.
BUILD_CFLAGS = -include $(common-objpfx)config.h
BUILD_CFLAGS = -include $(..)config.h
# Support the GNU standard name for this target.
.PHONY: check
@@ -839,9 +835,10 @@ mostlyclean: common-mostlyclean
# Remove the object files.
common-mostlyclean:
-rm -f $(addprefix $(objpfx),$(tests) $(others) \
$(addsuffix .o,$(tests) $(others)) \
$(addsuffix .out,$(tests)))
-rm -f $(addprefix $(objpfx),$(tests) $(test-srcs) $(others) \
$(addsuffix .o,$(tests) $(test-srcs) \
$(others)) \
$(addsuffix .out,$(tests) $(test-srcs)))
-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib))
-rm -f core $(common-objpfx)stub-$(subdir)
$(rmobjs)
+28 -2
View File
@@ -1,12 +1,36 @@
GNU C Library NEWS -- history of user-visible changes. 26 January 1997
GNU C Library NEWS -- history of user-visible changes. 1997-11-15
Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
See the end for copying conditions.
Please send GNU C library bug reports using the `glibcbug' script to
<bugs@gnu.ai.mit.edu>. Questions and suggestions should be send to
<bugs@gnu.org>. Questions and suggestions should be send to
<bug-glibc@prep.ai.mit.edu>.
Version 2.0.6
* more bug fixes
Version 2.0.5
* more bug fixes
* inet_ntoa is thread-safe
* updwtmp is moved from libutil to libc
* rewrite of cbrt function
* update of timezone data
Version 2.0.4
* more bug fixes
Version 2.0.3
* more bug fixes
Version 2.0.2
* more bug fixes
@@ -14,6 +38,8 @@ Version 2.0.2
* add atoll function
* fix complex problems in Berkeley DB code
* fix math functions
Version 2.0.1
+45 -37
View File
@@ -1,6 +1,6 @@
Open jobs for finishing GNU libc:
---------------------------------
Status: January 1997
Status: August 1997
If you have time and talent to take over any of the jobs below please
contact <bug-glibc@prep.ai.mit.edu>
@@ -19,7 +19,16 @@ contact <bug-glibc@prep.ai.mit.edu>
standards if they do not contradict each other.
[ 3] Write translations for the GNU libc message for the so far
[ 3] The IMHO opinion most important task is to write a more complete
test suite. We cannot get too many people working on this. It is
not difficult to write a test, find a definition of the function
which I normally can provide, if necessary, and start writing tests
to test for compliance. Beside this, take a look at the sources
and write tests which in total test as many paths of execution as
possible.
[ 4] Write translations for the GNU libc message for the so far
unsupported languages. GNU libc is fully internationalized and
users can immediately benefit from this.
@@ -28,15 +37,7 @@ contact <bug-glibc@prep.ai.mit.edu>
for the current status (of course better use a mirror of prep).
[ 4] Write wordexp() function; this is described in POSIX.2, the
header <wordexp.h> already exists.
Implementation idea: use some functions from bash.
**** Somebody is working on this. Help may or may not be appreciated.
[ 5] Write `long double' versions of the math functions. This should be
[ 6] Write `long double' versions of the math functions. This should be
done in collaboration with the NetBSD and FreeBSD people.
The libm is in fact fdlibm (not the same as in Linux libc).
@@ -45,7 +46,18 @@ contact <bug-glibc@prep.ai.mit.edu>
the rest.
[ 6] If you enjoy assembler programming (as I do --drepper :-) you might
[ 7] Several math functions have to be written:
- exp2
each with float, double, and long double arguments.
Beside this most of the complex math functions which are new in
ISO C 9X should be improved. Writing some of them in assembler is
useful to exploit the parallelism which often is available.
[ 8] If you enjoy assembler programming (as I do --drepper :-) you might
be interested in writing optimized versions for some functions.
Especially the string handling functions can be optimized a lot.
@@ -60,42 +72,38 @@ contact <bug-glibc@prep.ai.mit.edu>
work.
[ 7] Write nftw() function. Perhaps it might be good to reimplement the
ftw() function as well to share most of the code.
**** Almost done!
[ 8] Write AVL-tree based tsearch() et.al. functions. Currently only
a very simple algorithm is used.
There is a public domain version but using this would cause problems
with the assignment.
[ 9] Extend regex and/or rx to work with wide characters and complete
[10] Extend regex and/or rx to work with wide characters and complete
implementation of character class and collation class handling.
It is planed to do a complete rewrite.
[10] Write access function for netmasks, bootparams, and automount
[11] Write access function for netmasks, bootparams, and automount
databases for nss_files and nss_db module.
The functions should be embedded in the nss scheme. This is not
hard and not all services must be supported at once.
[11] Rewrite utmp/wtmp functions to use database functions. This is much
better than the normal flat file format.
**** There are plans for a new approach to this problem. Please contact
bug-glibc@prep.ai.mit.edu before starting to work.)
[12] Several more or less small functions have to be written:
[13] Several more or less small functions have to be written:
+ tcgetid() and waitid() from XPG4.2
+ grantpt(), ptsname(), unlockpt() from XPG4.2
+ getdate() from XPG4.2
+ fmtmsg() from SVID
More information are available on request.
More information is available on request.
[14] We need to write a library for on-the-fly transformation of streams
of text. In fact, this would be a recode-library (you know, GNU recode).
This is needed in several places in the GNU libc and I already have
rather concrete plans but so far no possibility to start this.
[15] Cleaning up the header files. Ideally, each header style should
follow the "good examples". Each variable and function should have
a short description of the function and its parameters. The prototypes
should always contain variable names which can help to identify their
meaning; better than
int foo __P ((int, int, int, int));
Blargh!
+8 -7
View File
@@ -1,11 +1,11 @@
This directory contains the version 2.0.1 test release of the GNU C Library.
This directory contains the version 2.0.6 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 is known to run on the following
configurations:
*-*-gnu GNU Hurd
i[3456]86-*-gnu GNU Hurd
i[3456]86-*-linux-gnu Linux-2.0 on Intel
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
@@ -36,17 +36,18 @@ versions) used to run on the following configurations:
sparc-sun-solaris2
sparc-sun-sunos4
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>.
Since no one has volunteered to test and fix the above configurations,
these are not supported at the moment. It's expected that these don't
work anymore. Porting the library is not hard. If you are interested
in doing a port, please contact the glibc maintainers by sending
electronic mail to <bug-glibc@prep.ai.mit.edu>.
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-crypt-2.0.1.tar.gz'. You can just unpack the crypt
called `glibc-crypt-2.0.6.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.ifi.uio.no
+8 -7
View File
@@ -5,7 +5,7 @@ Some bugs surely remain.
As of this release, the GNU C library is known to run on the following
configurations:
*-*-gnu GNU Hurd
i[3456]86-*-gnu GNU Hurd
i[3456]86-*-linux-gnu Linux-2.0 on Intel
m68k-*-linux-gnu Linux-2.0 on Motorola 680x0
alpha-*-linux-gnu Linux-2.0 on DEC Alpha
@@ -36,10 +36,11 @@ versions) used to run on the following configurations:
sparc-sun-solaris2
sparc-sun-sunos4
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>.
Since no one has volunteered to test and fix the above configurations,
these are not supported at the moment. It's expected that these don't
work anymore. Porting the library is not hard. If you are interested
in doing a port, please contact the glibc maintainers by sending
electronic mail to <bug-glibc@gnu.org>.
The GNU C library now includes Michael Glad's Ultra Fast Crypt, which
provides the Unix `crypt' function, plus some other entry points.
@@ -79,9 +80,9 @@ in the GNU C library, explaining how you can tell the library what
facilities you want it to make available.
We prefer to get bug reports sent using the `glibcbug' shell script which
is install together with the rest of the GNU libc to <bugs@gnu.ai.mit.edu>.
is install together with the rest of the GNU libc to <bugs@gnu.org>.
Simply run this shell script and fill in the information. Nevertheless
you can still send bug reports to <bug-glibc@prep.ai.mit.edu> as normal
you can still send bug reports to <bug-glibc@gnu.org> as normal
electronic mails.
The GNU C Library is free software. See the file COPYING.LIB for copying
+5 -5
View File
@@ -83,19 +83,19 @@ common-generated := $(common-generated) dummy.o dummy.c empty.c empty.o
.PHONY: others tests
others: $(addprefix $(objpfx),$(others) $(extra-objs))
ifeq ($(cross-compiling),yes)
tests: $(addprefix $(objpfx),$(tests))
tests: $(addprefix $(objpfx),$(tests) $(test-srcs))
else
tests: $(tests:%=$(objpfx)%.out)
tests: $(tests:%=$(objpfx)%.out) $(addprefix $(objpfx),$(test-srcs))
endif
ifneq "$(strip $(others) $(tests))" ""
$(addprefix $(objpfx),$(others) $(tests)): %: %.o \
ifneq "$(strip $(others) $(tests) $(test-srcs))" ""
$(addprefix $(objpfx),$(others) $(tests) $(test-srcs)): %: %.o \
$(sort $(filter $(common-objpfx)libc%,$(link-libc))) \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link)
endif
ifneq "$(strip $(tests))" ""
ifneq "$(strip $(tests) $(test-srcs))" ""
# These are the implicit rules for making test outputs
# from the test programs and whatever input files are present.
$(objpfx)%.out: %.args $(objpfx)% %.input
Vendored
+59
View File
@@ -31,3 +31,62 @@ changequote([,])dnl
fi
AC_MSG_RESULT($ac_cv_check_symbol_$1)])dnl
dnl
dnl These modifications are to allow for an empty cross compiler tree.
dnl In the situation that cross-linking is impossible, the variable
dnl `cross_linkable' will be substituted with "yes".
AC_DEFUN(AC_PROG_CC_LOCAL,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
AC_CHECK_PROG(CC, gcc, gcc)
if test -z "$CC"; then
AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
fi
AC_PROG_CC_WORKS_LOCAL
AC_PROG_CC_GNU
dnl The following differs from the AC_PROG_CC macro in autoconf. Since
dnl we require a recent version of gcc to be used we do not need to go
dnl into lengths and test for bugs in old versions. It must be gcc 2.7
dnl or above.
if test $ac_cv_prog_gcc = yes; then
GCC=yes
dnl Check the version
cat > conftest.c <<EOF
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
yes;
#endif
EOF
if AC_TRY_COMMAND(${CC-cc} -E conftest.c) | egrep yes >/dev/null 2>&1; then
if test -z "$CFLAGS"; then
CFLAGS="-g -O2"
fi
else
AC_MSG_ERROR([We require GNU CC version 2.7 or newer])
fi
else
AC_MSG_ERROR([GNU libc must be compiled using GNU CC])
fi
])
AC_DEFUN(AC_PROG_CC_WORKS_LOCAL,
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
AC_LANG_SAVE
AC_LANG_C
AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
AC_LANG_RESTORE
AC_MSG_RESULT($ac_cv_prog_cc_works)
if test $ac_cv_prog_cc_works = no; then
cross_linkable=no
ac_cv_prog_cc_cross=yes
dnl AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])
else
cross_linkable=yes
fi
AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler])
AC_MSG_RESULT($ac_cv_prog_cc_cross)
AC_SUBST(cross_linkable)
cross_compiling=$ac_cv_prog_cc_cross
])
+25 -23
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 94, 95, 96 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 94, 95, 96, 97 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,8 +22,12 @@
#ifdef _ASSERT_H
#undef _ASSERT_H
#undef assert
# undef _ASSERT_H
# undef assert
# ifdef __USE_GNU
# undef assert_perror
# endif
#endif /* assert.h */
@@ -37,7 +41,7 @@
#ifdef NDEBUG
#define assert(expr) ((void) 0)
# define assert(expr) ((void) 0)
/* void assert_perror (int errnum);
@@ -45,14 +49,12 @@
error message with the error text for ERRNUM and abort.
(This is a GNU extension.) */
#ifdef __USE_GNU
#define assert_perror(errnum) ((void) 0)
#endif
# ifdef __USE_GNU
# define assert_perror(errnum) ((void) 0)
# endif
#else /* Not NDEBUG. */
#include <sys/cdefs.h>
__BEGIN_DECLS
/* This prints an "Assertion failed" message and aborts. */
@@ -71,27 +73,27 @@ extern void __assert_perror_fail __P ((int __errnum,
__END_DECLS
#define assert(expr) \
((void) ((expr) || \
# define assert(expr) \
((void) ((expr) ? 0 : \
(__assert_fail (__STRING(expr), \
__FILE__, __LINE__, __ASSERT_FUNCTION), 0)))
#ifdef __USE_GNU
#define assert_perror(errnum) \
((void) ((errnum) && (__assert_perror_fail ((errnum), \
__FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
#endif
# ifdef __USE_GNU
# define assert_perror(errnum) \
((void) ((errnum) ? 0 : (__assert_perror_fail ((errnum), \
__FILE__, __LINE__, \
__ASSERT_FUNCTION), 0)))
# endif
/* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
which contains the name of the function currently being defined.
This is broken in G++ before version 2.6. */
#if (!defined (__GNUC__) || __GNUC__ < 2 || \
__GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4))
#define __ASSERT_FUNCTION ((__const char *) 0)
#else
#define __ASSERT_FUNCTION __PRETTY_FUNCTION__
#endif
# if (!defined __GNUC__ || __GNUC__ < 2 || \
__GNUC_MINOR__ < (defined __cplusplus ? 6 : 4))
# define __ASSERT_FUNCTION ((__const char *) 0)
# else
# define __ASSERT_FUNCTION __PRETTY_FUNCTION__
# endif
#endif /* NDEBUG. */
+15 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -34,6 +34,7 @@ catopen (const char *cat_name, int flag)
{
__nl_catd result;
const char *env_var;
const char *nlspath;
result = (__nl_catd) malloc (sizeof (*result));
if (result == NULL)
@@ -82,11 +83,20 @@ catopen (const char *cat_name, int flag)
return (nl_catd) -1;
}
if (__secure_getenv ("NLSPATH") != NULL)
result->nlspath = __strdup (getenv ("NLSPATH"));
else
result->nlspath = __strdup (NLSPATH);
nlspath = __secure_getenv ("NLSPATH");
if (nlspath != NULL && *nlspath != '\0')
{
/* Append the system dependent directory. */
size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
char *tmp = alloca (len);
__stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
nlspath = tmp;
}
else
nlspath = NLSPATH;
result->nlspath = __strdup (nlspath);
if (result->nlspath == NULL)
{
free ((void *) result->cat_name);
+1 -1
View File
@@ -213,7 +213,7 @@ usage (int status)
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\
-H, --header create C header file containing symbol definitions\n\
-H, --header=NAME create C header file NAME containing symbol definitions\n\
-h, --help display this help and exit\n\
--new do not use existing catalog, force new output file\n\
-o, --output=NAME write output to file NAME\n\
+25 -7
View File
@@ -68,8 +68,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-cbm-openbsd${UNAME_RELEASE}
exit 0 ;;
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
laguna:OpenBSD:*:*)
echo mips64-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
pmax:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
wgrisc:OpenBSD:*:*)
echo mips64el-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -118,19 +130,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-atari-openbsd${UNAME_RELEASE}
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-sun-openbsd${UNAME_RELEASE}
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-apple-openbsd${UNAME_RELEASE}
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mvme88k:OpenBSD:*:*)
echo m88k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
@@ -378,8 +396,8 @@ EOF
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp3[0-9][05]:OpenBSD:*:*)
echo m68k-hp-openbsd${UNAME_RELEASE}
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+3
View File
@@ -43,6 +43,9 @@
directive. */
#undef HAVE_ASM_POPSECTION_DIRECTIVE
/* Define to the prefix Alpha/ELF GCC emits before ..ng symbols. */
#undef ASM_ALPHA_NG_SYMBOL_PREFIX
/*
*/
+1
View File
@@ -39,6 +39,7 @@ build-profile = @profile@
build-omitfp = @omitfp@
stdio = @stdio@
add-ons = @subdirs@
cross-compiling = @cross_compiling@
# Build tools.
CC = @CC@
Vendored
+40 -25
View File
@@ -1,6 +1,6 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -149,13 +149,14 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \
| arme[lb] | pyramid \
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 \
| tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
| alpha | we32k | ns16k | clipper | i370 | sh \
| powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
| pdp11 | mips64el | mips64orion | mips64orionel \
| sparc | sparclet | sparclite | sparc64)
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
;;
# We use `pc' rather than `unknown'
@@ -170,14 +171,18 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
| sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
| hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
| pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
| pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -204,9 +209,9 @@ case $basic_machine in
amiga | amiga-*)
basic_machine=m68k-cbm
;;
amigados)
amigaos | amigados)
basic_machine=m68k-cbm
os=-amigados
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-cbm
@@ -391,11 +396,11 @@ case $basic_machine in
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux
os=-linux-gnu
;;
mips*-linux*)
basic_machine=mips-unknown
os=-linux
os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
@@ -566,6 +571,12 @@ case $basic_machine in
basic_machine=i386-sequent
os=-dynix
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
@@ -585,7 +596,7 @@ case $basic_machine in
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
@@ -615,7 +626,7 @@ case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
mips)
if [ x$os = x-linux ]; then
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
else
basic_machine=mips-mips
@@ -680,9 +691,12 @@ case $os in
-solaris)
os=-solaris2
;;
-unixware* | svr4*)
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
@@ -693,7 +707,8 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
@@ -701,7 +716,7 @@ case $os in
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -linux-gnu* | -uxpv*)
| -mingw32* | -linux-gnu* | -uxpv*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-linux*)
@@ -827,7 +842,7 @@ case $basic_machine in
os=-sysv
;;
*-cbm)
os=-amigados
os=-amigaos
;;
*-dg)
os=-dgux
Vendored
+411 -105
View File
@@ -1,6 +1,10 @@
#! /bin/sh
# From configure.in CVSid
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
@@ -38,7 +42,8 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-omitfp build undebuggable optimized library [default=no]"
ac_help="$ac_help
--enable-add-ons=DIR... configure and build named extra directories"
--enable-add-ons[=DIR1,DIR2]... configure and build add-ons in DIR1,DIR2,...
search for add-ons if no parameter given"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -545,14 +550,6 @@ else
ac_n= ac_c='\c' ac_t=
fi
if test -r /vmunix; then
kernel_id=`strings /vmunix | grep UNIX`
elif test -r /dynix; then
kernel_id=`strings /dynix | grep DYNIX`
else
kernel_id=
fi
@@ -677,10 +674,24 @@ else
fi
if test $omitfp = yes; then
echo "*** Not all versions of GCC compile code correctly when the"
echo "*** -fomit-frame-pointer option is used. You are on your own"
echo "*** if you use it."
fi
# Check whether --enable-add-ons or --disable-add-ons was given.
if test "${enable_add_ons+set}" = set; then
enableval="$enable_add_ons"
add_ons=`echo "$enableval" | sed 's/,/ /g'`
case "$enableval" in
yes) if test "$srcdir" = "."; then
add_ons=`echo */configure | sed -e 's!/configure!!g'`
else
add_ons=`echo $srcdir/*/configure | \
sed -e "s!^$srcdir/!!g" -e 's!/configure!!g'`
fi;;
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`;;
esac
else
add_ons=
fi
@@ -709,7 +720,12 @@ subdirs="$add_ons"
add_ons_pfx=
if test x"$add_ons" != x; then
for f in $add_ons; do
add_ons_pfx="$add_ons_pfx $f/"
# Test whether such a subdir really exists.
if test -d $srcdir/$f; then
add_ons_pfx="$add_ons_pfx $f/"
else
{ echo "configure: error: add-on directory \"$f\" does not exist" 1>&2; exit 1; }
fi
done
fi
@@ -720,7 +736,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:724: checking host system type" >&5
echo "configure:740: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -753,6 +769,30 @@ gnu*)
host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
;;
esac
###
### I put this here to prevent those annoying emails from people who cannot
### read and try to compile glibc on unsupported platforms. --drepper
###
### By using the undocumented --enable-hacker-mode option for configure
### one can skip this test to make the configuration not fail for unsupported
### platforms.
###
if test -z "$enable_hacker_mode"; then
case "$host_os" in
linux* | gnu*)
;;
*)
echo "*** The GNU C library is currently not available for this platform."
echo "*** So far nobody cared to port it and if there is no volunteer it"
echo "*** might never happen. So, if you have interest to see glibc on"
echo "*** this platform visit"
echo "*** http://www.gnu.org/software/libc/porting.html"
echo "*** and join the group of porters"
exit 1
;;
esac
fi
# We keep the original values in `$config_*' and never modify them, so we
# can write them unchanged into config.make. Everything else uses
@@ -766,7 +806,8 @@ gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
gnu_ld=yes gnu_as=yes ;;
esac
case "$host_os" in
linux*ecoff*)
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
;;
gnu* | linux* | sysv4* | solaris2*)
# These systems (almost) always use the ELF format.
@@ -791,8 +832,11 @@ m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;;
mips*) base_machine=mips machine=mips/$machine ;;
mips64*) base_machine=mips64 machine=mips/mips64/$machine ;;
sparc[6789]) base_machine=sparc machine=sparc/$machine ;;
supersparc) base_machine=sparc machine=sparc/sparc8 ;;
sparc | sparcv[67])
base_machine=sparc machine=sparc/sparc32 ;;
sparcv8 | supersparc | hypersparc)
base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
sparc64) base_machine=sparc machine=sparc/sparc64 ;;
esac
@@ -800,7 +844,7 @@ esac
# This can take a while to compute.
sysdep_dir=$srcdir/sysdeps
echo $ac_n "checking sysdep dirs""... $ac_c" 1>&6
echo "configure:804: checking sysdep dirs" >&5
echo "configure:848: checking sysdep dirs" >&5
# Make sco3.2v4 become sco3.2.4 and sunos4.1.1_U1 become sunos4.1.1.U1.
os="`echo $os | sed 's/\([0-9A-Z]\)[v_]\([0-9A-Z]\)/\1.\2/g'`"
@@ -847,7 +891,7 @@ while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
tail="$2"
done
# For sparc/sparc9, try sparc/sparc9 and then sparc.
# For sparc/sparcv9, try sparc/sparcv9 and then sparc.
mach=
tail=$machine
while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
@@ -1001,7 +1045,7 @@ echo "$ac_t""sysdeps/generic sysdeps/stub" 1>&6
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1005: checking for a BSD compatible install" >&5
echo "configure:1049: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1052,10 +1096,10 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
# The makefiles need to use a different form to find it in $srcdir.
INSTALL='$(..)./install-sh -c'
INSTALL='\$(..)./install-sh -c'
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
echo "configure:1059: checking whether ln -s works" >&5
echo "configure:1103: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1080,7 +1124,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1084: checking for $ac_word" >&5
echo "configure:1128: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1110,8 +1154,168 @@ done
test -n "$MSGFMT" || MSGFMT=":"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1161: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="gcc"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1190: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
ac_prog_rejected=no
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
break
fi
done
IFS="$ac_save_ifs"
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# -gt 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
set dummy "$ac_dir/$ac_word" "$@"
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1238: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
#line 1248 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:1252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
ac_cv_prog_cc_cross=no
else
ac_cv_prog_cc_cross=yes
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_prog_cc_works=no
fi
rm -fr conftest*
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
cross_linkable=no
ac_cv_prog_cc_cross=yes
else
cross_linkable=yes
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1275: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1281: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
fi
fi
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
if test $ac_cv_prog_gcc = yes; then
GCC=yes
cat > conftest.c <<EOF
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if test -z "$CFLAGS"; then
CFLAGS="-g -O2"
fi
else
{ echo "configure: error: We require GNU CC version 2.7 or newer" 1>&2; exit 1; }
fi
else
{ echo "configure: error: GNU libc must be compiled using GNU CC" 1>&2; exit 1; }
fi
echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1115: checking build system type" >&5
echo "configure:1319: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1129,47 +1333,12 @@ build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6
if test $host != $build; then
ac_tool_prefix=${host_alias}-
else
ac_tool_prefix=
fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
for ac_prog in gcc cc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1141: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="gcc"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
echo "$ac_t""$CC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
if test $host != $build; then
# Extract the first word of "gcc cc", so it can be a program name with args.
set dummy gcc cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1173: checking for $ac_word" >&5
echo "configure:1342: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1180,7 +1349,7 @@ else
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_BUILD_CC=""
ac_cv_prog_BUILD_CC="$ac_prog"
break
fi
done
@@ -1194,9 +1363,13 @@ else
echo "$ac_t""no" 1>&6
fi
test -n "$BUILD_CC" && break
done
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1200: checking how to run the C preprocessor" >&5
echo "configure:1373: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1211,13 +1384,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 1215 "configure"
#line 1388 "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:1221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1228,13 +1401,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1232 "configure"
#line 1405 "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:1238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1256,10 +1429,16 @@ else
fi
echo "$ac_t""$CPP" 1>&6
if test $host != $build; then
ac_tool_prefix=${host_alias}-
else
ac_tool_prefix=
fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1263: checking for $ac_word" >&5
echo "configure:1442: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1290,7 +1469,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1294: checking for $ac_word" >&5
echo "configure:1473: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1321,7 +1500,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1325: checking for $ac_word" >&5
echo "configure:1504: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1356,7 +1535,7 @@ fi
# Extract the first word of "bash", so it can be a program name with args.
set dummy bash; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1360: checking for $ac_word" >&5
echo "configure:1539: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_BASH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1397,7 +1576,7 @@ if test "$BASH" = no; then
# Extract the first word of "ksh", so it can be a program name with args.
set dummy ksh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1401: checking for $ac_word" >&5
echo "configure:1580: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1439,7 +1618,7 @@ fi
echo $ac_n "checking for signed size_t type""... $ac_c" 1>&6
echo "configure:1443: checking for signed size_t type" >&5
echo "configure:1622: checking for signed size_t type" >&5
if eval "test \"`echo '$''{'libc_cv_signed_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1463,12 +1642,12 @@ EOF
fi
echo $ac_n "checking for libc-friendly stddef.h""... $ac_c" 1>&6
echo "configure:1467: checking for libc-friendly stddef.h" >&5
echo "configure:1646: checking for libc-friendly stddef.h" >&5
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 1472 "configure"
#line 1651 "configure"
#include "confdefs.h"
#define __need_size_t
#define __need_wchar_t
@@ -1483,7 +1662,7 @@ size_t size; wchar_t wchar;
if (&size == NULL || &wchar == NULL) abort ();
; return 0; }
EOF
if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_friendly_stddef=yes
else
@@ -1502,7 +1681,7 @@ override stddef.h = # The installed <stddef.h> seems to be libc-friendly."
fi
echo $ac_n "checking whether we need to use -P to assemble .S files""... $ac_c" 1>&6
echo "configure:1506: checking whether we need to use -P to assemble .S files" >&5
echo "configure:1685: checking whether we need to use -P to assemble .S files" >&5
if eval "test \"`echo '$''{'libc_cv_need_minus_P'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1524,8 +1703,46 @@ if test $libc_cv_need_minus_P = yes; then
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi
# gcc 2.7.x has a bug where if -pipe is set, the assembler will always
# be told to read stdin. This causes the compiler to hang when fed an
# .s file.
if test $ac_cv_prog_gcc = yes; then
case `${CC-cc} -v 2>&1` in
*2.7*)
# We must check this even if -pipe is not given here, because the user
# might do `make CFLAGS=-pipe'.
echo $ac_n "checking for gcc 2.7.x -pipe bug""... $ac_c" 1>&6
echo "configure:1716: checking for gcc 2.7.x -pipe bug" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_pipe_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cp /dev/null conftest.s
cat >conftest1.s <<EOF
.nosuchdirective
EOF
if ${CC-cc} -pipe -c conftest.s <conftest1.s 2>/dev/null; then
libc_cv_gcc_pipe_bug=no
else
libc_cv_gcc_pipe_bug=yes
fi
rm -f conftest*
fi
echo "$ac_t""$libc_cv_gcc_pipe_bug" 1>&6
if test $libc_cv_gcc_pipe_bug = yes; then
makeCC="${CC-cc} -B\$(common-objpfx)"
makeCFLAGS=$CFLAGS
CFLAGS=`echo $CFLAGS |sed 's/-pipe//'`
fi;;
*) libc_cv_gcc_pipe_bug=no;;
esac
else
libc_cv_gcc_pipe_bug=no
fi
echo $ac_n "checking for assembler global-symbol directive""... $ac_c" 1>&6
echo "configure:1529: checking for assembler global-symbol directive" >&5
echo "configure:1746: checking for assembler global-symbol directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_global_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1534,7 +1751,7 @@ for ac_globl in .globl .global; do
cat > conftest.s <<EOF
.text
${ac_globl} foo
foo: .long 0
foo:
EOF
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
libc_cv_asm_global_directive=${ac_globl}
@@ -1555,7 +1772,7 @@ EOF
fi
echo $ac_n "checking for .set assembler directive""... $ac_c" 1>&6
echo "configure:1559: checking for .set assembler directive" >&5
echo "configure:1776: checking for .set assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_set_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1590,7 +1807,7 @@ fi
if test $elf = yes; then
echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6
echo "configure:1594: checking for .previous assembler directive" >&5
echo "configure:1811: checking for .previous assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1598,7 +1815,7 @@ else
.section foo_section
.previous
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_previous_directive=yes
else
libc_cv_asm_previous_directive=no
@@ -1614,7 +1831,7 @@ EOF
else
echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6
echo "configure:1618: checking for .popsection assembler directive" >&5
echo "configure:1835: checking for .popsection assembler directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1622,7 +1839,7 @@ else
.pushsection foo_section
.popsection
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:1843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_asm_popsection_directive=yes
else
libc_cv_asm_popsection_directive=no
@@ -1642,12 +1859,12 @@ fi
if test $elf != yes; then
echo $ac_n "checking for .init and .fini sections""... $ac_c" 1>&6
echo "configure:1646: checking for .init and .fini sections" >&5
echo "configure:1863: checking for .init and .fini sections" >&5
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 1651 "configure"
#line 1868 "configure"
#include "confdefs.h"
int main() {
@@ -1656,7 +1873,7 @@ asm (".section .init");
asm (".text");
; return 0; }
EOF
if { (eval echo configure:1660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libc_cv_have_initfini=yes
else
@@ -1677,23 +1894,26 @@ EOF
fi
fi
if test $elf = yes; then
libc_cv_asm_underscores=no
else
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
echo "configure:1685: checking for _ prefix on C symbol names" >&5
if test $ac_cv_prog_cc_works = yes; then
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
echo "configure:1905: checking for _ prefix on C symbol names" >&5
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 1690 "configure"
#line 1910 "configure"
#include "confdefs.h"
asm ("_glibc_foobar:");
int main() {
glibc_foobar ();
; return 0; }
EOF
if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
libc_cv_asm_underscores=yes
else
@@ -1706,6 +1926,37 @@ rm -f conftest*
fi
echo "$ac_t""$libc_cv_asm_underscores" 1>&6
else
echo $ac_n "checking for _ prefix on C symbol names""... $ac_c" 1>&6
echo "configure:1932: checking for _ prefix on C symbol names" >&5
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 1937 "configure"
#include "confdefs.h"
void underscore_test(void) {
return; }
EOF
if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if grep _underscore_test conftest* >/dev/null; then
rm -f conftest*
libc_cv_asm_underscores=yes
else
rm -f conftest*
libc_cv_asm_underscores=no
fi
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -f conftest*
libc_cv_asm_underscores=no
fi
rm -f conftest*
fi
echo "$ac_t""$libc_cv_asm_underscores" 1>&6
fi
fi
if test $libc_cv_asm_underscores = no; then
cat >> confdefs.h <<\EOF
@@ -1720,14 +1971,14 @@ if test $elf = yes; then
libc_cv_asm_weakext_directive=no
else
echo $ac_n "checking for assembler .weak directive""... $ac_c" 1>&6
echo "configure:1724: checking for assembler .weak directive" >&5
echo "configure:1975: checking for assembler .weak directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_weak_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
foo:
.weak foo
.weak bar; bar = foo
EOF
@@ -1743,14 +1994,14 @@ echo "$ac_t""$libc_cv_asm_weak_directive" 1>&6
if test $libc_cv_asm_weak_directive = no; then
echo $ac_n "checking for assembler .weakext directive""... $ac_c" 1>&6
echo "configure:1747: checking for assembler .weakext directive" >&5
echo "configure:1998: checking for assembler .weakext directive" >&5
if eval "test \"`echo '$''{'libc_cv_asm_weakext_directive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
foo:
.weakext foo
.weakext foo, bar
EOF
@@ -1780,7 +2031,7 @@ EOF
fi
echo $ac_n "checking for ld --no-whole-archive""... $ac_c" 1>&6
echo "configure:1784: checking for ld --no-whole-archive" >&5
echo "configure:2035: checking for ld --no-whole-archive" >&5
if eval "test \"`echo '$''{'libc_cv_ld_no_whole_archive'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1791,7 +2042,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
-o conftest conftest.c'; { (eval echo configure:1795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c 1>&5'; { (eval echo configure:2046: \"$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
@@ -1802,7 +2053,7 @@ fi
echo "$ac_t""$libc_cv_ld_no_whole_archive" 1>&6
echo $ac_n "checking for gcc -fno-exceptions""... $ac_c" 1>&6
echo "configure:1806: checking for gcc -fno-exceptions" >&5
echo "configure:2057: checking for gcc -fno-exceptions" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_no_exceptions'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1813,7 +2064,7 @@ __throw () {}
EOF
if { ac_try='${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions
-o conftest conftest.c'; { (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
-o conftest conftest.c 1>&5'; { (eval echo configure:2068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_gcc_no_exceptions=yes
else
libc_cv_gcc_no_exceptions=no
@@ -1823,6 +2074,38 @@ fi
echo "$ac_t""$libc_cv_gcc_no_exceptions" 1>&6
if test "$base_machine" = alpha ; then
echo $ac_n "checking for function ..ng prefix""... $ac_c" 1>&6
echo "configure:2080: checking for function ..ng prefix" >&5
if eval "test \"`echo '$''{'libc_cv_gcc_alpha_ng_prefix'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.c <<\EOF
foo () { }
EOF
if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null'; { (eval echo configure:2087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; };
then
libc_cv_gcc_alpha_ng_prefix=yes
else
libc_cv_gcc_alpha_ng_prefix=no
fi
rm -f conftest*
fi
echo "$ac_t""$libc_cv_gcc_alpha_ng_prefix" 1>&6
if test $libc_cv_gcc_alpha_ng_prefix = yes ; then
cat >> confdefs.h <<\EOF
#define ASM_ALPHA_NG_SYMBOL_PREFIX "$"
EOF
else
cat >> confdefs.h <<\EOF
#define ASM_ALPHA_NG_SYMBOL_PREFIX ""
EOF
fi
fi
### End of automated tests.
### Now run sysdeps configure fragments.
@@ -1865,7 +2148,7 @@ if test "$uname" = generic; then
fi
echo $ac_n "checking OS release for uname""... $ac_c" 1>&6
echo "configure:1869: checking OS release for uname" >&5
echo "configure:2152: checking OS release for uname" >&5
if eval "test \"`echo '$''{'libc_cv_uname_release'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1887,7 +2170,7 @@ echo "$ac_t""$libc_cv_uname_release" 1>&6
uname_release="$libc_cv_uname_release"
echo $ac_n "checking OS version for uname""... $ac_c" 1>&6
echo "configure:1891: checking OS version for uname" >&5
echo "configure:2174: checking OS version for uname" >&5
if eval "test \"`echo '$''{'libc_cv_uname_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1909,7 +2192,7 @@ else
fi
echo $ac_n "checking stdio selection""... $ac_c" 1>&6
echo "configure:1913: checking stdio selection" >&5
echo "configure:2196: checking stdio selection" >&5
case $stdio in
libio) cat >> confdefs.h <<\EOF
@@ -1970,6 +2253,21 @@ fi
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
if test $libc_cv_gcc_pipe_bug = yes; then
realCC=$CC
CC=$makeCC
CFLAGS=$makeCFLAGS
fi
if test -r /vmunix; then
kernel_id=`strings /vmunix | grep UNIX`
elif test -r /dynix; then
kernel_id=`strings /dynix | grep DYNIX`
else
kernel_id=
fi
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -1993,7 +2291,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
case `(ac_space=' '; set | grep ac_space) 2>&1` in
case `(ac_space=' '; set) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -2113,13 +2411,15 @@ s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LN_S@%$LN_S%g
s%@MSGFMT@%$MSGFMT%g
s%@CC@%$CC%g
s%@cross_linkable@%$cross_linkable%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@BUILD_CC@%$BUILD_CC%g
s%@cross_compiling@%$cross_compiling%g
s%@CPP@%$CPP%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
@@ -2400,10 +2700,16 @@ while test -n "$ac_sources"; do
done
EOF
cat >> $CONFIG_STATUS <<EOF
realCC=$realCC
echo '$config_vars' >> config.make
EOF
cat >> $CONFIG_STATUS <<\EOF
if test "$realCC"; then
sed -e 's/%{pipe:-}/%|/g' `$realCC -print-file-name=specs` >specsT
mv specsT specs
fi
exit 0
EOF
chmod +x $CONFIG_STATUS
+165 -20
View File
@@ -76,16 +76,37 @@ AC_ARG_ENABLE(omitfp, dnl
[ --enable-omitfp build undebuggable optimized library [default=no]],
omitfp=$enableval, omitfp=no)
dnl Some gcc versions have problems with omit-frame-pointer. Warn about this.
if test $omitfp = yes; then
echo "*** Not all versions of GCC compile code correctly when the"
echo "*** -fomit-frame-pointer option is used. You are on your own"
echo "*** if you use it."
fi
dnl Generic infrastructure for drop-in additions to libc.
AC_ARG_ENABLE(add-ons, dnl
[ --enable-add-ons=DIR... configure and build named extra directories],
[add_ons=`echo "$enableval" | sed 's/,/ /g'`],
[add_ons=])
[ --enable-add-ons[=DIR1,DIR2]... configure and build add-ons in DIR1,DIR2,...
search for add-ons if no parameter given],
[case "$enableval" in
yes) if test "$srcdir" = "."; then
add_ons=`echo */configure | sed -e 's!/configure!!g'`
else
add_ons=`echo $srcdir/*/configure | \
sed -e "s!^$srcdir/!!g" -e 's!/configure!!g'`
fi;;
*) add_ons=`echo "$enableval" | sed 's/,/ /g'`;;
esac],
[add_ons=])
AC_CONFIG_SUBDIRS($add_ons)
add_ons_pfx=
if test x"$add_ons" != x; then
for f in $add_ons; do
add_ons_pfx="$add_ons_pfx $f/"
# Test whether such a subdir really exists.
if test -d $srcdir/$f; then
add_ons_pfx="$add_ons_pfx $f/"
else
AC_MSG_ERROR(add-on directory \"$f\" does not exist)
fi
done
fi
@@ -103,6 +124,30 @@ gnu*)
host_os=`echo $host_os | sed -e 's/gnu/gnu-gnu/'`
;;
esac
###
### I put this here to prevent those annoying emails from people who cannot
### read and try to compile glibc on unsupported platforms. --drepper
###
### By using the undocumented --enable-hacker-mode option for configure
### one can skip this test to make the configuration not fail for unsupported
### platforms.
###
if test -z "$enable_hacker_mode"; then
case "$host_os" in
linux* | gnu*)
;;
*)
echo "*** The GNU C library is currently not available for this platform."
echo "*** So far nobody cared to port it and if there is no volunteer it"
echo "*** might never happen. So, if you have interest to see glibc on"
echo "*** this platform visit"
echo "*** http://www.gnu.org/software/libc/porting.html"
echo "*** and join the group of porters"
exit 1
;;
esac
fi
# We keep the original values in `$config_*' and never modify them, so we
# can write them unchanged into config.make. Everything else uses
@@ -116,7 +161,8 @@ gnu* | linux* | bsd4.4* | netbsd* | freebsd*)
gnu_ld=yes gnu_as=yes ;;
esac
case "$host_os" in
linux*ecoff*)
# i586-linuxaout is mangled into i586-pc-linux-gnuaout
linux*ecoff* | linux*aout* | gnu*aout* | gnu*ecoff*)
;;
gnu* | linux* | sysv4* | solaris2*)
# These systems (almost) always use the ELF format.
@@ -143,8 +189,11 @@ m88???) base_machine=m88k machine=m88k/$machine ;;
m88k) base_machine=m88k machine=m88k/m88100 ;;
mips*) base_machine=mips machine=mips/$machine ;;
mips64*) base_machine=mips64 machine=mips/mips64/$machine ;;
sparc[6789]) base_machine=sparc machine=sparc/$machine ;;
supersparc) base_machine=sparc machine=sparc/sparc8 ;;
sparc | sparcv[67])
base_machine=sparc machine=sparc/sparc32 ;;
sparcv8 | supersparc | hypersparc)
base_machine=sparc machine=sparc/sparc32/sparcv8 ;;
sparc64) base_machine=sparc machine=sparc/sparc64 ;;
esac
changequote([,])dnl
AC_SUBST(base_machine)
@@ -201,7 +250,7 @@ while b=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$b"; do
tail="$2"
done
# For sparc/sparc9, try sparc/sparc9 and then sparc.
# For sparc/sparcv9, try sparc/sparcv9 and then sparc.
mach=
tail=$machine
while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do
@@ -351,15 +400,17 @@ AC_MSG_RESULT(sysdeps/generic sysdeps/stub)
AC_PROG_INSTALL
if test "$INSTALL" = "${srcdir}/install-sh -c"; then
# The makefiles need to use a different form to find it in $srcdir.
INSTALL='$(..)./install-sh -c'
INSTALL='\$(..)./install-sh -c'
fi
AC_PROG_LN_S
AC_CHECK_PROGS(MSGFMT, msgfmt gmsgfmt, :)
AC_CHECK_TOOL(CC, gcc)
AC_PROG_CC_LOCAL
AC_CANONICAL_BUILD
if test $host != $build; then
AC_CHECK_PROG(BUILD_CC, gcc cc)
AC_CHECK_PROGS(BUILD_CC, gcc cc)
fi
AC_SUBST(cross_compiling)
AC_PROG_CPP
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
@@ -441,6 +492,37 @@ if test $libc_cv_need_minus_P = yes; then
asm-CPPFLAGS = -P # The assembler can't grok cpp's # line directives."
fi
# gcc 2.7.x has a bug where if -pipe is set, the assembler will always
# be told to read stdin. This causes the compiler to hang when fed an
# .s file.
if test $ac_cv_prog_gcc = yes; then
case `${CC-cc} -v 2>&1` in
*2.7*)
# We must check this even if -pipe is not given here, because the user
# might do `make CFLAGS=-pipe'.
AC_CACHE_CHECK(for gcc 2.7.x -pipe bug, libc_cv_gcc_pipe_bug, [dnl
cp /dev/null conftest.s
cat >conftest1.s <<EOF
.nosuchdirective
EOF
if ${CC-cc} -pipe -c conftest.s <conftest1.s 2>/dev/null; then
libc_cv_gcc_pipe_bug=no
else
libc_cv_gcc_pipe_bug=yes
fi
rm -f conftest*])
if test $libc_cv_gcc_pipe_bug = yes; then
makeCC="${CC-cc} -B\$(common-objpfx)"
makeCFLAGS=$CFLAGS
CFLAGS=`echo $CFLAGS |sed 's/-pipe//'`
fi;;
*) libc_cv_gcc_pipe_bug=no;;
esac
else
libc_cv_gcc_pipe_bug=no
fi
AC_CACHE_CHECK(for assembler global-symbol directive,
libc_cv_asm_global_directive, [dnl
libc_cv_asm_global_directive=UNKNOWN
@@ -448,7 +530,7 @@ for ac_globl in .globl .global; do
cat > conftest.s <<EOF
.text
${ac_globl} foo
foo: .long 0
foo:
EOF
if ${CC-cc} $CFLAGS -c conftest.s 2>/dev/null; then
libc_cv_asm_global_directive=${ac_globl}
@@ -533,13 +615,45 @@ if test $elf != yes; then
fi
fi
dnl AC_CHECK_ASM_UNDERSCORE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_CHECK_ASM_UNDERSCORE,
[cat > conftest.$ac_ext <<EOF
dnl This sometimes fails to find confdefs.h, for some reason.
dnl [#]line __oline__ "[$]0"
[#]line __oline__ "configure"
#include "confdefs.h"
void underscore_test(void) {
return; }
EOF
if AC_TRY_EVAL(ac_compile); then
if grep _underscore_test conftest* >/dev/null; then
ifelse([$1], , :, [rm -f conftest*
$1])
else
ifelse([$2], , , [rm -f conftest*
$2])
fi
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.$ac_ext >&AC_FD_CC
ifelse([$2], , , [rm -f conftest*
$2])
fi
rm -f conftest*])
if test $elf = yes; then
libc_cv_asm_underscores=no
else
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
[AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
libc_cv_asm_underscores=yes,
libc_cv_asm_underscores=no)])
if test $ac_cv_prog_cc_works = yes; then
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
[AC_TRY_LINK([asm ("_glibc_foobar:");], [glibc_foobar ();],
libc_cv_asm_underscores=yes,
libc_cv_asm_underscores=no)])
else
AC_CACHE_CHECK(for _ prefix on C symbol names, libc_cv_asm_underscores,
[AC_CHECK_ASM_UNDERSCORE(libc_cv_asm_underscores=yes,
libc_cv_asm_underscores=no)])
fi
fi
if test $libc_cv_asm_underscores = no; then
AC_DEFINE(NO_UNDERSCORES)
@@ -555,7 +669,7 @@ else
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
foo:
.weak foo
.weak bar; bar = foo
EOF
@@ -573,7 +687,7 @@ if test $libc_cv_asm_weak_directive = no; then
cat > conftest.s <<EOF
.text
${libc_cv_asm_global_directive} foo
foo: .long 0
foo:
.weakext foo
.weakext foo, bar
EOF
@@ -602,7 +716,7 @@ EOF
dnl No \ in command here because it ends up inside ''.
if AC_TRY_COMMAND([${CC-cc} $CFLAGS
-nostdlib -nostartfiles -Wl,--no-whole-archive
-o conftest conftest.c]); then
-o conftest conftest.c 1>&AC_FD_CC]); then
libc_cv_ld_no_whole_archive=yes
else
libc_cv_ld_no_whole_archive=no
@@ -619,7 +733,7 @@ EOF
dnl No \ in command here because it ends up inside ''.
if AC_TRY_COMMAND([${CC-cc} $CFLAGS
-nostdlib -nostartfiles -fno-exceptions
-o conftest conftest.c]); then
-o conftest conftest.c 1>&AC_FD_CC]); then
libc_cv_gcc_no_exceptions=yes
else
libc_cv_gcc_no_exceptions=no
@@ -627,6 +741,26 @@ fi
rm -f conftest*])
AC_SUBST(libc_cv_gcc_no_exceptions)dnl
if test "$base_machine" = alpha ; then
AC_CACHE_CHECK(for function ..ng prefix, libc_cv_gcc_alpha_ng_prefix, [dnl
cat > conftest.c <<\EOF
foo () { }
EOF
dnl
if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo..ng" > /dev/null]);
then
libc_cv_gcc_alpha_ng_prefix=yes
else
libc_cv_gcc_alpha_ng_prefix=no
fi
rm -f conftest* ])
if test $libc_cv_gcc_alpha_ng_prefix = yes ; then
AC_DEFINE(ASM_ALPHA_NG_SYMBOL_PREFIX, "$")
else
AC_DEFINE(ASM_ALPHA_NG_SYMBOL_PREFIX, "")
fi
fi
### End of automated tests.
### Now run sysdeps configure fragments.
@@ -767,5 +901,16 @@ fi
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
AC_SUBST(VERSION)
if test $libc_cv_gcc_pipe_bug = yes; then
realCC=$CC
CC=$makeCC
CFLAGS=$makeCFLAGS
fi
AC_OUTPUT_COMMANDS([
if test "$realCC"; then
sed -e 's/%{pipe:-}/%|/g' `$realCC -print-file-name=specs` >specsT
mv specsT specs
fi], [realCC=$realCC])
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
[echo '$config_vars' >> config.make])
+24 -21
View File
@@ -1,6 +1,6 @@
# Makefile for csu code for GNU C library.
# Copyright (C) 1995, 1996 Free Software Foundation, Inc.
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -36,7 +36,7 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
$(csu-dummies))
install-lib = $(start-installed-name) g$(start-installed-name) \
$(csu-dummies)
distribute = initfini.c gmon-start.c start.c
distribute = initfini.c gmon-start.c start.c defs.awk
all: # Make this the default target; it will be defined in Rules.
@@ -56,7 +56,7 @@ have-initfini = yes
endif
ifeq (yes,$(have-initfini))
ifeq ($(have-initfini),yes)
CPPFLAGS += -DHAVE_INITFINI
@@ -67,27 +67,30 @@ crtstuff = crti crtn
install-lib += $(crtstuff:=.o)
extra-objs += $(crtstuff:=.o)
generated += $(crtstuff:=.s)
generated += $(crtstuff:=.S) initfini.s align.h end.h
omit-deps += $(crtstuff)
# Compile initfini.c to assembly code, which contains embedded shell
# commands that produce crti.s-new and crtn.s-new when run. We need to
# disable emission of .size directives and debugging information, since
# they will get confused by the splitting of the output we do.
$(objpfx)cr%i.s $(objpfx)cr%n.s: initfini.c; $(initfini)
# Special rules for the building of crti.o and crtn.o
$(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h
$(CC) -c -fPIC -g0 -I$(..) -I$(common-objpfx) -DASSEMBLER $< -o $@
define initfini
-rm -f $(objpfx)crtcommon.tmp
(echo 'cat > crtcommon.tmp <<\EOF_common'; \
$(CC) $< $(CPPFLAGS) $(CFLAGS) \
-fPIC -finhibit-size-directive $(no-exceptions) -g0 -S -o -; \
echo 'EOF_common') | (cd $(@D); $(SHELL))
cat $(objpfx)crtcommon.tmp >> $(objpfx)crti.s-new
cat $(objpfx)crtcommon.tmp >> $(objpfx)crtn.s-new
rm -f $(objpfx)crtcommon.tmp
mv -f $(objpfx)crti.s-new $(subst crtn,crti,$@)
mv -f $(objpfx)crtn.s-new $(subst crti,crtn,$@)
endef
$(objpfx)initfini.s: initfini.c
$(CC) $(CPPFLAGS) $(CFLAGS) -g0 -S -fPIC -finhibit-size-directive \
-fno-inline-functions $(no-exceptions) $< -o $@
$(objpfx)crti.S: $(objpfx)initfini.s
sed -n -e '1,/@HEADER_ENDS/p' \
-e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \
-e '/@TRAILER_BEGINS/,$$p' $< > $@
$(objpfx)crtn.S: $(objpfx)initfini.s
sed -n -e '1,/@HEADER_ENDS/p' \
-e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \
-e '/@TRAILER_BEGINS/,$$p' $< > $@
$(objpfx)defs.h: $(objpfx)initfini.s
sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \
awk -f defs.awk > $@
endif
+22
View File
@@ -0,0 +1,22 @@
/.end/ { need_end = 1 }
/.align/ { if($2 > max) max = $2; }
END {
if(need_end)
{
print "#define END_INIT .end _init";
print "#define END_FINI .end _fini";
}
else
{
print "#define END_INIT";
print "#define END_FINI";
}
if(max)
print "#define ALIGN .align", max;
else
print "#define ALIGN";
print "#include <libc-symbols.h>";
print "weak_extern (__gmon_start__)";
}
+47 -79
View File
@@ -1,5 +1,5 @@
/* Special .init and .fini section support.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it
@@ -26,68 +26,40 @@
write to the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This file is compiled into assembly code which is then surrounded by the
lines `cat > crtcommon.tmp <<\EOF_common' and `EOF_common' and thus
becomes a shell script which creates three files of assembly code.
/* This file is compiled into assembly code which is then munged by a sed
script into two files: crti.s and crtn.s.
* The first file is crti.s-new; this puts a function prologue at the
beginning of the .init and .fini sections and defines global symbols for
* crti.s puts a function prologue at the beginning of the
.init and .fini sections and defines global symbols for
those addresses, so they can be called as functions.
* The second file is crtn.s-new; this puts the corresponding function
epilogues in the .init and .fini sections.
* The third file is crtcommon.tmp, which is whatever miscellaneous cruft
the compiler generated at the end; it should be appended to both crti.s-new
and crtn.s-new. */
* crtn.s puts the corresponding function epilogues
in the .init and .fini sections. */
#include <stdlib.h>
/* We use embedded asm for .section unconditionally, as this makes it
easier to insert the necessary directives into crtn.S. */
#define SECTION(x) asm (".section \"" x "\"");
#ifdef HAVE_ELF
/* These declarations make the functions go in the right sections when
we define them below. GCC syntax does not allow the attribute
specifications to be in the function definitions themselves. */
void _init (void) __attribute__ ((section (".init")));
void _fini (void) __attribute__ ((section (".fini")));
/* Embed an #include to pull in the alignment and .end directives. */
asm ("\n#include \"defs.h\"");
#define SECTION(x) /* Put nothing extra before the defn. */
/* The initial common code ends here. */
asm ("\n/*@HEADER_ENDS*/");
#else
/* Some non-ELF systems support .init and .fini sections,
but the __attribute__ syntax only works for ELF. */
#define SECTION(x) asm (".section " x);
#endif
/* End the here document containing the initial common code.
Then move the output file crtcommon.tmp to crti.s-new and crtn.s-new. */
asm ("\nEOF_common\n\
rm -f crti.s-new crtn.s-new\n\
mv crtcommon.tmp crti.s-new\n\
cp crti.s-new crtn.s-new");
/* Extract a `.end' if one is produced by the compiler. */
asm ("fgrep .end >/dev/null 2>&1 <<\\EOF.end && need_end=yes");
/* To determine whether we need .end and .align: */
asm ("\n/*@TESTS_BEGIN*/");
void
useless_function (void)
{
return;
}
asm ("\nEOF.end\n");
/* Find out how much alignment is produced by the compiler. */
asm ("align=`awk '$1==\".align\" { if ($2>max) max=$2; } END { print max; }' \
<<\\EOF.align");
void
useless_function2 (void (*foo) (void))
dummy (void (*foo) (void))
{
if (foo)
(*foo) ();
}
asm ("\nEOF.align\n`\n");
asm ("\n/*@TESTS_END*/");
/* Append the .init prologue to crti.s-new. */
asm ("cat >> crti.s-new <<\\EOF.crti.init");
/* The beginning of _init: */
asm ("\n/*@_init_PROLOG_BEGINS*/");
SECTION (".init")
void
@@ -99,38 +71,33 @@ _init (void)
gcrt1.o to reference a symbol which would be defined by some library
module which has a constructor; but then user code's constructors
would come first, and not be profiled. */
extern void __gmon_start__ (void); weak_extern (__gmon_start__)
extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/
if (__gmon_start__)
__gmon_start__ ();
/* End the here document containing the .init prologue code.
Then fetch the .section directive just written and append that
to crtn.s-new, followed by the function epilogue. */
asm ("\n\
EOF.crti.init\n\
test -n \"$align\" && echo .align $align >> crti.s-new\n\
test -n \"$need_end\" && echo .end _init >> crti.s-new\n\
fgrep .init crti.s-new >>crtn.s-new\n\
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.init");
asm ("ALIGN");
asm("END_INIT");
/* Now the epilog. */
asm ("\n/*@_init_PROLOG_ENDS*/");
asm ("\n/*@_init_EPILOG_BEGINS*/");
SECTION(".init");
}
asm ("END_INIT");
/* End the here document containing the .init epilogue code.
Then append the .fini prologue to crti.s-new. */
asm ("\nEOF.crtn.init\
\n\
cat >> crti.s-new <<\\EOF.crti.fini");
/* End of the _init epilog, beginning of the _fini prolog. */
asm ("\n/*@_init_EPILOG_ENDS*/");
asm ("\n/*@_fini_PROLOG_BEGINS*/");
SECTION (".fini")
void
_fini (void)
{
/* End the here document containing the .fini prologue code.
Then fetch the .section directive just written and append that
to crtn.s-new, followed by the function epilogue. */
asm ("\nEOF.crti.fini\n\
test -n \"$align\" && echo .align $align >> crti.s-new\n\
test -n \"$need_end\" && echo .end _fini >> crti.s-new\n\
cat > /dev/null <<\\EOF.fini.skip");
/* End of the _fini prolog. */
asm ("ALIGN");
asm ("END_FINI");
asm ("\n/*@_fini_PROLOG_ENDS*/");
{
/* Let GCC know that _fini is not a leaf function by having a dummy
@@ -140,14 +107,15 @@ cat > /dev/null <<\\EOF.fini.skip");
i_am_not_a_leaf ();
}
asm ("\nEOF.fini.skip\
\n\
fgrep .fini crti.s-new >>crtn.s-new\n\
fgrep -v .end >> crtn.s-new <<\\EOF.crtn.fini");
/* Beginning of the _fini epilog. */
asm ("\n/*@_fini_EPILOG_BEGINS*/");
SECTION (".fini");
}
asm ("END_FINI");
/* End the here document containing the .fini epilogue code.
Finally, put the remainder of the generated assembly into crtcommon.tmp. */
asm ("\nEOF.crtn.fini\
\n\
cat > crtcommon.tmp <<\\EOF_common");
/* End of the _fini epilog. Any further generated assembly (e.g. .ident)
is shared between both crt files. */
asm ("\n/*@_fini_EPILOG_ENDS*/");
asm ("\n/*@TRAILER_BEGINS*/");
/* End of file. */
+5
View File
@@ -45,3 +45,8 @@ $(objpfx)makedb: $(objpfx)libdb.so$(libdb.so-version)
else
$(objpfx)makedb: $(objpfx)libdb.a
endif
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
$(objpfx)libdb.so: $(common-objpfx)libc.so
+2
View File
@@ -65,6 +65,7 @@ __bt_free(t, h)
h->prevpg = P_INVALID;
h->nextpg = t->bt_free;
t->bt_free = h->pgno;
F_SET(t, B_METADIRTY);
/* Make sure the page gets written back. */
return (mpool_put(t->bt_mp, h, MPOOL_DIRTY));
@@ -92,6 +93,7 @@ __bt_new(t, npg)
(h = mpool_get(t->bt_mp, t->bt_free, 0)) != NULL) {
*npg = t->bt_free;
t->bt_free = h->nextpg;
F_SET(t, B_METADIRTY);
return (h);
}
return (mpool_new(t->bt_mp, npg));
+1 -1
View File
@@ -249,7 +249,7 @@ __big_delete(hashp, bufp)
bufp->flags |= BUF_MOD;
if (rbufp)
__free_ovflpage(hashp, rbufp);
if (last_bfp != rbufp)
if (last_bfp && last_bfp != rbufp)
__free_ovflpage(hashp, last_bfp);
hashp->NKEYS--;
+17 -19
View File
@@ -1,29 +1,27 @@
/* Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1992, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <dirent.h>
#include <string.h>
int
DEFUN(alphasort, (a, b),
CONST PTR a AND CONST PTR b)
alphasort (const void *a, const void *b)
{
return strcmp (((struct dirent *) a)->d_name,
((struct dirent *) b)->d_name);
return strcmp ((*(const struct dirent **) a)->d_name,
(*(const struct dirent **) b)->d_name);
}
+4 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1992, 93, 94, 95, 96, 97 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
@@ -46,6 +46,9 @@ scandir (dir, namelist, select, cmp)
{
size_t dsize;
/* Ignore errors from select or readdir */
__set_errno (0);
if (i == vsize)
{
struct dirent **new;
+14 -2
View File
@@ -1,5 +1,5 @@
/* Look up a symbol in the loaded objects.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997 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
@@ -162,7 +162,7 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
{
/* We could find no value for a strong reference. */
const char msg[] = "undefined symbol: ";
static const char msg[] = "undefined symbol: ";
const size_t len = strlen (undef_name);
char buf[sizeof msg + len];
memcpy (buf, msg, sizeof msg - 1);
@@ -206,6 +206,18 @@ _dl_lookup_symbol_skip (const char *undef_name, const ElfW(Sym) **ref,
reference_name, skip_map, flags))
break;
if (current_value.s == NULL &&
(*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK))
{
/* We could find no value for a strong reference. */
static const char msg[] = "undefined symbol: ";
const size_t len = strlen (undef_name);
char buf[sizeof msg + len];
memcpy (buf, msg, sizeof msg - 1);
memcpy (&buf[sizeof msg - 1], undef_name, len + 1);
_dl_signal_error (0, reference_name, buf);
}
*ref = current_value.s;
return current_value.a;
}
+6 -7
View File
@@ -1,5 +1,5 @@
/* Relocate a shared object and resolve its references to other loaded objects.
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997 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
@@ -58,17 +58,16 @@ _dl_relocate_object (struct link_map *l, struct link_map *scope[], int lazy)
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
#define RESOLVE(ref, flags) \
(_dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
l->l_name, flags))
(((*ref)->st_shndx != SHN_UNDEF && \
ELFW(ST_BIND) ((*ref)->st_info) == STB_LOCAL) \
? l->l_addr \
: _dl_lookup_symbol (strtab + (*ref)->st_name, ref, scope, \
l->l_name, flags))
#include "dynamic-link.h"
ELF_DYNAMIC_RELOCATE (l, lazy);
}
/* Set up the PLT so its unrelocated entries will jump to
_dl_runtime_resolve (dl-runtime.c), which will relocate them. */
elf_machine_runtime_setup (l, lazy);
/* Mark the object so we know ths work has been done. */
l->l_relocated = 1;
+6 -3
View File
@@ -97,8 +97,11 @@ elf_get_dynamic_info (ElfW(Dyn) *dyn,
/* This can't just be an inline function because GCC is too dumb
to inline functions containing inlines themselves. */
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
do { ELF_DYNAMIC_DO_REL ((map), (lazy)); \
ELF_DYNAMIC_DO_RELA ((map), (lazy)); } while (0)
#define ELF_DYNAMIC_RELOCATE(map, lazy) \
do { \
int edr_lazy = elf_machine_runtime_setup((map), (lazy)); \
ELF_DYNAMIC_DO_REL ((map), edr_lazy); \
ELF_DYNAMIC_DO_RELA ((map), edr_lazy); \
} while (0)
#endif
+5
View File
@@ -18,13 +18,17 @@
Boston, MA 02111-1307, USA. */
#ifndef _LINK_H
#define _LINK_H 1
#include <features.h>
#define __need_size_t
#include <stddef.h>
#include <elf.h>
__BEGIN_DECLS
/* We use this macro to refer to ELF types independent of the native wordsize.
`ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */
#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type)
@@ -340,5 +344,6 @@ extern void _dl_debug_state (void);
in the `r_ldbase' member. Returns the address of the structure. */
extern struct r_debug *_dl_debug_initialize (ElfW(Addr) ldbase);
__END_DECLS
#endif /* link.h */
+13 -5
View File
@@ -358,8 +358,10 @@ of this helper program; chances are you did not intend to run this program.\n",
while ((p = strsep (&list, " ")) != NULL)
if (! __libc_enable_secure || strchr (p, '/') == NULL)
{
(void) _dl_map_object (NULL, p, lt_library, 0);
++npreloads;
struct link_map *new_map = _dl_map_object (NULL, p, lt_library, 0);
if (new_map->l_opencount == 1)
/* It is no duplicate. */
++npreloads;
}
}
@@ -413,15 +415,21 @@ of this helper program; chances are you did not intend to run this program.\n",
runp = file;
while ((p = strsep (&runp, ": \t\n")) != NULL)
{
(void) _dl_map_object (NULL, p, lt_library, 0);
++npreloads;
struct link_map *new_map = _dl_map_object (NULL, p,
lt_library, 0);
if (new_map->l_opencount == 1)
/* It is no duplicate. */
++npreloads;
}
}
if (problem != NULL)
{
char *p = strndupa (problem, file_size - (problem - file));
(void) _dl_map_object (NULL, p, lt_library, 0);
struct link_map *new_map = _dl_map_object (NULL, p, lt_library, 0);
if (new_map->l_opencount == 1)
/* It is no duplicate. */
++npreloads;
}
/* We don't need the file anymore. */
+16 -2
View File
@@ -6,8 +6,15 @@
# these variables are filled in by configure
#
VERSION="@VERSION@"
BUGGLIBC="bugs@gnu.ai.mit.edu"
BUGGLIBC="bugs@gnu.org"
ADDONS="@subdirs@"
HOST="@host@"
CC='@CC@'
CFLAGS="@CFLAGS@"
BUILD_SHARED="@shared@"
BUILD_PROFILE="@profile@"
BUILD_OMITFP="@omitfp@"
STDIO="@stdio@"
PATH=/bin:/usr/bin:/usr/local/bin:$PATH
export PATH
@@ -119,10 +126,17 @@ ${ORGANIZATION- $ORGANIZATION_C}
>Release: libc-${VERSION}
>Environment:
$ENVIRONMENT_C
`[ -n "$HOST" ] && echo Host type: $HOST`
`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
`[ -n "$ARCH" ] && echo Architecture: $ARCH`
`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
`[ -n "$ADDONS" ] && echo Addons: $ADDONS`
`[ -n "$CFLAGS" ] && echo Build CFLAGS: $CFLAGS`
`[ -n "$CC" ] && echo Build CC: $CC`
`[ -n "$BUILD_SHARED" ] && echo Build shared: $BUILD_SHARED`
`[ -n "$BUILD_PROFILE" ] && echo Build profile: $BUILD_PROFILE`
`[ -n "$BUILD_OMITFP" ] && echo Build omitfp: $BUILD_OMITFP`
`[ -n "$STDIO" ] && echo Stdio: $STDIO`
>Description:
$DESCRIPTION_C
@@ -232,7 +246,7 @@ sed -e "
/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
" $TEMP > $TEMP.x
if $MAIL_AGENT $BUGGLIBC < $TEMP.x; then
if $MAIL_AGENT < $TEMP.x; then
echo "$COMMAND: problem report sent"
xs=0; exit
else
+108 -39
View File
@@ -34,6 +34,7 @@
#include <sys/time.h>
#include <sys/gmon.h>
#include <sys/gmon_out.h>
#include <sys/uio.h>
#include <stdio.h>
#include <fcntl.h>
@@ -62,6 +63,7 @@ void moncontrol __P ((int mode));
static void write_hist __P ((int fd));
static void write_call_graph __P ((int fd));
static void write_bb_counts __P ((int fd));
static void write_gmon __P ((void));
/*
* Control profiling
@@ -165,21 +167,26 @@ static void
write_hist (fd)
int fd;
{
const u_char tag = GMON_TAG_TIME_HIST;
struct gmon_hist_hdr thdr;
u_char tag = GMON_TAG_TIME_HIST;
struct gmon_hist_hdr thdr __attribute__ ((aligned (__alignof__ (char *))));
if (_gmonparam.kcountsize > 0)
{
thdr.low_pc = _gmonparam.lowpc;
thdr.high_pc = _gmonparam.highpc;
thdr.hist_size = _gmonparam.kcountsize / sizeof(HISTCOUNTER);
thdr.prof_rate = __profile_frequency();
strncpy(thdr.dimen, "seconds", sizeof(thdr.dimen));
struct iovec iov[3] =
{
{ &tag, sizeof (tag) },
{ &thdr, sizeof (struct gmon_hist_hdr) },
{ _gmonparam.kcount, _gmonparam.kcountsize }
};
*(char **) thdr.low_pc = (char *) _gmonparam.lowpc;
*(char **) thdr.high_pc = (char *) _gmonparam.highpc;
*(int *) thdr.hist_size = _gmonparam.kcountsize / sizeof (HISTCOUNTER);
*(int *) thdr.prof_rate = __profile_frequency ();
strncpy (thdr.dimen, "seconds", sizeof (thdr.dimen));
thdr.dimen_abbrev = 's';
write(fd, &tag, sizeof(tag));
write(fd, &thdr, sizeof(thdr));
write(fd, _gmonparam.kcount, _gmonparam.kcountsize);
__writev (fd, iov, 3);
}
}
@@ -188,12 +195,26 @@ static void
write_call_graph (fd)
int fd;
{
const u_char tag = GMON_TAG_CG_ARC;
struct gmon_cg_arc_record raw_arc;
u_char tag = GMON_TAG_CG_ARC;
struct gmon_cg_arc_record raw_arc[4]
__attribute__ ((aligned (__alignof__ (char*))));
int from_index, to_index, from_len;
u_long frompc;
from_len = _gmonparam.fromssize / sizeof(*_gmonparam.froms);
struct iovec iov[8] =
{
{ &tag, sizeof (tag) },
{ &raw_arc[0], sizeof (struct gmon_cg_arc_record) },
{ &tag, sizeof (tag) },
{ &raw_arc[1], sizeof (struct gmon_cg_arc_record) },
{ &tag, sizeof (tag) },
{ &raw_arc[2], sizeof (struct gmon_cg_arc_record) },
{ &tag, sizeof (tag) },
{ &raw_arc[3], sizeof (struct gmon_cg_arc_record) },
};
int nfilled = 0;
from_len = _gmonparam.fromssize / sizeof (*_gmonparam.froms);
for (from_index = 0; from_index < from_len; ++from_index)
{
if (_gmonparam.froms[from_index] == 0)
@@ -201,19 +222,24 @@ write_call_graph (fd)
frompc = _gmonparam.lowpc;
frompc += (from_index * _gmonparam.hashfraction
* sizeof(*_gmonparam.froms));
* sizeof (*_gmonparam.froms));
for (to_index = _gmonparam.froms[from_index];
to_index != 0;
to_index = _gmonparam.tos[to_index].link)
{
raw_arc.from_pc = frompc;
raw_arc.self_pc = _gmonparam.tos[to_index].selfpc;
raw_arc.count = _gmonparam.tos[to_index].count;
write(fd, &tag, sizeof(tag));
write(fd, &raw_arc, sizeof(raw_arc));
if (nfilled > 3)
{
__writev (fd, iov, 2 * nfilled);
nfilled = 0;
}
*(char **) raw_arc[nfilled].from_pc = (char *)frompc;
*(char **) raw_arc[nfilled].self_pc =
(char *)_gmonparam.tos[to_index].selfpc;
*(int *) raw_arc[nfilled].count = _gmonparam.tos[to_index].count;
++nfilled;
}
}
__writev (fd, iov, 2 * nfilled);
}
@@ -222,55 +248,98 @@ write_bb_counts (fd)
int fd;
{
struct __bb *grp;
const u_char tag = GMON_TAG_BB_COUNT;
u_char tag = GMON_TAG_BB_COUNT;
int ncounts;
int i;
struct iovec bbhead[2] =
{
{ &tag, sizeof (tag) },
{ &ncounts, sizeof (ncounts) }
};
struct iovec bbbody[8];
int nfilled;
for (i = 0; i < (sizeof (bbbody) / sizeof (bbbody[0])); i += 2)
{
bbbody[i].iov_len = sizeof (grp->addresses[0]);
bbbody[i + 1].iov_len = sizeof (grp->counts[0]);
}
/* Write each group of basic-block info (all basic-blocks in a
compilation unit form a single group). */
nfilled = 0;
for (grp = __bb_head; grp; grp = grp->next)
{
ncounts = grp->ncounts;
write(fd, &tag, sizeof(tag));
write(fd, &ncounts, sizeof(ncounts));
__writev (fd, bbhead, 2);
for (i = 0; i < ncounts; ++i)
{
write(fd, &grp->addresses[i], sizeof(grp->addresses[0]));
write(fd, &grp->counts[i], sizeof(grp->counts[0]));
if (nfilled > (sizeof (bbbody) / sizeof (bbbody[0])) - 2)
{
__writev (fd, bbbody, nfilled);
nfilled = 0;
}
bbbody[nfilled++].iov_base = (char *) &grp->addresses[i];
bbbody[nfilled++].iov_base = &grp->counts[i];
}
if (nfilled > 0)
__writev (fd, bbbody, nfilled);
}
}
void
_mcleanup ()
static void
write_gmon ()
{
struct gmon_hdr ghdr;
struct gmon_hdr ghdr __attribute__ ((aligned (__alignof__ (int))));
int fd;
moncontrol(0);
fd = open("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
fd = __open ("gmon.out", O_CREAT|O_TRUNC|O_WRONLY, 0666);
if (fd < 0)
{
perror("_mcleanup: gmon.out");
perror ("_mcleanup: gmon.out");
return;
}
/* write gmon.out header: */
memset(&ghdr, 0, sizeof(ghdr));
memcpy(&ghdr.cookie[0], GMON_MAGIC, sizeof(ghdr.cookie));
ghdr.version = GMON_VERSION;
write(fd, &ghdr, sizeof(ghdr));
memset (&ghdr, 0, sizeof (struct gmon_hdr));
memcpy (&ghdr.cookie[0], GMON_MAGIC, sizeof (ghdr.cookie));
*(int *) ghdr.version = GMON_VERSION;
__write (fd, &ghdr, sizeof (struct gmon_hdr));
/* write PC histogram: */
write_hist(fd);
write_hist (fd);
/* write call-graph: */
write_call_graph(fd);
write_call_graph (fd);
/* write basic-block execution counts: */
write_bb_counts(fd);
write_bb_counts (fd);
close(fd);
__close (fd);
}
void
__write_profiling ()
{
int save = _gmonparam.state;
_gmonparam.state = GMON_PROF_OFF;
if (save == GMON_PROF_ON)
write_gmon ();
_gmonparam.state = save;
}
weak_alias (__write_profiling, write_profiling)
void
_mcleanup ()
{
moncontrol (0);
write_gmon ();
/* free the memory. */
free (_gmonparam.tos);
}
+4
View File
@@ -174,6 +174,10 @@ void monstartup __P ((u_long lowpc, u_long highpc));
/* Clean up profiling and write out gmon.out. */
void _mcleanup __P ((void));
/* Write current profiling data to file. */
void __write_profiling __P ((void));
void write_profiling __P ((void));
__END_DECLS
#endif /* !_SYS_GMON_H_ */
+27 -21
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger <davidm@cs.arizona.edu>.
@@ -40,30 +40,36 @@ __BEGIN_DECLS
* always comes first in gmon.out and is then followed by a series
* records defined below.
*/
struct gmon_hdr {
char cookie[4];
int version;
int spare[3];
};
struct gmon_hdr
{
char cookie[4];
char version[4];
char spare[3 * 4];
};
/* types of records in this file: */
typedef enum {
GMON_TAG_TIME_HIST = 0, GMON_TAG_CG_ARC = 1, GMON_TAG_BB_COUNT = 2
} GMON_Record_Tag;
typedef enum
{
GMON_TAG_TIME_HIST = 0,
GMON_TAG_CG_ARC = 1,
GMON_TAG_BB_COUNT = 2
} GMON_Record_Tag;
struct gmon_hist_hdr {
unsigned long low_pc; /* base pc address of sample buffer */
unsigned long high_pc; /* max pc address of sampled buffer */
int hist_size; /* size of sample buffer */
int prof_rate; /* profiling clock rate */
char dimen[15]; /* phys. dim., usually "seconds" */
char dimen_abbrev; /* usually 's' for "seconds" */
};
struct gmon_hist_hdr
{
char low_pc[sizeof (char *)]; /* base pc address of sample buffer */
char high_pc[sizeof (char *)]; /* max pc address of sampled buffer */
char hist_size[4]; /* size of sample buffer */
char prof_rate[4]; /* profiling clock rate */
char dimen[15]; /* phys. dim., usually "seconds" */
char dimen_abbrev; /* usually 's' for "seconds" */
};
struct gmon_cg_arc_record {
unsigned long from_pc; /* address within caller's body */
unsigned long self_pc; /* address within callee's body */
int count; /* number of arc traversals */
struct gmon_cg_arc_record
{
char from_pc[sizeof (char *)]; /* address within caller's body */
char self_pc[sizeof (char *)]; /* address within callee's body */
char count[4]; /* number of arc traversals */
};
__END_DECLS
+58 -18
View File
@@ -1,35 +1,75 @@
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1991, 1996, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <grp.h>
#include <stdio.h>
#include <libc-lock.h>
#include <stdlib.h>
/* We need to protect the dynamic buffer handling. */
__libc_lock_define_initialized (static, lock);
/* Read one entry from the given stream. */
struct group *
fgetgrent (FILE *stream)
{
static char buffer[BUFSIZ];
static char *buffer;
static size_t buffer_size;
static struct group resbuf;
struct group *result;
int save;
if (__fgetgrent_r (stream, &resbuf, buffer, sizeof buffer, &result) != 0)
return NULL;
/* Get lock. */
__libc_lock_lock (lock);
/* Allocate buffer if not yet available. */
if (buffer == NULL)
{
buffer_size = NSS_BUFLEN_GROUP;
buffer = malloc (buffer_size);
}
while (buffer != NULL
&& __fgetgrent_r (stream, &resbuf, buffer, buffer_size, &result) != 0
&& errno == ERANGE)
{
char *new_buf;
buffer_size += NSS_BUFLEN_GROUP;
new_buf = realloc (buffer, buffer_size);
if (new_buf == NULL)
{
/* We are out of memory. Free the current buffer so that the
process gets a chance for a normal termination. */
save = errno;
free (buffer);
__set_errno (save);
}
buffer = new_buf;
}
if (buffer == NULL)
result = NULL;
/* Release lock. Preserve error value. */
save = errno;
__libc_lock_unlock (lock);
__set_errno (save);
return result;
}
+12 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1996, 1997 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
@@ -56,6 +56,7 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen,
struct group **result)
{
char *p;
int parse_result;
do
{
@@ -69,10 +70,18 @@ __fgetgrent_r (FILE *stream, struct group *resbuf, char *buffer, size_t buflen,
/* Skip leading blanks. */
while (isspace (*p))
++p;
} while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
} while (*p == '\0' || *p == '#' /* Ignore empty and comment lines. */
/* Parse the line. If it is invalid, loop to
get the next line of the file to parse. */
! parse_line (p, resbuf, (void *) buffer, buflen));
|| ! (parse_result = parse_line (p, resbuf,
(void *) buffer, buflen)));
if (parse_result == -1)
{
/* The parser ran out of space. */
*result = NULL;
return errno;
}
*result = resbuf;
return 0;
-3
View File
@@ -32,9 +32,6 @@ __BEGIN_DECLS
#define __need_size_t
#include <stddef.h>
#define __need_size_t
#include <stddef.h>
/* The group structure. */
struct group
+41 -27
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1989, 1991, 1993, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1989, 1991, 1993, 1996, 1997 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
@@ -17,10 +17,11 @@
Boston, MA 02111-1307, USA. */
#include <alloca.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <grp.h>
#include <limits.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
@@ -32,7 +33,7 @@ initgroups (user, group)
const char *user;
gid_t group;
{
#if defined (NGROUPS_MAX) && NGROUPS_MAX == 0
#if defined NGROUPS_MAX && NGROUPS_MAX == 0
/* No extra groups allowed. */
return 0;
@@ -42,9 +43,10 @@ initgroups (user, group)
struct group grpbuf, *g;
size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
char *tmpbuf;
register size_t n;
size_t n;
size_t ngroups;
gid_t *groups;
int status;
#ifdef NGROUPS_MAX
# define limit NGROUPS_MAX
@@ -67,32 +69,44 @@ initgroups (user, group)
n = 0;
groups[n++] = group;
while (__getgrent_r (&grpbuf, tmpbuf, buflen, &g) >= 0)
if (g->gr_gid != group)
{
register char **m;
do
{
while ((status = __getgrent_r (&grpbuf, tmpbuf, buflen, &g)) != 0
&& errno == ERANGE)
{
buflen *= 2;
tmpbuf = __alloca (buflen);
}
for (m = g->gr_mem; *m != NULL; ++m)
if (strcmp (*m, user) == 0)
{
/* Matches user. Insert this group. */
if (n == ngroups && limit <= 0)
{
/* Need a bigger buffer. */
groups = memcpy (__alloca (ngroups * 2 * sizeof *groups),
groups, ngroups * sizeof *groups);
ngroups *= 2;
}
if (status == 0 && g->gr_gid != group)
{
char **m;
groups[n++] = g->gr_gid;
for (m = g->gr_mem; *m != NULL; ++m)
if (strcmp (*m, user) == 0)
{
/* Matches user. Insert this group. */
if (n == ngroups && limit <= 0)
{
/* Need a bigger buffer. */
gid_t *newgrp;
newgrp = __alloca (ngroups * 2 * sizeof *groups);
groups = memcpy (newgrp, groups, ngroups * sizeof *groups);
ngroups *= 2;
}
if (n == limit)
/* Can't take any more groups; stop searching. */
goto done;
groups[n++] = g->gr_gid;
if (n == limit)
/* Can't take any more groups; stop searching. */
goto done;
break;
}
}
}
while (status == 0);
break;
}
}
done:
endgrent ();
+1 -1
View File
@@ -73,7 +73,7 @@ include ../Rules
# from $(subdirs), and this rule arranges for the headers in question
# to get installed.
sunrpc-headers = netdb.h pmap_prot.h xdr.h types.h auth.h \
rpc_msg.h auth_unix.h
rpc_msg.h auth_unix.h clnt.h
installed-sunrpc-headers = $(addprefix $(inst_includedir)/rpc/, \
$(sunrpc-headers))
install-headers-nosubdir: $(installed-sunrpc-headers)
+22 -17
View File
@@ -1,22 +1,21 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <unistd.h>
#include <hurd.h>
#include <hurd/fd.h>
@@ -24,7 +23,7 @@ Cambridge, MA 02139, USA. */
/* Change the current root directory to FD. */
int
DEFUN(fchroot, (fd), int fd)
fchroot (int fd)
{
error_t err;
file_t dir;
@@ -36,7 +35,13 @@ DEFUN(fchroot, (fd), int fd)
}));
if (! err)
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], dir);
{
file_t root;
err = __file_reparent (dir, MACH_PORT_NULL, &root);
__mach_port_deallocate (__mach_task_self (), dir);
if (! err)
_hurd_port_set (&_hurd_ports[INIT_PORT_CRDIR], root);
}
return err ? __hurd_fail (err) : 0;
}
+17 -16
View File
@@ -1,26 +1,27 @@
/* Copyright (C) 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1991, 1992, 1994, 1995, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <hurd.h>
/* This is initialized in dtable.c when that gets linked in.
If dtable.c is not linked in, it will be zero. */
file_t (*_hurd_getdport_fn) (int fd);
static file_t (*_default_hurd_getdport_fn) (int fd) = 0;
weak_alias (_default_hurd_getdport_fn, _hurd_getdport_fn)
file_t
__getdport (int fd)
@@ -43,7 +44,7 @@ __getdport (int fd)
errno = EBADF;
return MACH_PORT_NULL;
}
else
else
{
__mach_port_mod_refs (__mach_task_self (), _hurd_init_dtable[fd],
MACH_PORT_RIGHT_SEND, 1);
+23 -17
View File
@@ -1,20 +1,20 @@
/* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1993, 1994, 1995, 1996, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _HURD_H
@@ -109,11 +109,10 @@ extern pid_t _hurd_pid, _hurd_ppid, _hurd_pgrp;
extern int _hurd_orphaned;
/* This variable is incremented every time the process IDs change. */
unsigned int _hurd_pids_changed_stamp;
extern unsigned int _hurd_pids_changed_stamp;
/* This condition is broadcast every time the process IDs change. */
struct condition _hurd_pids_changed_sync;
extern struct condition _hurd_pids_changed_sync;
/* Unix `data break', for brk and sbrk.
If brk and sbrk are not used, this info will not be initialized or used. */
@@ -304,4 +303,11 @@ extern int hurd_check_cancel (void);
extern io_t __getdport (int fd), getdport (int fd);
#include <stdarg.h>
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
according to the format string FORMAT, using the argument list in ARG. */
int vpprintf (io_t port, const char *format, va_list arg);
#endif /* hurd.h */
+16 -15
View File
@@ -1,21 +1,21 @@
/* Internal per-thread variables for the Hurd.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1994, 1995, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _HURD_THREADVAR_H
#define _HURD_THREADVAR_H
@@ -33,7 +33,7 @@ Cambridge, MA 02139, USA. */
stack pointer is ignored; and __hurd_threadvar_stack_offset gives the
address of a small allocated region which contains the variables for the
single thread. */
extern unsigned long int __hurd_threadvar_stack_mask;
extern unsigned long int __hurd_threadvar_stack_offset;
@@ -60,6 +60,7 @@ enum __hurd_threadvar_index
_HURD_THREADVAR_ERRNO, /* `errno' value for this thread. */
_HURD_THREADVAR_SIGSTATE, /* This thread's `struct hurd_sigstate'. */
_HURD_THREADVAR_DYNAMIC_USER, /* Dynamically-assigned user variables. */
_HURD_THREADVAR_MALLOC, /* For use of malloc. */
_HURD_THREADVAR_MAX /* Default value for __hurd_threadvar_max. */
};
+130 -23
View File
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1991, 92, 93, 94, 95, 97 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <hurd.h>
#include <hurd/msg_server.h>
@@ -37,17 +37,124 @@ _S_msg_add_auth (mach_port_t me,
{
error_t err;
auth_t newauth;
uid_t *genuids, *gengids, *auxuids, *auxgids;
mach_msg_type_number_t ngenuids, ngengids, nauxuids, nauxgids;
uid_t *newgenuids, *newgengids, *newauxuids, *newauxgids;
mach_msg_type_number_t nnewgenuids, nnewgengids, nnewauxuids, nnewauxgids;
if (err = __USEPORT (AUTH,
__auth_makeauth (port,
&addauth, 1, MACH_MSG_TYPE_MOVE_SEND,
NULL, 0,
NULL, 0,
NULL, 0,
NULL, 0,
&newauth)))
/* Create a list of ids and store it in NEWLISTP, length NEWLISTLEN.
Keep all the ids in EXIST (len NEXIST), adding in those from NEW
(len NNEW) which are not already there. */
error_t make_list (uid_t **newlistp, mach_msg_type_number_t *newlistlen,
uid_t *exist, mach_msg_type_number_t nexist,
uid_t *new, mach_msg_type_number_t nnew)
{
error_t urp;
int i, j, k;
vm_size_t offset;
urp = vm_allocate (mach_task_self (), (vm_address_t *) newlistp,
nexist + nnew * sizeof (uid_t), 1);
if (urp)
return urp;
j = 0;
for (i = 0; i < nexist; i++)
(*newlistp)[j++] = exist[i];
for (i = 0; i < nnew; i++)
{
for (k = 0; k < nexist; k++)
if (exist[k] == new[i])
break;
if (k < nexist)
continue;
(*newlistp)[j++] = new[i];
}
offset = (round_page (nexist + nnew * sizeof (uid_t))
- round_page (j * sizeof (uid_t)));
if (offset)
vm_deallocate (mach_task_self (),
(vm_address_t) (*newlistp
+ (nexist + nnew * sizeof (uid_t))),
offset);
*newlistlen = j;
return 0;
}
/* Find out what ids ADDAUTH refers to */
genuids = gengids = auxuids = auxgids = 0;
ngenuids = ngengids = nauxuids = nauxgids = 0;
err = __auth_getids (addauth,
&genuids, &ngenuids,
&auxuids, &nauxuids,
&gengids, &ngengids,
&auxgids, &nauxgids);
if (err)
return err;
/* OR in these ids to what we already have, creating a new list. */
HURD_CRITICAL_BEGIN;
__mutex_lock (&_hurd_id.lock);
_hurd_check_ids ();
#define MAKE(genaux,uidgid) \
make_list (&new ## genaux ## uidgid ## s, \
&nnew ## genaux ## uidgid ## s, \
_hurd_id.genaux.uidgid ## s, \
_hurd_id.genaux.n ## uidgid ## s, \
genaux ## uidgid ## s, \
n ## genaux ## uidgid ## s)
err = MAKE (gen, uid);
if (!err)
MAKE (aux, uid);
if (!err)
MAKE (gen, gid);
if (!err)
MAKE (aux, gid);
#undef MAKE
__mutex_unlock (&_hurd_id.lock);
HURD_CRITICAL_END;
/* Create the new auth port */
if (!err)
err = __USEPORT (AUTH,
__auth_makeauth (port,
&addauth, MACH_MSG_TYPE_MOVE_SEND, 1,
newgenuids, nnewgenuids,
newauxuids, nnewauxuids,
newgengids, nnewgengids,
newauxgids, nnewauxgids,
&newauth));
#define freeup(array, len) \
if (array) \
vm_deallocate (mach_task_self (), (vm_address_t) array, \
len * sizeof (uid_t));
freeup (genuids, ngenuids);
freeup (auxuids, nauxuids);
freeup (gengids, ngengids);
freeup (auxgids, nauxgids);
freeup (newgenuids, nnewgenuids);
freeup (newauxuids, nnewauxuids);
freeup (newgengids, nnewgengids);
freeup (newauxgids, nnewauxgids);
#undef freeup
if (err)
return err;
/* And install it. */
err = __setauth (newauth);
__mach_port_deallocate (__mach_task_self (), newauth);
if (err)
@@ -108,7 +215,7 @@ _S_msg_del_auth (mach_port_t me,
err = __USEPORT (AUTH, __auth_makeauth
(port,
NULL, 0, MACH_MSG_TYPE_COPY_SEND,
NULL, MACH_MSG_TYPE_COPY_SEND, 0,
newu, nu,
_hurd_id.aux.uids, _hurd_id.aux.nuids,
newg, ng,
+5 -2
View File
@@ -1,5 +1,5 @@
/* Handle faults in the signal thread.
Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,10 @@
#include <assert.h>
jmp_buf _hurdsig_fault_env;
struct hurd_signal_preemptor _hurdsig_fault_preemptor;
struct hurd_signal_preemptor _hurdsig_fault_preemptor = {0};
/* XXX temporary to deal with spelling fix */
weak_alias (_hurdsig_fault_preemptor, _hurdsig_fault_preempter)
static mach_port_t forward_sigexc;
+16 -14
View File
@@ -1,20 +1,20 @@
/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1992, 93, 94, 95, 96, 97 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <sys/stat.h>
#include <stdlib.h>
@@ -31,7 +31,9 @@ struct hurd_port *_hurd_ports;
unsigned int _hurd_nports;
mode_t _hurd_umask;
sigset_t _hurdsig_traced;
char **__libc_argv;
int __libc_argc;
error_t
+22 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1991, 92, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@
#include <hurd/signal.h>
#include <cthreads.h> /* For `struct mutex'. */
#include <string.h>
#include <hurd/id.h>
#include "hurdfault.h"
#include "hurdmalloc.h" /* XXX */
@@ -39,6 +40,11 @@ thread_t _hurd_msgport_thread;
/* Thread which receives task-global signals. */
thread_t _hurd_sigthread;
/* These are set up by _hurdsig_init. */
unsigned long int __hurd_sigthread_stack_base;
unsigned long int __hurd_sigthread_stack_end;
unsigned long int *__hurd_sigthread_variables;
/* Linked-list of per-thread signal state. */
struct hurd_sigstate *_hurd_sigstates;
@@ -421,9 +427,12 @@ abort_all_rpcs (int signo, struct machine_thread_all_state *state, int live)
}
}
struct hurd_signal_preemptor *_hurdsig_preemptors;
struct hurd_signal_preemptor *_hurdsig_preemptors = 0;
sigset_t _hurdsig_preempted_set;
/* XXX temporary to deal with spelling fix */
weak_alias (_hurdsig_preemptors, _hurdsig_preempters)
/* Mask of stop signals. */
#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) | \
sigmask (SIGSTOP) | sigmask (SIGTSTP))
@@ -1186,7 +1195,7 @@ _hurdsig_init (void)
err = __thread_create (__mach_task_self (), &_hurd_msgport_thread);
assert_perror (err);
stacksize = __vm_page_size * 4; /* Small stack for signal thread. */
stacksize = __vm_page_size * 8; /* Small stack for signal thread. */
err = __mach_setup_thread (__mach_task_self (), _hurd_msgport_thread,
_hurd_msgport_receive,
(vm_address_t *) &__hurd_sigthread_stack_base,
@@ -1229,6 +1238,16 @@ reauth_proc (mach_port_t new)
__mach_port_deallocate (__mach_task_self (), ignore);
__mach_port_destroy (__mach_task_self (), ref);
/* Set the owner of the process here too. */
mutex_lock (&_hurd_id.lock);
if (!_hurd_check_ids ())
HURD_PORT_USE (&_hurd_ports[INIT_PORT_PROC],
__proc_setowner (port,
(_hurd_id.gen.nuids
? _hurd_id.gen.uids[0] : 0),
!_hurd_id.gen.nuids));
mutex_unlock (&_hurd_id.lock);
(void) &reauth_proc; /* Silence compiler warning. */
}
text_set_element (_hurd_reauth_hook, reauth_proc);
+14 -23
View File
@@ -1,21 +1,21 @@
/* Initial program startup for running under the GNU Hurd.
Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1991, 92, 93, 94, 95, 96, 97 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <stdlib.h>
@@ -35,15 +35,6 @@ Cambridge, MA 02139, USA. */
mach_port_t *_hurd_init_dtable;
mach_msg_type_number_t _hurd_init_dtablesize;
unsigned int __hurd_threadvar_max;
unsigned long int __hurd_threadvar_stack_mask;
unsigned long int __hurd_threadvar_stack_offset;
/* These are set up by _hurdsig_init. */
unsigned long int __hurd_sigthread_stack_base;
unsigned long int __hurd_sigthread_stack_end;
unsigned long int *__hurd_sigthread_variables;
extern void __mach_init (void);
/* Entry point. This is the first thing in the text segment.
+24 -17
View File
@@ -1,21 +1,21 @@
/* Report on what a thread in our task is waiting for.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1996, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <hurd.h>
#include <hurd/signal.h>
@@ -93,8 +93,15 @@ describe_port (string_t description, mach_port_t port)
}
/* Common defn so we don't link in the itimer code unnecessarily. */
thread_t _hurd_itimer_thread; /* XXX */
/* We want _HURD_ITIMER_THREAD, but don't want to link in the itimer code
unnecessarily. */
#if 0 /* libc.so.0.0 needs this defined, so make it a weak alias for now. */
extern thread_t _hurd_itimer_thread; /* XXX */
weak_extern (_hurd_itimer_thread)
#else
static thread_t default_hurd_itimer_thread;
weak_alias (default_hurd_itimer_thread, _hurd_itimer_thread)
#endif
kern_return_t
_S_msg_report_wait (mach_port_t msgport, thread_t thread,
@@ -105,7 +112,7 @@ _S_msg_report_wait (mach_port_t msgport, thread_t thread,
if (thread == _hurd_msgport_thread)
/* Cute. */
strcpy (description, "msgport");
else if (thread == _hurd_itimer_thread)
else if (&_hurd_msgport_thread && thread == _hurd_itimer_thread)
strcpy (description, "itimer");
else
{
+15 -15
View File
@@ -1,21 +1,21 @@
/* Set a host configuration item kept as the whole contents of a file.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1996, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <fcntl.h>
#include <hurd.h>
@@ -28,7 +28,7 @@ _hurd_set_host_config (const char *item, const char *value, size_t valuelen)
mach_msg_type_number_t nwrote;
file_t new, dir;
dir = __file_name_split (item, &item);
dir = __file_name_split (item, (char **)&item);
if (dir == MACH_PORT_NULL)
return -1;
+23 -22
View File
@@ -1,30 +1,30 @@
/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1991, 1994, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <ansidecl.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <hurd.h>
static ssize_t
DEFUN(pwrite, (cookie, buf, n),
PTR cookie AND CONST char *buf AND size_t n)
pwrite (void *cookie,
const char *buf,
size_t n)
{
error_t error = __io_write ((io_t) cookie, buf, n, -1,
(mach_msg_type_number_t *) &n);
@@ -37,24 +37,25 @@ DEFUN(pwrite, (cookie, buf, n),
/* Write formatted output to PORT, a Mach port supporting the i/o protocol,
according to the format string FORMAT, using the argument list in ARG. */
int
DEFUN(vpprintf, (port, format, arg),
io_t port AND CONST char *format AND va_list arg)
vpprintf (io_t port,
const char *format,
va_list arg)
{
int done;
FILE f;
/* Create an unbuffered stream talking to PORT on the stack. */
memset((PTR) &f, 0, sizeof(f));
memset ((void *) &f, 0, sizeof (f));
f.__magic = _IOMAGIC;
f.__mode.__write = 1;
f.__cookie = (PTR) port;
f.__cookie = (void *) port;
f.__room_funcs = __default_room_functions;
f.__io_funcs.__write = pwrite;
f.__seen = 1;
f.__userbuf = 1;
/* vfprintf will use a buffer on the stack for the life of the call. */
done = vfprintf(&f, format, arg);
done = vfprintf (&f, format, arg);
return done;
}
+86 -53
View File
@@ -1,62 +1,95 @@
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)inet.h 8.1 (Berkeley) 6/2/93
*/
/* Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#ifndef _INET_H_
#define _INET_H_
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.
/* External definitions for functions in inet(3) */
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef _ARPA_INET_H
#define _ARPA_INET_H 1
#include <features.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include <netinet/in.h> /* To define `struct in_addr'. */
__BEGIN_DECLS
u_long inet_addr __P((const char *));
int inet_aton __P((const char *, struct in_addr *));
u_int32_t inet_lnaof __P((struct in_addr));
struct in_addr inet_makeaddr __P((u_int32_t , u_int32_t));
char * inet_neta __P((u_long, char *, size_t));
u_int32_t inet_netof __P((struct in_addr));
u_int32_t inet_network __P((const char *));
char *inet_net_ntop __P((int, const void *, int, char *, size_t));
int inet_net_pton __P((int, const char *, void *, size_t));
char *inet_ntoa __P((struct in_addr));
int inet_pton __P((int, const char *, void *));
const char *inet_ntop __P((int, const void *, char *, size_t));
u_int inet_nsap_addr __P((const char *, u_char *, int));
char *inet_nsap_ntoa __P((int, const u_char *, char *));
/* Convert Internet host address from numbers-and-dots notation in CP
into binary data in network byte order. */
extern u_int32_t inet_addr __P ((__const char *__cp));
/* Convert Internet host address from numbers-and-dots notation in CP
into binary data and store the result in the structure INP. */
extern int inet_aton __P ((__const char *__cp, struct in_addr *__inp));
/* Return the local host address part of the Internet address in IN. */
extern u_int32_t inet_lnaof __P ((struct in_addr __in));
/* Make Internet host address in network byte order by combining the
network number NET with the local address HOST. */
extern struct in_addr inet_makeaddr __P ((u_int32_t __net, u_int32_t __host));
/* Format a network number NET into presentation format and place result
in buffer starting at BUF with length of LEN bytes. */
extern char *inet_neta __P ((u_int32_t __net, char *__buf, size_t __len));
/* Return network number part of the Internet address IN. */
extern u_int32_t inet_netof __P ((struct in_addr __in));
/* Extract the network number in network byte order from the address
in numbers-and-dots natation starting at CP. */
extern u_int32_t inet_network __P ((__const char *__cp));
/* Convert network number for interface type AF in buffer starting at
CP to presentation format. The result will specifiy BITS bits of
the number. */
extern char *inet_net_ntop __P((int __af, __const void *__cp, int __bits,
char *__buf, size_t __len));
/* Convert network number for interface type AF from presentation in
buffer starting at CP to network format and store result int
buffer starting at BUF of size LEN. */
extern int inet_net_pton __P ((int __af, __const char *__cp,
void *__buf, size_t __len));
/* Convert Internet number in IN to ASCII representation. The return value
is a pointer to an internal array containing the string. */
extern char *inet_ntoa __P ((struct in_addr __in));
/* Convert from presentation format of an Internet number in buffer
starting at CP to the binary network format and store result for
interface type AF in buffer starting at BUF. */
extern int inet_pton __P ((int __af, __const char *__cp, void *__buf));
/* Convert a Internet address in binary network format for interface
type AF in buffer starting at CP to presentation form and place
result in buffer of length LEN astarting at BUF. */
extern __const char *inet_ntop __P ((int __af, __const void *__cp,
char *__buf, size_t __len));
/* Convert ASCII representation in hexadecimal form of the Internet
address to binary form and place result in buffer of length LEN
starting at BUF. */
extern unsigned int inet_nsap_addr __P ((__const char *__cp,
unsigned char *__buf, int __len));
/* Convert internet address in binary form in LEN bytes starting at CP
a presentation form and place result in BUF. */
extern char *inet_nsap_ntoa __P ((int __len, __const unsigned char *__cp,
char *__buf));
__END_DECLS
#endif /* !_INET_H_ */
#endif /* arpa/inet.h */
+13 -13
View File
@@ -33,8 +33,8 @@
* @(#)tftp.h 8.1 (Berkeley) 6/2/93
*/
#ifndef _TFTP_H_
#define _TFTP_H_
#ifndef _ARPA_TFTP_H
#define _ARPA_TFTP_H 1
/*
* Trivial File Transfer Protocol (IEN-133)
@@ -44,20 +44,20 @@
/*
* Packet types.
*/
#define RRQ 01 /* read request */
#define WRQ 02 /* write request */
#define DATA 03 /* data packet */
#define ACK 04 /* acknowledgement */
#define ERROR 05 /* error code */
#define RRQ 01 /* read request */
#define WRQ 02 /* write request */
#define DATA 03 /* data packet */
#define ACK 04 /* acknowledgement */
#define ERROR 05 /* error code */
struct tftphdr {
short th_opcode; /* packet type */
short th_opcode; /* packet type */
union {
short tu_block; /* block # */
short tu_code; /* error code */
char tu_stuff[1]; /* request packet stuff */
unsigned short tu_block; /* block # */
short tu_code; /* error code */
char tu_stuff[1]; /* request packet stuff */
} th_u;
char th_data[1]; /* data or error string */
char th_data[1]; /* data or error string */
};
#define th_block th_u.tu_block
@@ -77,4 +77,4 @@ struct tftphdr {
#define EEXISTS 6 /* file already exists */
#define ENOUSER 7 /* no such user */
#endif /* !_TFTP_H_ */
#endif /* arpa/tftp.h */
+89 -51
View File
@@ -1,59 +1,97 @@
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* Convert Inet number to ASCII representation.
Copyright (C) 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_ntoa.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/*
* Convert network-format internet address
* to base 256 d.d.d.d representation.
*/
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <arpa/inet.h>
#include <libc-lock.h>
/* The interface of this function is completely stupid, it requires a
static buffer. We relax this a bit in that we allow at least one
buffer for each thread. */
/* This is the key for the thread specific memory. */
static __libc_key_t key;
/* If nonzero the key allocation failed and we should better use a
static buffer than fail. */
static char local_buf[18];
static char *static_buf;
/* Destructor for the thread-specific data. */
static void init (void);
static void free_key_mem (void *mem);
char *
inet_ntoa(in)
struct in_addr in;
inet_ntoa (struct in_addr in)
{
static char b[18];
register char *p;
__libc_once_define (static, once);
char *buffer;
unsigned char *bytes;
p = (char *)&in;
#define UC(b) (((int)b)&0xff)
(void)snprintf(b, sizeof(b),
"%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
return (b);
/* If we have not yet initialized the buffer do it now. */
__libc_once (once, init);
if (static_buf != NULL)
buffer = static_buf;
else
{
/* We don't use the static buffer and so we have a key. Use it
to get the thread-specific buffer. */
buffer = __libc_getspecific (key);
if (buffer == NULL)
{
/* No buffer allocated so far. */
buffer = malloc (18);
if (buffer == NULL)
/* No more memory available. We use the static buffer. */
buffer = local_buf;
else
__libc_setspecific (key, buffer);
}
}
bytes = (unsigned char *) &in;
snprintf (buffer, 18, "%d.%d.%d.%d", bytes[0], bytes[1], bytes[2], bytes[3]);
return buffer;
}
/* Initialize buffer. */
static void
init (void)
{
if (__libc_key_create (&key, free_key_mem))
/* Creating the key failed. This means something really went
wrong. In any case use a static buffer which is better than
nothing. */
static_buf = local_buf;
}
/* free the thread specific data, this is done if a thread terminates. */
static void
free_key_mem (void *mem)
{
free (mem);
__libc_setspecific (key, NULL);
}
+29 -23
View File
@@ -1,21 +1,21 @@
/* Functions for storing Ethernet addresses in ASCII and mapping to hostnames.
Copyright (C) 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Copyright (C) 1996, 1997 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 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.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef __NETINET_ETHER_H
@@ -25,24 +25,30 @@ Boston, MA 02111-1307, USA. */
/* Get definition of `struct ether_addr'. */
#include <netinet/if_ether.h>
__BEGIN_DECLS
/* Convert 48 bit Ethernet ADDRess to ASCII. */
char *ether_ntoa __P ((const struct ether_addr *__addr));
char *ether_ntoa_r __P ((const struct ether_addr *__addr, char *__buf));
extern char *ether_ntoa __P ((__const struct ether_addr *__addr));
extern char *ether_ntoa_r __P ((__const struct ether_addr *__addr,
char *__buf));
/* Convert ASCII string S to 48 bit Ethernet address. */
struct ether_addr *ether_aton __P ((const char *__asc));
struct ether_addr *ether_aton_r __P ((const char *__asc,
struct ether_addr *__addr));
extern struct ether_addr *ether_aton __P ((__const char *__asc));
extern struct ether_addr *ether_aton_r __P ((__const char *__asc,
struct ether_addr *__addr));
/* Map 48 bit Ethernet number ADDR to HOSTNAME. */
int ether_ntohost __P ((char *__hostname, const struct ether_addr *__addr));
extern int ether_ntohost __P ((char *__hostname,
__const struct ether_addr *__addr));
/* Map HOSTNAME to 48 bit Ethernet address. */
int ether_hostton __P ((const char *__hostname, struct ether_addr *__addr));
extern int ether_hostton __P ((__const char *__hostname,
struct ether_addr *__addr));
/* Scan LINE and set ADDR and HOSTNAME. */
int ether_line __P ((const char *__line, struct ether_addr *__addr,
char *__hostname));
extern int ether_line __P ((__const char *__line, struct ether_addr *__addr,
char *__hostname));
__END_DECLS
#endif /* netinet/ether.h */
+33 -29
View File
@@ -105,7 +105,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
else
(void)fprintf(stderr, "rcmd: socket: %m\n");
sigsetmask(oldmask);
return (-1);
return -1;
}
fcntl(s, F_SETOWN, pid);
sin.sin_family = hp->h_addrtype;
@@ -140,7 +140,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
}
(void)fprintf(stderr, "%s: %m\n", hp->h_name);
sigsetmask(oldmask);
return (-1);
return -1;
}
lport--;
if (fd2p == 0) {
@@ -149,7 +149,7 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
} else {
char num[8];
int s2 = rresvport(&lport), s3;
int len = sizeof(from);
size_t len = sizeof(from);
if (s2 < 0)
goto bad;
@@ -211,14 +211,14 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p)
goto bad2;
}
sigsetmask(oldmask);
return (s);
return s;
bad2:
if (lport)
(void)close(*fd2p);
bad:
(void)close(s);
sigsetmask(oldmask);
return (-1);
return -1;
}
int
@@ -232,20 +232,20 @@ rresvport(alport)
sin.sin_addr.s_addr = INADDR_ANY;
s = socket(AF_INET, SOCK_STREAM, 0);
if (s < 0)
return (-1);
return -1;
for (;;) {
sin.sin_port = htons((u_short)*alport);
if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0)
return (s);
return s;
if (errno != EADDRINUSE) {
(void)close(s);
return (-1);
return -1;
}
(*alport)--;
if (*alport == IPPORT_RESERVED/2) {
(void)close(s);
__set_errno (EAGAIN); /* close */
return (-1);
return -1;
}
}
}
@@ -282,9 +282,9 @@ ruserok(rhost, superuser, ruser, luser)
for (ap = hp->h_addr_list; *ap; ++ap) {
bcopy(*ap, &addr, sizeof(addr));
if (iruserok(addr, superuser, ruser, luser) == 0)
return (0);
return 0;
}
return (-1);
return -1;
}
/*
@@ -306,7 +306,6 @@ iruserok(raddr, superuser, ruser, luser)
struct stat sbuf;
struct passwd pwdbuf, *pwd;
FILE *hostf;
uid_t uid;
int first;
first = 1;
@@ -315,7 +314,7 @@ again:
if (hostf) {
if (__ivaliduser(hostf, raddr, luser, ruser) == 0) {
(void)fclose(hostf);
return (0);
return 0;
}
(void)fclose(hostf);
}
@@ -326,7 +325,7 @@ again:
char *buffer = __alloca (buflen);
first = 0;
if (getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
return -1;
dirlen = strlen (pwd->pw_dir);
@@ -339,13 +338,18 @@ again:
* reading an NFS mounted file system, can't read files that
* are protected read/write owner only.
*/
uid = geteuid();
(void)seteuid(pwd->pw_uid);
hostf = fopen(pbuf, "r");
(void)seteuid(uid);
if (__access (pbuf, R_OK) != 0)
hostf = NULL;
else
{
uid_t uid = geteuid ();
seteuid (pwd->pw_uid);
hostf = fopen (pbuf, "r");
seteuid (uid);
}
if (hostf == NULL)
return (-1);
return -1;
/*
* If not a regular file, or is owned by someone other than
* user or root or if writeable by anyone but the owner, quit.
@@ -365,11 +369,11 @@ again:
if (cp) {
__rcmd_errstr = cp;
(void)fclose(hostf);
return (-1);
return -1;
}
goto again;
}
return (-1);
return -1;
}
/*
@@ -390,7 +394,7 @@ __ivaliduser(hostf, raddr, luser, ruser)
size_t bufsize = 0;
ssize_t nread;
while ((nread = getline (&buf, &bufsize, hostf)) > 0) {
while ((nread = __getline (&buf, &bufsize, hostf)) > 0) {
buf[bufsize - 1] = '\0'; /* Make sure it's terminated. */
p = buf;
while (*p != '\n' && *p != ' ' && *p != '\t' && *p != '\0') {
@@ -411,11 +415,11 @@ __ivaliduser(hostf, raddr, luser, ruser)
if (__icheckhost(raddr, buf) &&
strcmp(ruser, *user ? user : luser) == 0) {
free (buf);
return (0);
return 0;
}
}
free (buf);
return (-1);
return -1;
}
/*
@@ -426,7 +430,7 @@ __icheckhost(raddr, lhost)
u_int32_t raddr;
register char *lhost;
{
register struct hostent hostbuf, *hp;
struct hostent hostbuf, *hp;
size_t buflen;
char *buffer;
register u_int32_t laddr;
@@ -435,7 +439,7 @@ __icheckhost(raddr, lhost)
/* Try for raw ip address first. */
if (isdigit(*lhost) && (int32_t)(laddr = inet_addr(lhost)) != -1)
return (raddr == laddr);
return raddr == laddr;
/* Better be a hostname. */
buflen = 1024;
@@ -448,14 +452,14 @@ __icheckhost(raddr, lhost)
{
/* Enlarge the buffer. */
buflen *= 2;
buflen = __alloca (buflen);
buffer = __alloca (buflen);
}
/* Spin through ip addresses. */
for (pp = hp->h_addr_list; *pp; ++pp)
if (!bcmp(&raddr, *pp, sizeof(u_int32_t)))
return (1);
return 1;
/* No match. */
return (0);
return 0;
}
+1 -1
View File
@@ -53,7 +53,7 @@ int
rexec(ahost, rport, name, pass, cmd, fd2p)
char **ahost;
int rport;
char *name, *pass, *cmd;
const char *name, *pass, *cmd;
int *fd2p;
{
struct sockaddr_in sin, sin2, from;
+2 -1
View File
@@ -206,7 +206,8 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
? strlen (modifier) + 1 : 0)
+ ((mask & CEN_SPECIAL) != 0
? strlen (special) + 1 : 0)
+ ((mask & (CEN_SPONSOR | CEN_REVISION) != 0)
+ (((mask & CEN_SPONSOR) != 0
|| (mask & CEN_REVISION) != 0)
? (1 + ((mask & CEN_SPONSOR) != 0
? strlen (sponsor) + 1 : 0)
+ ((mask & CEN_REVISION) != 0
+2 -2
View File
@@ -1,5 +1,5 @@
/* loadmsgcat.c -- load needed message catalogs
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
@@ -94,7 +94,7 @@ _nl_load_domain (domain_file)
/* We must know about the size of the file. */
if (fstat (fd, &st) != 0
&& st.st_size < (off_t) sizeof (struct mo_file_header))
|| st.st_size < (off_t) sizeof (struct mo_file_header))
{
/* Something went wrong. */
close (fd);
+14 -12
View File
@@ -1,5 +1,5 @@
/* localealias.c -- handle aliases for locale names
Copyright (C) 1995, 1996 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library. Its master source is NOT part of
the C library, however. The master source lives in /gd/gnu/lib.
@@ -229,6 +229,19 @@ read_alias_file (fname, fname_len)
/* EOF reached. */
break;
/* Possibly not the whole line fits into the buffer. Ignore
the rest of the line. */
if (strchr (buf, '\n') == NULL)
{
char altbuf[BUFSIZ];
do
if (fgets (altbuf, sizeof altbuf, fp) == NULL)
/* Make sure the inner loop will be left. The outer loop
will exit at the `feof' test. */
break;
while (strchr (altbuf, '\n') == NULL);
}
cp = buf;
/* Ignore leading white space. */
while (isspace (cp[0]))
@@ -296,17 +309,6 @@ read_alias_file (fname, fname_len)
++added;
}
}
/* Possibly not the whole line fits into the buffer. Ignore
the rest of the line. */
while (strchr (cp, '\n') == NULL)
{
cp = buf;
if (fgets (buf, BUFSIZ, fp) == NULL)
/* Make sure the inner loop will be left. The outer loop
will exit at the `feof' test. */
*cp = '\n';
}
}
/* Should we test for ferror()? I think we have to silently ignore
+4
View File
@@ -26,6 +26,8 @@
#define _FTW_H 1
#include <features.h>
__BEGIN_DECLS
#include <statbuf.h>
/* The FLAG argument to the user function passed to ftw. */
@@ -41,4 +43,6 @@ extern int ftw __P ((__const char *__dir,
int __flag),
int __descriptors));
__END_DECLS
#endif /* ftw.h */
+17 -14
View File
@@ -1,25 +1,26 @@
/* Copyright (C) 1994, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1994, 1996, 1997 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 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.
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. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
/* lockf is a simplified interface to fcntl's locking facilities. */
@@ -28,6 +29,8 @@ lockf (int fd, int cmd, off_t len)
{
struct flock fl;
memset ((char *) &fl, '\0', sizeof (fl));
switch (cmd)
{
case F_TEST:
+14 -7
View File
@@ -138,8 +138,8 @@ DEFUN(_IO_file_close_it, (fp),
}
void
DEFUN(_IO_file_finish, (fp),
register _IO_FILE* fp)
DEFUN(_IO_file_finish, (fp, dummy),
register _IO_FILE* fp AND int dummy)
{
if (_IO_file_is_open(fp))
{
@@ -147,7 +147,7 @@ DEFUN(_IO_file_finish, (fp),
if (!(fp->_flags & _IO_DELETE_DONT_CLOSE))
_IO_SYSCLOSE (fp);
}
_IO_default_finish(fp);
_IO_default_finish(fp, 0);
}
_IO_FILE *
@@ -291,6 +291,15 @@ DEFUN(_IO_file_underflow, (fp),
_IO_switch_to_get_mode(fp);
/* This is very tricky. We have to adjust those
pointers before we call _IO_SYSREAD () since
we may longjump () out while waiting for
input. Those pointers may be screwed up. H.J. */
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
fp->_IO_read_end = fp->_IO_buf_base;
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end
= fp->_IO_buf_base;
count = _IO_SYSREAD (fp, fp->_IO_buf_base,
fp->_IO_buf_end - fp->_IO_buf_base);
if (count <= 0)
@@ -300,10 +309,7 @@ DEFUN(_IO_file_underflow, (fp),
else
fp->_flags |= _IO_ERR_SEEN, count = 0;
}
fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
fp->_IO_read_end = fp->_IO_buf_base + count;
fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end
= fp->_IO_buf_base;
fp->_IO_read_end += count;
if (count == 0)
return EOF;
if (fp->_offset != _IO_pos_BAD)
@@ -317,6 +323,7 @@ DEFUN(_IO_file_overflow, (f, ch),
{
if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
{
f->_flags |= _IO_ERR_SEEN;
__set_errno (EBADF);
return EOF;
}
+3 -3
View File
@@ -481,8 +481,8 @@ DEFUN(_IO_default_sync, (fp),
current implementation, this function can get called twice! */
void
DEFUN(_IO_default_finish, (fp),
_IO_FILE *fp)
DEFUN(_IO_default_finish, (fp, dummy),
_IO_FILE *fp AND int dummy)
{
struct _IO_marker *mark;
if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
@@ -615,7 +615,7 @@ DEFUN_VOID(_IO_flush_all_linebuffered)
{
_IO_FILE *fp;
for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
if (fp->_flags & _IO_LINE_BUF)
if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF)
_IO_OVERFLOW (fp, EOF);
}
+2
View File
@@ -127,6 +127,7 @@ the executable file might be covered by the GNU General Public License. */
#define _IO_CURRENTLY_PUTTING 0x800
#define _IO_IS_APPENDING 0x1000
#define _IO_IS_FILEBUF 0x2000
#define _IO_BAD_SEEN 0x4000
/* These are "formatting flags" matching the iostream fmtflags enum values. */
#define _IO_SKIPWS 01
@@ -145,6 +146,7 @@ the executable file might be covered by the GNU General Public License. */
#define _IO_UNITBUF 020000
#define _IO_STDIO 040000
#define _IO_DONT_CLOSE 0100000
#define _IO_BOOLALPHA 0200000
struct _IO_jump_t; struct _IO_FILE;
+5 -5
View File
@@ -101,8 +101,8 @@ extern "C" {
/* The 'finish' function does any final cleaning up of an _IO_FILE object.
It does not delete (free) it, but does everything else to finalize it/
It matches the streambuf::~streambuf virtual destructor. */
typedef void (*_IO_finish_t) __P((_IO_FILE*)); /* finalize */
#define _IO_FINISH(FP) JUMP0(__finish, FP)
typedef void (*_IO_finish_t) __P((_IO_FILE*, int)); /* finalize */
#define _IO_FINISH(FP) JUMP1(__finish, FP, 0)
/* The 'overflow' hook flushes the buffer.
The second argument is a character, or EOF.
@@ -295,7 +295,7 @@ extern int _IO_seekmark __P((_IO_FILE *, struct _IO_marker *, int));
extern int _IO_default_underflow __P((_IO_FILE*));
extern int _IO_default_uflow __P((_IO_FILE*));
extern int _IO_default_doallocate __P((_IO_FILE*));
extern void _IO_default_finish __P((_IO_FILE *));
extern void _IO_default_finish __P((_IO_FILE *, int));
extern int _IO_default_pbackfail __P((_IO_FILE*, int));
extern _IO_FILE* _IO_default_setbuf __P((_IO_FILE *, char*, _IO_ssize_t));
extern _IO_size_t _IO_default_xsputn __P((_IO_FILE *, const void*, _IO_size_t));
@@ -352,7 +352,7 @@ extern _IO_ssize_t _IO_file_read __P((_IO_FILE*, void*, _IO_ssize_t));
extern int _IO_file_sync __P((_IO_FILE*));
extern int _IO_file_close_it __P((_IO_FILE*));
extern _IO_fpos_t _IO_file_seek __P((_IO_FILE *, _IO_off_t, int));
extern void _IO_file_finish __P((_IO_FILE*));
extern void _IO_file_finish __P((_IO_FILE*, int));
/* Other file functions. */
extern _IO_FILE* _IO_file_attach __P((_IO_FILE *, int));
@@ -366,7 +366,7 @@ extern int _IO_str_underflow __P((_IO_FILE*));
extern int _IO_str_overflow __P((_IO_FILE *, int));
extern int _IO_str_pbackfail __P((_IO_FILE*, int));
extern _IO_fpos_t _IO_str_seekoff __P((_IO_FILE*,_IO_off_t,int,int));
extern void _IO_str_finish __P ((_IO_FILE*));
extern void _IO_str_finish __P ((_IO_FILE*, int));
/* Other strfile functions */
extern void _IO_str_init_static __P((_IO_FILE *, char*, int, char*));
+18 -17
View File
@@ -1,20 +1,20 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1995, 1996, 1997 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 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.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "libioP.h"
#include "strfile.h"
@@ -31,7 +31,7 @@ struct _IO_FILE_memstream
static int _IO_mem_sync __P ((_IO_FILE* fp));
static void _IO_mem_finish __P ((_IO_FILE* fp));
static void _IO_mem_finish __P ((_IO_FILE* fp, int));
static const struct _IO_jump_t _IO_mem_jumps =
@@ -124,8 +124,9 @@ _IO_mem_sync (fp)
static void
_IO_mem_finish (fp)
_IO_mem_finish (fp, dummy)
_IO_FILE* fp;
int dummy;
{
struct _IO_FILE_memstream *mp = (struct _IO_FILE_memstream *) fp;
@@ -139,5 +140,5 @@ _IO_mem_finish (fp)
fp->_IO_buf_base = NULL;
_IO_default_finish (fp);
_IO_default_finish (fp, 0);
}
+7
View File
@@ -48,3 +48,10 @@ DEF_STDFILE(_IO_stderr_, 2, &_IO_stdout_.file,
_IO_NO_READS+_IO_UNBUFFERED);
_IO_FILE *_IO_list_all = &_IO_stderr_.file;
#ifdef _G_USING_THUNKS
#if defined(__GNUC__) && __GNUC__ >= 2
const
#endif
int _libio_using_thunks = 1;
#endif
+8 -6
View File
@@ -176,7 +176,7 @@ extern int obstack_printf __P ((struct obstack *__obstack, __const char *__fmt,
...));
#endif
#if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
#if !defined(__STRICT_ANSI__) || defined(__USE_POSIX)
extern FILE *fdopen __P ((int, __const char *));
extern int fileno __P ((FILE*));
extern FILE* popen __P ((__const char*, __const char*));
@@ -192,15 +192,17 @@ extern char *ctermid __P ((char *__buf));
extern char *cuserid __P ((char * __buf));
#endif
#ifdef __USE_GNU
extern _IO_ssize_t getdelim __P ((char **, size_t *, int, FILE*));
extern _IO_ssize_t getline __P ((char **, size_t *, FILE *));
extern _IO_ssize_t __getline __P ((char **, size_t *, FILE *));
#if defined __USE_BSD
extern int snprintf __P ((char *, size_t, __const char *, ...));
extern int __snprintf __P ((char *, size_t, __const char *, ...));
extern int vsnprintf __P ((char *, size_t, __const char *, _G_va_list));
extern int __vsnprintf __P ((char *, size_t, __const char *, _G_va_list));
#endif
#ifdef __USE_GNU
extern _IO_ssize_t getdelim __P ((char **, size_t *, int, FILE*));
extern _IO_ssize_t getline __P ((char **, size_t *, FILE *));
extern _IO_ssize_t __getline __P ((char **, size_t *, FILE *));
extern int asprintf __P ((char **, const char *, ...));
extern int vasprintf __P ((char **, const char *, _G_va_list));
+5 -5
View File
@@ -88,7 +88,7 @@ DEFUN(_IO_str_init_static, (fp, ptr, size, pstart),
if (pstart)
{
fp->_IO_write_ptr = pstart;
fp->_IO_write_end = ptr+size;
fp->_IO_write_end = ptr + size;
fp->_IO_read_end = pstart;
}
else
@@ -193,7 +193,7 @@ _IO_ssize_t
DEFUN(_IO_str_count, (fp),
register _IO_FILE *fp)
{
return (fp->_IO_write_ptr > fp->_IO_read_end ? fp->_IO_write_ptr
return (fp->_IO_write_end > fp->_IO_read_end ? fp->_IO_write_end
: fp->_IO_read_end)
- fp->_IO_read_base;
}
@@ -258,14 +258,14 @@ DEFUN(_IO_str_pbackfail, (fp, c),
}
void
DEFUN (_IO_str_finish, (fp),
register _IO_FILE* fp)
DEFUN (_IO_str_finish, (fp, dummy),
register _IO_FILE* fp AND int dummy)
{
if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
(((_IO_strfile*)fp)->_s._free_buffer)(fp->_IO_buf_base);
fp->_IO_buf_base = NULL;
_IO_default_finish(fp);
_IO_default_finish(fp, 0);
}
struct _IO_jump_t _IO_str_jumps = {
+7 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,6 +43,12 @@
#define _LIBC_LIMITS_H_ /* This tells it not to look for another. */
#endif
#ifndef _GCC_LIMITS_H_ /* This is what GCC's file defines. */
/* Maximum length of any multibyte character in any locale. We
define this here to prevent the value from the gcc value (which is
one) to take effect. */
#define MB_LEN_MAX 6
#include_next <limits.h>
#endif
+87 -87
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -95,92 +95,92 @@ const char _nl_C_LC_CTYPE_class[768] =
/* 0xfa */ "\002\000" "\002\000" "\002\000" "\002\000" "\002\000" "\002\000"
;
const char _nl_C_LC_CTYPE_class32[1024] =
/* 0x00 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x03 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x06 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x09 */ "\000\000\003\040" "\000\000\002\040" "\000\000\002\040"
/* 0x0c */ "\000\000\002\040" "\000\000\002\040" "\000\000\002\000"
/* 0x0f */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x12 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x15 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x18 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x1b */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x1e */ "\000\000\002\000" "\000\000\002\000" "\000\000\001\140"
/* 0x21 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x24 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x27 */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x2a */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x2d */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x30 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330"
/* 0x33 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330"
/* 0x36 */ "\000\000\010\330" "\000\000\010\330" "\000\000\010\330"
/* 0x39 */ "\000\000\010\330" "\000\000\004\300" "\000\000\004\300"
/* 0x3c */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x3f */ "\000\000\004\300" "\000\000\004\300" "\000\000\010\325"
/* 0x42 */ "\000\000\010\325" "\000\000\010\325" "\000\000\010\325"
/* 0x45 */ "\000\000\010\325" "\000\000\010\325" "\000\000\010\305"
/* 0x48 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
/* 0x4b */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
/* 0x4e */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
/* 0x51 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
/* 0x54 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
/* 0x57 */ "\000\000\010\305" "\000\000\010\305" "\000\000\010\305"
/* 0x5a */ "\000\000\010\305" "\000\000\004\300" "\000\000\004\300"
/* 0x5d */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x60 */ "\000\000\004\300" "\000\000\010\326" "\000\000\010\326"
/* 0x63 */ "\000\000\010\326" "\000\000\010\326" "\000\000\010\326"
/* 0x66 */ "\000\000\010\326" "\000\000\010\306" "\000\000\010\306"
/* 0x69 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
/* 0x6c */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
/* 0x6f */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
/* 0x72 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
/* 0x75 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
/* 0x78 */ "\000\000\010\306" "\000\000\010\306" "\000\000\010\306"
/* 0x7b */ "\000\000\004\300" "\000\000\004\300" "\000\000\004\300"
/* 0x7e */ "\000\000\004\300" "\000\000\002\000" "\000\000\002\000"
/* 0x81 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x84 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x87 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x8a */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x8d */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x90 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x93 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x96 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x99 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x9c */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0x9f */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xa2 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xa5 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xa8 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xab */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xae */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xb1 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xb4 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xb7 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xba */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xbd */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xc0 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xc3 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xc6 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xc9 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xcc */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xcf */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xd2 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xd5 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xd8 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xdb */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xde */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xe1 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xe4 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xe7 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xea */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xed */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xf0 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xf3 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xf6 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xf9 */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xfc */ "\000\000\002\000" "\000\000\002\000" "\000\000\002\000"
/* 0xff */ "\000\000\002\000"
/* 0x00 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x03 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x06 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x09 */ "\003\040\000\000" "\002\040\000\000" "\002\040\000\000"
/* 0x0c */ "\002\040\000\000" "\002\040\000\000" "\002\000\000\000"
/* 0x0f */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x12 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x15 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x18 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x1b */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x1e */ "\002\000\000\000" "\002\000\000\000" "\001\140\000\000"
/* 0x21 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x24 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x27 */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x2a */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x2d */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x30 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
/* 0x33 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
/* 0x36 */ "\010\330\000\000" "\010\330\000\000" "\010\330\000\000"
/* 0x39 */ "\010\330\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x3c */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x3f */ "\004\300\000\000" "\004\300\000\000" "\010\325\000\000"
/* 0x42 */ "\010\325\000\000" "\010\325\000\000" "\010\325\000\000"
/* 0x45 */ "\010\325\000\000" "\010\325\000\000" "\010\305\000\000"
/* 0x48 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x4b */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x4e */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x51 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x54 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x57 */ "\010\305\000\000" "\010\305\000\000" "\010\305\000\000"
/* 0x5a */ "\010\305\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x5d */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x60 */ "\004\300\000\000" "\010\326\000\000" "\010\326\000\000"
/* 0x63 */ "\010\326\000\000" "\010\326\000\000" "\010\326\000\000"
/* 0x66 */ "\010\326\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x69 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x6c */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x6f */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x72 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x75 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x78 */ "\010\306\000\000" "\010\306\000\000" "\010\306\000\000"
/* 0x7b */ "\004\300\000\000" "\004\300\000\000" "\004\300\000\000"
/* 0x7e */ "\004\300\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x81 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x84 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x87 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x8a */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x8d */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x90 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x93 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x96 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x99 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x9c */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0x9f */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xa2 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xa5 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xa8 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xab */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xae */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xb1 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xb4 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xb7 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xba */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xbd */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc0 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc3 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc6 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xc9 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xcc */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xcf */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xd2 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xd5 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xd8 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xdb */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xde */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xe1 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xe4 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xe7 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xea */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xed */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf0 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf3 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf6 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xf9 */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xfc */ "\002\000\000\000" "\002\000\000\000" "\002\000\000\000"
/* 0xff */ "\002\000\000\000"
;
const u_int32_t _nl_C_LC_CTYPE_toupper[384] =
{
+2 -1
View File
@@ -26,7 +26,7 @@ const struct locale_data _nl_C_LC_TIME =
{
_nl_C_name,
NULL, 0, /* no file mapped */
53,
54,
{
{ string: "Sun" },
{ string: "Mon" },
@@ -79,6 +79,7 @@ const struct locale_data _nl_C_LC_TIME =
{ string: "" },
{ string: "" },
{ word: 0 },
{ word: 0 },
{ string: "" },
{ string: "" },
}
+4 -3
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
# Copyright (C) 1991, 1992, 1995, 1996, 1997 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
@@ -73,12 +73,13 @@ localepath = "$(localedir):$(i18ndir)"
CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
-DLOCALEDIR='"$(localedir)"' \
-DLOCALE_ALIAS_PATH='"$(localedir):$(i18ndir)"' \
-DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
-DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
-Iprograms $(CPPFLAGS)
CFLAGS-charmap.c = -Wno-write-strings
CFLAGS-locfile.c = -Wno-write-strings
CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
+159 -145
View File
@@ -1,171 +1,185 @@
/*
* Defines the valid international currency symbols according to ISO-4217.
* Defines the valid international currency symbols according to ISO 4217.
* This is used in monetary.c(monetary_check).
*
* If you find something missing or wrong contact <bug-glibc@prep.ai.mit.edu>
*
* !!! The list has to be sorted !!!
*/
DEFINE_INT_CURR("AED ") /* United Arab Emirates */
DEFINE_INT_CURR("AFA ") /* Afghanistan */
DEFINE_INT_CURR("ALL ") /* Albania */
DEFINE_INT_CURR("ADP ") /* Andorran Peseta */
DEFINE_INT_CURR("AED ") /* United Arab Emirates Dirham */
DEFINE_INT_CURR("AFA ") /* Afghanistan Afgani */
DEFINE_INT_CURR("ALL ") /* Albanian Lek */
DEFINE_INT_CURR("AMD ") /* Armenia Dram */
DEFINE_INT_CURR("ANG ") /* Netherlands Antilles */
DEFINE_INT_CURR("AOK ") /* Angola */
DEFINE_INT_CURR("ARP ") /* Argentina */
DEFINE_INT_CURR("ATS ") /* Austria */
DEFINE_INT_CURR("AUD ") /* Australia */
DEFINE_INT_CURR("BBD ") /* Barbados */
DEFINE_INT_CURR("BDT ") /* Bangladesh */
DEFINE_INT_CURR("BEF ") /* Belgium */
DEFINE_INT_CURR("BGL ") /* Bulgaria */
DEFINE_INT_CURR("BHD ") /* Bahrain */
DEFINE_INT_CURR("AOK ") /* Angolan Kwanza */
DEFINE_INT_CURR("ARP ") /* Argentine Peso */
DEFINE_INT_CURR("ATS ") /* Austrian Schilling */
DEFINE_INT_CURR("AUD ") /* Australian Dollar */
DEFINE_INT_CURR("AZM ") /* Azerbaijan Manat */
DEFINE_INT_CURR("BBD ") /* Barbados Dollar */
DEFINE_INT_CURR("BDT ") /* Bangladesh Taka */
DEFINE_INT_CURR("BEF ") /* Belgian Franc */
DEFINE_INT_CURR("BGL ") /* Bulgarian Lev */
DEFINE_INT_CURR("BHD ") /* Bahraini Dinar */
DEFINE_INT_CURR("BIF ") /* Burundi */
DEFINE_INT_CURR("BMD ") /* Burmuda */
DEFINE_INT_CURR("BND ") /* Brunei */
DEFINE_INT_CURR("BOP ") /* Bolivia */
DEFINE_INT_CURR("BRC ") /* Brazil */
DEFINE_INT_CURR("BSD ") /* Bahamas */
DEFINE_INT_CURR("BMD ") /* Burmudian Dollar */
DEFINE_INT_CURR("BND ") /* Brunei Dollar */
DEFINE_INT_CURR("BOP ") /* Bolivian Boliviano */
DEFINE_INT_CURR("BPS ") /* Canton and Enderbury Islands */
DEFINE_INT_CURR("BRC ") /* Brazil Real */
DEFINE_INT_CURR("BSD ") /* Bahamas Dollar */
DEFINE_INT_CURR("BTN ") /* Bhutan Ngultrum */
DEFINE_INT_CURR("BUK ") /* Burma */
DEFINE_INT_CURR("BWP ") /* Botswana */
DEFINE_INT_CURR("BZD ") /* Belize */
DEFINE_INT_CURR("CAD ") /* Canada */
DEFINE_INT_CURR("CHF ") /* Switzerland, Liechtenstein */
DEFINE_INT_CURR("CLP ") /* Chile */
DEFINE_INT_CURR("CNY ") /* China */
DEFINE_INT_CURR("COP ") /* Colombia */
DEFINE_INT_CURR("CRC ") /* Costa Rica */
DEFINE_INT_CURR("CSK ") /* Czechoslovakia */
DEFINE_INT_CURR("CUP ") /* Cuba */
DEFINE_INT_CURR("CVE ") /* Cape Verde */
DEFINE_INT_CURR("CYP ") /* Cyprus */
DEFINE_INT_CURR("DEM ") /* Germany */
DEFINE_INT_CURR("DJF ") /* Djibouti */
DEFINE_INT_CURR("DKK ") /* Denmark */
DEFINE_INT_CURR("BWP ") /* Botswana Pula */
DEFINE_INT_CURR("BZD ") /* Belize Dollar */
DEFINE_INT_CURR("CAD ") /* Canadian Dollar */
DEFINE_INT_CURR("CFP ") /* French Pacific Island Franc */
DEFINE_INT_CURR("CHF ") /* Swiss Franc (Liechtenstein) */
DEFINE_INT_CURR("CLP ") /* Chilean Peso */
DEFINE_INT_CURR("CNY ") /* China Renminbi */
DEFINE_INT_CURR("COP ") /* Colombian Peso */
DEFINE_INT_CURR("CRC ") /* Costa Rican Colon */
DEFINE_INT_CURR("CUP ") /* Cuban Peso */
DEFINE_INT_CURR("CVE ") /* Cape Verde Escudo */
DEFINE_INT_CURR("CYP ") /* Cypriot Pound */
DEFINE_INT_CURR("CZK ") /* Czech Koruna */
DEFINE_INT_CURR("DEM ") /* German Mark */
DEFINE_INT_CURR("DJF ") /* Djibouti Franc */
DEFINE_INT_CURR("DKK ") /* Danish Krone (Faroe Islands) */
DEFINE_INT_CURR("DOP ") /* Dominican Republic */
DEFINE_INT_CURR("DZD ") /* Algeria */
DEFINE_INT_CURR("ECS ") /* Ecuador */
DEFINE_INT_CURR("EEK ") /* Estonia */
DEFINE_INT_CURR("EGP ") /* Egypt */
DEFINE_INT_CURR("ESP ") /* Spain */
DEFINE_INT_CURR("ETB ") /* Ethiopia */
DEFINE_INT_CURR("FIM ") /* Finland */
DEFINE_INT_CURR("FJD ") /* Fiji */
DEFINE_INT_CURR("FKP ") /* Falkland Islands (Malvinas) */
DEFINE_INT_CURR("FRF ") /* France */
DEFINE_INT_CURR("GBP ") /* Great Britain */
DEFINE_INT_CURR("GHC ") /* Ghana */
DEFINE_INT_CURR("GIP ") /* Gibraltar */
DEFINE_INT_CURR("GMD ") /* Gambia */
DEFINE_INT_CURR("GNS ") /* Guinea */
DEFINE_INT_CURR("DZD ") /* Algerian Dinar */
DEFINE_INT_CURR("ECS ") /* Ecuadoran Sucre */
DEFINE_INT_CURR("EEK ") /* Estonian Kroon */
DEFINE_INT_CURR("EGP ") /* Egyptian Pound */
DEFINE_INT_CURR("ESP ") /* Spanish Peseta */
DEFINE_INT_CURR("ETB ") /* Ethiopian Birr */
DEFINE_INT_CURR("FIM ") /* Finnish Markka */
DEFINE_INT_CURR("FJD ") /* Fiji Dollar */
DEFINE_INT_CURR("FKP ") /* Falkland Islands Pound (Malvinas) */
DEFINE_INT_CURR("FRF ") /* French Franc */
DEFINE_INT_CURR("GBP ") /* British Pound */
DEFINE_INT_CURR("GEK ") /* Georgia Lari */
DEFINE_INT_CURR("GHC ") /* Ghana Cedi */
DEFINE_INT_CURR("GIP ") /* Gibraltar Pound */
DEFINE_INT_CURR("GMD ") /* Gambian Dalasi */
DEFINE_INT_CURR("GNS ") /* Guinea Franc */
DEFINE_INT_CURR("GQE ") /* Equatorial Guinea */
DEFINE_INT_CURR("GRD ") /* Greece */
DEFINE_INT_CURR("GTQ ") /* Guatemala */
DEFINE_INT_CURR("GWP ") /* Guinea-Bissau */
DEFINE_INT_CURR("GYD ") /* Guyana */
DEFINE_INT_CURR("HKD ") /* Hong Kong */
DEFINE_INT_CURR("HNL ") /* Honduras */
DEFINE_INT_CURR("HRD ") /* Croatia */
DEFINE_INT_CURR("HTG ") /* Haiti */
DEFINE_INT_CURR("HUF ") /* Hungary */
DEFINE_INT_CURR("IDR ") /* Indonesia */
DEFINE_INT_CURR("IEP ") /* Ireland */
DEFINE_INT_CURR("ILS ") /* Israel */
DEFINE_INT_CURR("INR ") /* India, Bhutan */
DEFINE_INT_CURR("IQD ") /* Iraq */
DEFINE_INT_CURR("IRR ") /* Iran */
DEFINE_INT_CURR("ISK ") /* Iceland */
DEFINE_INT_CURR("ITL ") /* Italy */
DEFINE_INT_CURR("JMD ") /* Jamaica */
DEFINE_INT_CURR("JOD ") /* Jordan */
DEFINE_INT_CURR("JPY ") /* Japan */
DEFINE_INT_CURR("KES ") /* Kenya */
DEFINE_INT_CURR("GRD ") /* Greek Drachma */
DEFINE_INT_CURR("GTQ ") /* Guatemala Quetzal */
DEFINE_INT_CURR("GWP ") /* Guinea-Bissau Peso */
DEFINE_INT_CURR("GYD ") /* Guyana Dollar */
DEFINE_INT_CURR("HKD ") /* Hong Kong Dollar */
DEFINE_INT_CURR("HNL ") /* Honduras Lempira */
DEFINE_INT_CURR("HRK ") /* Croatia Kuna */
DEFINE_INT_CURR("HTG ") /* Haiti Gourde */
DEFINE_INT_CURR("HUF ") /* Hungarian Forint */
DEFINE_INT_CURR("IDR ") /* Indonesia Rupiah */
DEFINE_INT_CURR("IEP ") /* Irish Punt */
DEFINE_INT_CURR("ILS ") /* Israeli Shekel */
DEFINE_INT_CURR("INR ") /* Indian Rupee (Bhutan) */
DEFINE_INT_CURR("IQD ") /* Iraqi Dinar */
DEFINE_INT_CURR("IRR ") /* Iranian Rial */
DEFINE_INT_CURR("ISK ") /* Iceland Krona */
DEFINE_INT_CURR("ITL ") /* Italian Lira (San Marino, Vatican City) */
DEFINE_INT_CURR("JMD ") /* Jamaica Dollar */
DEFINE_INT_CURR("JOD ") /* Jordanian Dollar */
DEFINE_INT_CURR("JPY ") /* Japanese Yen */
DEFINE_INT_CURR("KES ") /* Kenyan Shilling */
DEFINE_INT_CURR("KGS ") /* Kyrgyzstan Som */
DEFINE_INT_CURR("KHR ") /* Democratic Kampuchea */
DEFINE_INT_CURR("KMF ") /* Comoros */
DEFINE_INT_CURR("KMF ") /* Comoros Franc */
DEFINE_INT_CURR("KPW ") /* Democratic People's of Korea */
DEFINE_INT_CURR("KRW ") /* Republic of Korea */
DEFINE_INT_CURR("KWD ") /* Kuwait */
DEFINE_INT_CURR("KRW ") /* Republic of Korea Won */
DEFINE_INT_CURR("KWD ") /* Kuwaiti Dinar */
DEFINE_INT_CURR("KYD ") /* Cayman Islands */
DEFINE_INT_CURR("LAK ") /* Lao People's Democratic Republic */
DEFINE_INT_CURR("LBP ") /* Lebanon */
DEFINE_INT_CURR("LKR ") /* Sri Lanka */
DEFINE_INT_CURR("LRD ") /* Liberia */
DEFINE_INT_CURR("LSM ") /* Lesotho */
DEFINE_INT_CURR("LTL ") /* Lithuania */
DEFINE_INT_CURR("LUF ") /* Luxembourg */
DEFINE_INT_CURR("LVL ") /* Latvia */
DEFINE_INT_CURR("LYD ") /* Libyan Arab Jamahiriya */
DEFINE_INT_CURR("MAD ") /* Morocco */
DEFINE_INT_CURR("KZT ") /* Kazakhstan Tenge */
DEFINE_INT_CURR("LAK ") /* Lao People's Democratic Republic New Kip */
DEFINE_INT_CURR("LBP ") /* Lebanese Pound */
DEFINE_INT_CURR("LKR ") /* Sri Lankan Rupee */
DEFINE_INT_CURR("LRD ") /* Liberian Dollar */
DEFINE_INT_CURR("LSM ") /* Lesotho Loti */
DEFINE_INT_CURR("LTL ") /* Lithuanian Lit */
DEFINE_INT_CURR("LUF ") /* Luxembourg Franc */
DEFINE_INT_CURR("LVL ") /* Latvia Lat */
DEFINE_INT_CURR("LYD ") /* Libyan Arab Jamahiriya Dinar */
DEFINE_INT_CURR("MAD ") /* Moroccan Dirham */
DEFINE_INT_CURR("MDL ") /* Moldova Lei */
DEFINE_INT_CURR("MGF ") /* Madagascar */
DEFINE_INT_CURR("MLF ") /* Mali */
DEFINE_INT_CURR("MNT ") /* Mongolia */
DEFINE_INT_CURR("MOP ") /* Macau */
DEFINE_INT_CURR("MRO ") /* Mauritania */
DEFINE_INT_CURR("MTP ") /* Malta */
DEFINE_INT_CURR("MUR ") /* Mauritius */
DEFINE_INT_CURR("MMK ") /* Myanmar Kyat */
DEFINE_INT_CURR("MNT ") /* Mongolia Tugrik */
DEFINE_INT_CURR("MOP ") /* Macau Pataca */
DEFINE_INT_CURR("MRO ") /* Mauritania Ouguiya */
DEFINE_INT_CURR("MTP ") /* Maltese Lira */
DEFINE_INT_CURR("MUR ") /* Mauritius Rupee */
DEFINE_INT_CURR("MVR ") /* Maldives */
DEFINE_INT_CURR("MWK ") /* Malawi */
DEFINE_INT_CURR("MXP ") /* Mexico */
DEFINE_INT_CURR("MYR ") /* Malaysia */
DEFINE_INT_CURR("MZM ") /* Mozambique */
DEFINE_INT_CURR("NGN ") /* Nigeria */
DEFINE_INT_CURR("NIC ") /* Nicaragua */
DEFINE_INT_CURR("NLG ") /* Netherlands */
DEFINE_INT_CURR("NOK ") /* Norway */
DEFINE_INT_CURR("MWK ") /* Malawi Kwacha */
DEFINE_INT_CURR("MXP ") /* Mexican Peso */
DEFINE_INT_CURR("MYR ") /* Malaysian Ringgit */
DEFINE_INT_CURR("MZM ") /* Mozambique Metical */
DEFINE_INT_CURR("NGN ") /* Nigeria Naira */
DEFINE_INT_CURR("NIC ") /* Nicaragua Cordoba */
DEFINE_INT_CURR("NLG ") /* Dutch Guilder */
DEFINE_INT_CURR("NOK ") /* Norwegian Krone */
DEFINE_INT_CURR("NPR ") /* Nepal */
DEFINE_INT_CURR("NZD ") /* New Zealand */
DEFINE_INT_CURR("OMR ") /* Oman */
DEFINE_INT_CURR("PAB ") /* Panama */
DEFINE_INT_CURR("PES ") /* Peru */
DEFINE_INT_CURR("PGK ") /* Papau New Guinea */
DEFINE_INT_CURR("PHP ") /* Philippines */
DEFINE_INT_CURR("PKR ") /* Pakistan */
DEFINE_INT_CURR("PLZ ") /* Poland */
DEFINE_INT_CURR("PTE ") /* Portugal */
DEFINE_INT_CURR("PYG ") /* Paraguay */
DEFINE_INT_CURR("NZD ") /* New Zealand Dollar */
DEFINE_INT_CURR("OMR ") /* Omani Rial */
DEFINE_INT_CURR("PAB ") /* Panamaniam Balboa */
DEFINE_INT_CURR("PEN ") /* Peruvian New Sol */
DEFINE_INT_CURR("PGK ") /* Papau New Guinea Kina */
DEFINE_INT_CURR("PHP ") /* Philippines Peso */
DEFINE_INT_CURR("PKR ") /* Pakistan Rupee */
DEFINE_INT_CURR("PLZ ") /* Polish Zloty */
DEFINE_INT_CURR("PTE ") /* Portugese Escudo */
DEFINE_INT_CURR("PYG ") /* Paraguay Guarani */
DEFINE_INT_CURR("QAR ") /* Qatar */
DEFINE_INT_CURR("ROL ") /* Romania */
DEFINE_INT_CURR("RUR ") /* Russia */
DEFINE_INT_CURR("RWF ") /* Rwanda */
DEFINE_INT_CURR("SAR ") /* Saudi Arabia */
DEFINE_INT_CURR("SBD ") /* Solomon Islands */
DEFINE_INT_CURR("SCR ") /* Seychelles */
DEFINE_INT_CURR("SDP ") /* Sudan */
DEFINE_INT_CURR("SEK ") /* Sweden */
DEFINE_INT_CURR("SGD ") /* Singapore */
DEFINE_INT_CURR("SHP ") /* St. Helena */
DEFINE_INT_CURR("SIT ") /* Slovenia */
DEFINE_INT_CURR("SLL ") /* Sierra Leone */
DEFINE_INT_CURR("SOS ") /* Somalia */
DEFINE_INT_CURR("SRG ") /* Suriname */
DEFINE_INT_CURR("STD ") /* Sao Tome and Principe */
DEFINE_INT_CURR("ROL ") /* Romanian Leu */
DEFINE_INT_CURR("RUR ") /* Russian Ruble */
DEFINE_INT_CURR("RWF ") /* Rwanda Franc */
DEFINE_INT_CURR("SAR ") /* Saudi Arabia Riyal */
DEFINE_INT_CURR("SBD ") /* Solomon Islands Dollar */
DEFINE_INT_CURR("SCR ") /* Seychelles Rupee */
DEFINE_INT_CURR("SDP ") /* Sudanese Pound */
DEFINE_INT_CURR("SEK ") /* Swedish Krona */
DEFINE_INT_CURR("SGD ") /* Singapore Dollar */
DEFINE_INT_CURR("SHP ") /* St. Helena Pound */
DEFINE_INT_CURR("SIT ") /* Slovenian Tolar */
DEFINE_INT_CURR("SKK ") /* Slovakian Koruna */
DEFINE_INT_CURR("SLL ") /* Sierra Leone Leone */
DEFINE_INT_CURR("SOS ") /* Somalia Schilling */
DEFINE_INT_CURR("SRG ") /* Suriname Guilder */
DEFINE_INT_CURR("STD ") /* Sao Tome and Principe Dobra */
DEFINE_INT_CURR("SUR ") /* Ukrainian, Byelorussion */
DEFINE_INT_CURR("SVC ") /* El Salvador */
DEFINE_INT_CURR("SYP ") /* Syrian Arab Republic */
DEFINE_INT_CURR("SZL ") /* Swaziland */
DEFINE_INT_CURR("THB ") /* Thailand */
DEFINE_INT_CURR("TND ") /* Tunisia */
DEFINE_INT_CURR("TOP ") /* Tonga */
DEFINE_INT_CURR("SVC ") /* El Salvador Colon */
DEFINE_INT_CURR("SYP ") /* Syrian Arab Republic Pound */
DEFINE_INT_CURR("SZL ") /* Swaziland Lilangeni */
DEFINE_INT_CURR("THB ") /* Thai Baht */
DEFINE_INT_CURR("TND ") /* Tunisian Dinar */
DEFINE_INT_CURR("TOP ") /* Tonga Pa'Anga */
DEFINE_INT_CURR("TPE ") /* East Timor */
DEFINE_INT_CURR("TRL ") /* Turkey */
DEFINE_INT_CURR("TRL ") /* Turkish Lira */
DEFINE_INT_CURR("TTD ") /* Trinidad and Tobago */
DEFINE_INT_CURR("TWD ") /* Taiwan, Province of China */
DEFINE_INT_CURR("TZS ") /* United Republic of Tanzania */
DEFINE_INT_CURR("UGS ") /* Uganda */
DEFINE_INT_CURR("USD ") /* United States */
DEFINE_INT_CURR("UYP ") /* Uruguay */
DEFINE_INT_CURR("VEB ") /* Venezuela */
DEFINE_INT_CURR("VND ") /* Viet Nam */
DEFINE_INT_CURR("VUV ") /* Vanuatu */
DEFINE_INT_CURR("TWD ") /* Taiwan, Province of China Dollar */
DEFINE_INT_CURR("TZS ") /* United Republic of Tanzania Shilling */
DEFINE_INT_CURR("UAK ") /* Ukraine Hryvna */
DEFINE_INT_CURR("UGS ") /* Ugandan Shilling */
DEFINE_INT_CURR("USD ") /* United States Dollar */
DEFINE_INT_CURR("UYP ") /* Uruguay Peso */
DEFINE_INT_CURR("UZS ") /* Uzbekistan Sum */
DEFINE_INT_CURR("VEB ") /* Venezuelan Bolivar */
DEFINE_INT_CURR("VND ") /* Viet Nam Dong */
DEFINE_INT_CURR("VUV ") /* Vanuatu Dong */
DEFINE_INT_CURR("WST ") /* Samoa */
DEFINE_INT_CURR("XAF ") /* United Republic of Cameroon, Central African Republic, Chad, Congo, Gabon */
DEFINE_INT_CURR("XCD ") /* Antiqua, Dominica, Grenada, Montserrat, St. Kitts-Nevis-Anguilla, Saint Lucia, Saint Vincent and the Grenadines */
DEFINE_INT_CURR("XOF ") /* Benin, Ivory Coast, Niger, Senegal, Togo, Upper Volta */
DEFINE_INT_CURR("XAF ") /* Central African Franc (United Republic of Cameroon, Central African Republic, Chad, Congo, Gabon) */
DEFINE_INT_CURR("XCD ") /* East Caribbean Dollar (Antiqua, Dominica, Grenada, Montserrat, St. Kitts-Nevis-Anguilla, Saint Lucia, Saint Vincent and the Grenadines) */
DEFINE_INT_CURR("XDS ") /* St. Christopher Dollar */
DEFINE_INT_CURR("XOF ") /* West African Franc (Benin, Ivory Coast, Niger, Senegal, Togo, Upper Volta) */
DEFINE_INT_CURR("XPF ") /* French polynesia, New Caledonia, Wallis and Futuna Islands */
DEFINE_INT_CURR("YDD ") /* Democratic Yemen */
DEFINE_INT_CURR("YER ") /* Yemen */
DEFINE_INT_CURR("YUD ") /* Yugoslavia */
DEFINE_INT_CURR("ZAL ") /* South Africa */
DEFINE_INT_CURR("YDD ") /* Yemini Dinar (Democratic Yemen) */
DEFINE_INT_CURR("YER ") /* Yemeni Rial */
DEFINE_INT_CURR("ZAL ") /* South Africa Rand */
DEFINE_INT_CURR("ZAR ") /* Lesotho, Namibia */
DEFINE_INT_CURR("ZMK ") /* Zambia */
DEFINE_INT_CURR("ZRZ ") /* Zaire */
DEFINE_INT_CURR("ZWD ") /* Zimbabwe */
DEFINE_INT_CURR("ZMK ") /* Zambian Kwacha */
DEFINE_INT_CURR("ZRZ ") /* Zaire Zaire */
DEFINE_INT_CURR("ZWD ") /* Zimbabwe Dollar */
+1 -1
View File
@@ -96,7 +96,7 @@ extern const struct locale_data *_nl_current_##category;
extern const char *const _nl_category_names[LC_ALL + 1];
extern const size_t _nl_category_name_sizes[LC_ALL + 1];
extern const struct locale_data * *const _nl_current[LC_ALL];
extern const struct locale_data * *const _nl_current[LC_ALL + 1];
/* Name of the standard locale. */
extern const char _nl_C_name[];
+3 -3
View File
@@ -72,7 +72,7 @@ charmap_read (const char *filename)
result = parse_charmap (pathnfile);
if (result == NULL)
if (result == NULL && !be_quiet)
error (0, errno, _("character map file `%s' not found"), filename);
}
@@ -171,7 +171,7 @@ parse_charmap (const char *filename)
result->mb_cur_max = 1;
if (result->mb_cur_min == 0)
result->mb_cur_min = result->mb_cur_max;
if (result->mb_cur_min > result->mb_cur_max)
if (result->mb_cur_min > result->mb_cur_max && !be_quiet)
{
error (0, 0, _("\
%s: <mb_cur_max> must be greater than <mb_cur_min>\n"),
@@ -596,7 +596,7 @@ only WIDTH definitions are allowed to follow the CHARMAP definition"));
break;
}
if (state != 91)
if (state != 91 && !be_quiet)
error (0, 0, _("%s: premature end of file"), cmfile->fname);
lr_close (cmfile);
+4 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -56,6 +56,9 @@ struct charset_t
#define ILLEGAL_CHAR_VALUE ((wchar_t) 0xffffffffu)
/* Declared in localedef.c. */
extern int be_quiet;
/* Prototypes for charmap handling functions. */
struct charset_t *charmap_read (const char *filename);
+8 -5
View File
@@ -239,7 +239,7 @@ collate_finish (struct localedef_t *locale, struct charset_t *charset)
else
value = 0;
if (value == 0)
if (value == 0 && !be_quiet)
error_at_line (0, 0, patch->fname, patch->lineno,
_("no weight defined for symbol `%s'"), patch->token);
else
@@ -256,7 +256,8 @@ collate_finish (struct localedef_t *locale, struct charset_t *charset)
\**************************************************************/
u_int32_t weight;
error (0, 0, _("no definition of `UNDEFINED'"));
if (!be_quiet)
error (0, 0, _("no definition of `UNDEFINED'"));
collate->undefined.ordering_len = collate->nrules;
weight = ++collate->order_cnt;
@@ -324,9 +325,10 @@ collate_output (struct localedef_t *locale, struct charset_t *charset,
level_best = 0xffff;
/* Compute table size. */
fputs (_("\
if (!be_quiet)
fputs (_("\
Computing table size for collation information might take a while..."),
stderr);
stderr);
for (table_size = 256; table_size < sum_best; ++table_size)
{
size_t hits[table_size];
@@ -357,7 +359,8 @@ Computing table size for collation information might take a while..."),
}
}
assert (table_best != 0xffff || level_best != 0xffff);
fputs (_(" done\n"), stderr);
if (!be_quiet)
fputs (_(" done\n"), stderr);
obstack_init (&non_simple);
obstack_init (&string_pool);
+49 -39
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -56,6 +56,9 @@ void *xrealloc (void *__ptr, size_t __n);
#define SWAPU16(w) \
((((w) >> 8) & 0xff) | (((w) & 0xff) << 8))
#define XSWAPU32(w) \
((((w) & 0xff00ff00) >> 8) | (((w) & 0xff00ff) << 8))
/* To be compatible with former implementations we for now restrict
the number of bits for character classes to 16. When compatibility
@@ -63,7 +66,7 @@ void *xrealloc (void *__ptr, size_t __n);
#define char_class_t u_int16_t
#define CHAR_CLASS_TRANS SWAPU16
#define char_class32_t u_int32_t
#define CHAR_CLASS32_TRANS SWAPU32
#define CHAR_CLASS32_TRANS XSWAPU32
/* The real definition of the struct for the LC_CTYPE locale. */
@@ -89,8 +92,8 @@ struct locale_ctype_t
#define MAX_NR_CHARMAP 16
const char *mapnames[MAX_NR_CHARMAP];
u_int32_t *map_collection[MAX_NR_CHARMAP];
u_int32_t map_collection_max[MAX_NR_CHARMAP];
u_int32_t map_collection_act[MAX_NR_CHARMAP];
size_t map_collection_max[MAX_NR_CHARMAP];
size_t map_collection_act[MAX_NR_CHARMAP];
size_t map_collection_nr;
size_t last_map_idx;
unsigned int from_map_char;
@@ -262,10 +265,11 @@ ctype_finish (struct localedef_t *locale, struct charset_t *charset)
cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);
sprintf (cp, "\\%o", value & 0xff);
error (0, 0, _("\
if (!be_quiet)
error (0, 0, _("\
character %s'%s' in class `%s' must be in class `%s'"), value > 256 ? "L" : "",
cp, valid_table[cls1].name,
valid_table[cls2].name);
cp, valid_table[cls1].name,
valid_table[cls2].name);
}
break;
@@ -286,10 +290,12 @@ character %s'%s' in class `%s' must be in class `%s'"), value > 256 ? "L" : "",
cp += sprintf (cp, "\\%o", (value >> 8) & 0xff);
sprintf (cp, "\\%o", value & 0xff);
error (0, 0, _("\
if (!be_quiet)
error (0, 0, _("\
character %s'%s' in class `%s' must not be in class `%s'"),
value > 256 ? "L" : "", cp,
valid_table[cls1].name, valid_table[cls2].name);
value > 256 ? "L" : "", cp,
valid_table[cls1].name,
valid_table[cls2].name);
}
break;
@@ -306,23 +312,25 @@ character %s'%s' in class `%s' must not be in class `%s'"),
/* ... and now test <SP> as a special case. */
space_value = charset_find_value (charset, "SP", 2);
if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) space_value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("character <SP> not defined in character map"));
else if ((cnt = BITPOS (tok_space),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_space)) == 0)
|| (cnt = BITPOS (tok_blank),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_blank)) == 0))
else if (((cnt = BITPOS (tok_space),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_space)) == 0)
|| (cnt = BITPOS (tok_blank),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_blank)) == 0))
&& !be_quiet)
error (0, 0, _("<SP> character not in class `%s'"),
valid_table[cnt].name);
else if ((cnt = BITPOS (tok_punct),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_punct)) != 0)
|| (cnt = BITPOS (tok_graph),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_graph))
!= 0))
else if (((cnt = BITPOS (tok_punct),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_punct)) != 0)
|| (cnt = BITPOS (tok_graph),
(ELEM (ctype, class_collection, , space_value)
& BIT (tok_graph))
!= 0))
&& !be_quiet)
error (0, 0, _("<SP> character must not be in class `%s'"),
valid_table[cnt].name);
else
@@ -934,7 +942,7 @@ set_class_defaults (struct locale_ctype_t *ctype, struct charset_t *charset)
tmp[0] = ch;
value = charset_find_value (charset, tmp, 1);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
{
error (0, 0, _("\
character `%s' not defined while needed as default value"),
@@ -998,7 +1006,7 @@ character `%s' not defined while needed as default value"),
unsigned int value;
value = charset_find_value (charset, "space", 5);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<space>");
@@ -1006,7 +1014,7 @@ character `%s' not defined while needed as default value"),
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
value = charset_find_value (charset, "form-feed", 9);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<form-feed>");
@@ -1014,7 +1022,7 @@ character `%s' not defined while needed as default value"),
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
value = charset_find_value (charset, "newline", 7);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<newline>");
@@ -1022,7 +1030,7 @@ character `%s' not defined while needed as default value"),
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
value = charset_find_value (charset, "carriage-return", 15);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<carriage-return>");
@@ -1030,7 +1038,7 @@ character `%s' not defined while needed as default value"),
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
value = charset_find_value (charset, "tab", 3);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<tab>");
@@ -1038,7 +1046,7 @@ character `%s' not defined while needed as default value"),
ELEM (ctype, class_collection, , value) |= BIT (tok_space);
value = charset_find_value (charset, "vertical-tab", 12);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<vertical-tab>");
@@ -1064,7 +1072,7 @@ character `%s' not defined while needed as default value"),
unsigned int value;
value = charset_find_value (charset, "space", 5);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<space>");
@@ -1072,7 +1080,7 @@ character `%s' not defined while needed as default value"),
ELEM (ctype, class_collection, , value) |= BIT (tok_blank);
value = charset_find_value (charset, "tab", 3);
if ((wchar_t) value == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<tab>");
@@ -1110,7 +1118,7 @@ character `%s' not defined while needed as default value"),
ctype->class_collection[cnt] |= BIT (tok_print);
space = charset_find_value (charset, "space", 5);
if (space == ILLEGAL_CHAR_VALUE)
if (space == ILLEGAL_CHAR_VALUE && !be_quiet)
error (0, 0, _("\
character `%s' not defined while needed as default value"),
"<space>");
@@ -1136,7 +1144,7 @@ character `%s' not defined while needed as default value"),
tmp[1] = (char) ch;
value_from = charset_find_value (charset, &tmp[1], 1);
if ((wchar_t) value_from == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value_from == ILLEGAL_CHAR_VALUE && !be_quiet)
{
error (0, 0, _("\
character `%s' not defined while needed as default value"),
@@ -1147,7 +1155,7 @@ character `%s' not defined while needed as default value"),
/* This conversion is implementation defined. */
tmp[1] = (char) (ch + ('A' - 'a'));
value_to = charset_find_value (charset, &tmp[1], 1);
if ((wchar_t) value_to == ILLEGAL_CHAR_VALUE)
if ((wchar_t) value_to == ILLEGAL_CHAR_VALUE && !be_quiet)
{
error (0, 0, _("\
character `%s' not defined while needed as default value"),
@@ -1195,9 +1203,10 @@ allocate_arrays (struct locale_ctype_t *ctype, struct charset_t *charset)
size_t min_total = UINT_MAX;
size_t act_size = 256;
fputs (_("\
if (!be_quiet)
fputs (_("\
Computing table size for character classes might take a while..."),
stderr);
stderr);
while (act_size < min_total)
{
@@ -1232,7 +1241,8 @@ Computing table size for character classes might take a while..."),
++act_size;
}
fprintf (stderr, _(" done\n"));
if (!be_quiet)
fprintf (stderr, _(" done\n"));
#if __BYTE_ORDER == __LITTLE_ENDIAN
+5 -5
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -77,7 +77,7 @@ messages_finish (struct localedef_t *locale)
= locale->categories[LC_MESSAGES].messages;
/* The fields YESSTR and NOSTR are optional. */
if (messages->yesexpr == NULL)
if (messages->yesexpr == NULL && !be_quiet)
error (0, 0, _("field `%s' in category `%s' undefined"),
"yesexpr", "LC_MESSAGES");
else
@@ -87,7 +87,7 @@ messages_finish (struct localedef_t *locale)
/* Test whether it are correct regular expressions. */
result = regcomp (&re, messages->yesexpr, REG_EXTENDED);
if (result != 0)
if (result != 0 && !be_quiet)
{
char errbuf[BUFSIZ];
@@ -98,7 +98,7 @@ no correct regular expression for field `%s' in category `%s': %s"),
}
}
if (messages->noexpr == NULL)
if (messages->noexpr == NULL && !be_quiet)
error (0, 0, _("field `%s' in category `%s' undefined"),
"noexpr", "LC_MESSAGES");
else
@@ -108,7 +108,7 @@ no correct regular expression for field `%s' in category `%s': %s"),
/* Test whether it are correct regular expressions. */
result = regcomp (&re, messages->noexpr, REG_EXTENDED);
if (result != 0)
if (result != 0 && !be_quiet)
{
char errbuf[BUFSIZ];
+9 -8
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -115,7 +115,7 @@ monetary_finish (struct localedef_t *locale)
= locale->categories[LC_MONETARY].monetary;
#define TEST_ELEM(cat) \
if (monetary->cat == NULL) \
if (monetary->cat == NULL && !be_quiet) \
error (0, 0, _("field `%s' in category `%s' not defined"), \
#cat, "LC_MONETARY")
@@ -129,12 +129,13 @@ monetary_finish (struct localedef_t *locale)
/* The international currency symbol must come from ISO 4217. */
if (monetary->int_curr_symbol != NULL)
{
if (strlen (monetary->int_curr_symbol) != 4)
if (strlen (monetary->int_curr_symbol) != 4 && !be_quiet)
error (0, 0, _("\
value of field `int_curr_symbol' in category `LC_MONETARY' has wrong length"));
else if (bsearch (monetary->int_curr_symbol, valid_int_curr,
NR_VALID_INT_CURR, sizeof (const char *),
(comparison_fn_t) curr_strcmp) == NULL)
(comparison_fn_t) curr_strcmp) == NULL
&& !be_quiet)
error (0, 0, _("\
value of field `int_curr_symbol' in category `LC_MONETARY' does \
not correspond to a valid name in ISO 4217"));
@@ -143,23 +144,23 @@ not correspond to a valid name in ISO 4217"));
/* The decimal point must not be empty. This is not said explicitly
in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
!= "". */
if (monetary->mon_decimal_point[0] == '\0')
if (monetary->mon_decimal_point[0] == '\0' && !be_quiet)
{
error (0, 0, _("\
value for field `%s' in category `%s' must not be the empty string"),
"mon_decimal_point", "LC_MONETARY");
}
if (monetary->mon_grouping_act == 0)
if (monetary->mon_grouping_act == 0 && !be_quiet)
error (0, 0, _("field `%s' in category `%s' not defined"),
"mon_grouping", "LC_MONETARY");
#undef TEST_ELEM
#define TEST_ELEM(cat, min, max) \
if (monetary->cat == -2) \
if (monetary->cat == -2 && !be_quiet) \
error (0, 0, _("field `%s' in category `%s' not defined"), \
#cat, "LC_MONETARY"); \
else if (monetary->cat < min || monetary->cat > max) \
else if ((monetary->cat < min || monetary->cat > max) && !be_quiet) \
error (0, 0, _("\
value for field `%s' in category `%s' must be in range %d...%d"), \
#cat, "LC_MONETARY", min, max)
+4 -4
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996 Free Software Foundation, Inc.
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -74,7 +74,7 @@ numeric_finish (struct localedef_t *locale)
struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric;
#define TEST_ELEM(cat) \
if (numeric->cat == NULL) \
if (numeric->cat == NULL && !be_quiet) \
error (0, 0, _("field `%s' in category `%s' not defined"), \
#cat, "LC_NUMERIC")
@@ -84,14 +84,14 @@ numeric_finish (struct localedef_t *locale)
/* The decimal point must not be empty. This is not said explicitly
in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
!= "". */
if (numeric->decimal_point[0] == '\0')
if (numeric->decimal_point[0] == '\0' && !be_quiet)
{
error (0, 0, _("\
value for field `%s' in category `%s' must not be the empty string"),
"decimal_point", "LC_NUMERIC");
}
if (numeric->grouping_act == 0)
if (numeric->grouping_act == 0 && !be_quiet)
error (0, 0, _("field `%s' in category `%s' not defined"),
"grouping", "LC_NUMERIC");
}
+31 -29
View File
@@ -106,10 +106,10 @@ time_finish (struct localedef_t *locale)
struct locale_time_t *time = locale->categories[LC_TIME].time;
#define TESTARR_ELEM(cat, max) \
if (time->cur_num_##cat == 0) \
if (time->cur_num_##cat == 0 && !be_quiet) \
error (0, 0, _("field `%s' in category `%s' not defined"), \
#cat, "LC_TIME"); \
else if (time->cur_num_##cat != max) \
else if (time->cur_num_##cat != max && !be_quiet) \
error (0, 0, _("field `%s' in category `%s' has not enough values"), \
#cat, "LC_TIME")
@@ -120,7 +120,7 @@ time_finish (struct localedef_t *locale)
TESTARR_ELEM (am_pm, 2);
#define TEST_ELEM(cat) \
if (time->cat == NULL) \
if (time->cat == NULL && !be_quiet) \
error (0, 0, _("field `%s' in category `%s' not defined"), \
#cat, "LC_TIME")
@@ -149,7 +149,7 @@ time_finish (struct localedef_t *locale)
memcpy (str, time->era[idx], era_len + 1);
/* First character must be + or - for the direction. */
if (*str != '+' && *str != '-')
if (*str != '+' && *str != '-' && !be_quiet)
{
error (0, 0, _("direction flag in string %d in `era' field"
" in category `%s' is not '+' nor '-'"),
@@ -159,7 +159,7 @@ time_finish (struct localedef_t *locale)
}
else
time->era_entries[idx].direction = *str;
if (*++str != ':')
if (*++str != ':' && !be_quiet)
{
error (0, 0, _("direction flag in string %d in `era' field"
" in category `%s' is not a single character"),
@@ -171,14 +171,14 @@ time_finish (struct localedef_t *locale)
/* Now the offset year. */
time->era_entries[idx].offset = strtol (str, &endp, 10);
if (endp == str)
if (endp == str && !be_quiet)
{
error (0, 0, _("illegal number for offset in string %d in"
" `era' field in category `%s'"),
idx + 1, "LC_TIME");
(void) strsep (&str, ":");
}
else if (*endp != ':')
else if (*endp != ':' && !be_quiet)
{
error (0, 0, _("garbage at end of offset value in string %d in"
" `era' field in category `%s'"),
@@ -224,7 +224,7 @@ time_finish (struct localedef_t *locale)
time->era_entries[idx].start_date[1] -= 1;
time->era_entries[idx].start_date[2] = strtol (str, &endp, 10);
if (endp == str)
if (endp == str && !be_quiet)
{
invalid_start_date:
error (0, 0, _("illegal starting date in string %d in"
@@ -232,7 +232,7 @@ time_finish (struct localedef_t *locale)
idx + 1, "LC_TIME");
(void) strsep (&str, ":");
}
else if (*endp != ':')
else if (*endp != ':' && !be_quiet)
{
garbage_start_date:
error (0, 0, _("garbage at end of starting date in string %d"
@@ -245,14 +245,15 @@ time_finish (struct localedef_t *locale)
str = endp + 1;
/* Check for valid value. */
if (time->era_entries[idx].start_date[1] < 0
|| time->era_entries[idx].start_date[1] >= 12
|| time->era_entries[idx].start_date[2] < 0
|| (time->era_entries[idx].start_date[2]
> days_per_month[time->era_entries[idx].start_date[1]])
|| (time->era_entries[idx].start_date[1] == 2
&& time->era_entries[idx].start_date[2] == 29
&& !__isleap (time->era_entries[idx].start_date[0])))
if ((time->era_entries[idx].start_date[1] < 0
|| time->era_entries[idx].start_date[1] >= 12
|| time->era_entries[idx].start_date[2] < 0
|| (time->era_entries[idx].start_date[2]
> days_per_month[time->era_entries[idx].start_date[1]])
|| (time->era_entries[idx].start_date[1] == 2
&& time->era_entries[idx].start_date[2] == 29
&& !__isleap (time->era_entries[idx].start_date[0])))
&& !be_quiet)
error (0, 0, _("starting date is illegal in"
" string %d in `era' field in"
" category `%s'"),
@@ -296,7 +297,7 @@ time_finish (struct localedef_t *locale)
time->era_entries[idx].stop_date[1] -= 1;
time->era_entries[idx].stop_date[2] = strtol (str, &endp, 10);
if (endp == str)
if (endp == str && !be_quiet)
{
invalid_stop_date:
error (0, 0, _("illegal stopping date in string %d in"
@@ -304,7 +305,7 @@ time_finish (struct localedef_t *locale)
idx + 1, "LC_TIME");
(void) strsep (&str, ":");
}
else if (*endp != ':')
else if (*endp != ':' && !be_quiet)
{
garbage_stop_date:
error (0, 0, _("garbage at end of stopping date in string %d"
@@ -317,14 +318,15 @@ time_finish (struct localedef_t *locale)
str = endp + 1;
/* Check for valid value. */
if (time->era_entries[idx].stop_date[1] < 0
|| time->era_entries[idx].stop_date[1] >= 12
|| time->era_entries[idx].stop_date[2] < 0
|| (time->era_entries[idx].stop_date[2]
> days_per_month[time->era_entries[idx].stop_date[1]])
|| (time->era_entries[idx].stop_date[1] == 2
&& time->era_entries[idx].stop_date[2] == 29
&& !__isleap (time->era_entries[idx].stop_date[0])))
if ((time->era_entries[idx].stop_date[1] < 0
|| time->era_entries[idx].stop_date[1] >= 12
|| time->era_entries[idx].stop_date[2] < 0
|| (time->era_entries[idx].stop_date[2]
> days_per_month[time->era_entries[idx].stop_date[1]])
|| (time->era_entries[idx].stop_date[1] == 2
&& time->era_entries[idx].stop_date[2] == 29
&& !__isleap (time->era_entries[idx].stop_date[0])))
&& !be_quiet)
error (0, 0, _("stopping date is illegal in"
" string %d in `era' field in"
" category `%s'"),
@@ -332,7 +334,7 @@ time_finish (struct localedef_t *locale)
}
}
if (str == NULL || *str == '\0')
if ((str == NULL || *str == '\0') && !be_quiet)
{
error (0, 0, _("missing era name in string %d in `era' field"
" in category `%s'"), idx + 1, "LC_TIME");
@@ -343,7 +345,7 @@ time_finish (struct localedef_t *locale)
{
time->era_entries[idx].name = strsep (&str, ":");
if (str == NULL || *str == '\0')
if ((str == NULL || *str == '\0') && !be_quiet)
{
error (0, 0, _("missing era format in string %d in `era'"
" field in category `%s'"),
+201 -14
View File
@@ -22,6 +22,8 @@
# include <config.h>
#endif
#include <argz.h>
#include <ctype.h>
#include <dirent.h>
#include <error.h>
#include <getopt.h>
@@ -29,11 +31,13 @@
#include <libintl.h>
#include <limits.h>
#include <locale.h>
#include <search.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include "localeinfo.h"
@@ -201,12 +205,13 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
/* `-a' requests the names of all available locales. */
if (do_all != 0)
{
setlocale (LC_COLLATE, "");
write_locales ();
exit (EXIT_SUCCESS);
}
/* `m' requests the names of all available charmaps. The names can be
used for the -f argument to localedef(3). */
used for the -f argument to localedef(1). */
if (do_charmaps != 0)
{
write_charmaps ();
@@ -263,31 +268,165 @@ Report bugs using the `glibcbug' script to <bugs@gnu.ai.mit.edu>.\n"),
}
/* Write the names of all available locales to stdout. */
/* Simple action function which prints arguments as strings. */
static void
print_names (const void *nodep, VISIT value, int level)
{
if (value == postorder || value == leaf)
puts (*(char **) nodep);
}
/* Write the names of all available locales to stdout. We have some
sources of the information: the contents of the locale directory
and the locale.alias file. To avoid duplicates and print the
result is a reasonable order we put all entries is a search tree
and print them afterwards. */
static void
write_locales (void)
{
void *all_data = NULL;
DIR *dir;
struct dirent *dirent;
char *alias_path;
size_t alias_path_len;
char *entry;
/* `POSIX' locale is always available (POSIX.2 4.34.3). */
puts ("POSIX");
#define PUT(name) tsearch ((name), &all_data, \
(int (*) (const void *, const void *)) strcoll)
dir = opendir (LOCALE_PATH);
dir = opendir (LOCALEDIR);
if (dir == NULL)
{
error (1, errno, gettext ("cannot read locale directory `%s'"),
LOCALE_PATH);
LOCALEDIR);
return;
}
/* `POSIX' locale is always available (POSIX.2 4.34.3). */
PUT ("POSIX");
/* And so is the "C" locale. */
PUT ("C");
/* Now we can look for all files in the directory. */
while ((dirent = readdir (dir)) != NULL)
if (strcmp (dirent->d_name, ".") != 0
&& strcmp (dirent->d_name, "..") != 0)
puts (dirent->d_name);
{
mode_t mode;
#ifdef _DIRENT_HAVE_D_TYPE
if (dirent->d_type != DT_UNKNOWN)
mode = DTTOIF (dirent->d_type);
else
#endif
{
struct stat st;
char buf[sizeof (LOCALEDIR) + strlen (dirent->d_name) + 1];
stpcpy (stpcpy (stpcpy (buf, LOCALEDIR), "/"), dirent->d_name);
if (stat (buf, &st) < 0)
continue;
mode = st.st_mode;
}
if (S_ISDIR (mode))
PUT (strdup (dirent->d_name));
}
closedir (dir);
/* Now read the locale.alias files. */
if (argz_create_sep (LOCALE_ALIAS_PATH, ':', &alias_path, &alias_path_len))
error (1, errno, gettext ("while preparing output"));
entry = NULL;
while ((entry = argz_next (alias_path, alias_path_len, entry)))
{
static const char aliasfile[] = "/locale.alias";
FILE *fp;
char full_name[strlen (entry) + sizeof aliasfile];
stpcpy (stpcpy (full_name, entry), aliasfile);
fp = fopen (full_name, "r");
if (fp == NULL)
/* Ignore non-existing files. */
continue;
while (! feof (fp))
{
/* It is a reasonable approach to use a fix buffer here
because
a) we are only interested in the first two fields
b) these fields must be usable as file names and so must
not be that long */
char buf[BUFSIZ];
char *alias;
char *value;
char *cp;
if (fgets (buf, BUFSIZ, fp) == NULL)
/* EOF reached. */
break;
cp = buf;
/* Ignore leading white space. */
while (isspace (cp[0]))
++cp;
/* A leading '#' signals a comment line. */
if (cp[0] != '\0' && cp[0] != '#')
{
alias = cp++;
while (cp[0] != '\0' && !isspace (cp[0]))
++cp;
/* Terminate alias name. */
if (cp[0] != '\0')
*cp++ = '\0';
/* Now look for the beginning of the value. */
while (isspace (cp[0]))
++cp;
if (cp[0] != '\0')
{
value = cp++;
while (cp[0] != '\0' && !isspace (cp[0]))
++cp;
/* Terminate value. */
if (cp[0] == '\n')
{
/* This has to be done to make the following
test for the end of line possible. We are
looking for the terminating '\n' which do not
overwrite here. */
*cp++ = '\0';
*cp = '\n';
}
else if (cp[0] != '\0')
*cp++ = '\0';
/* Add the alias. */
PUT (strdup (alias));
}
}
/* Possibly not the whole line fits into the buffer.
Ignore the rest of the line. */
while (strchr (cp, '\n') == NULL)
{
cp = buf;
if (fgets (buf, BUFSIZ, fp) == NULL)
/* Make sure the inner loop will be left. The outer
loop will exit at the `feof' test. */
*cp = '\n';
}
}
fclose (fp);
}
twalk (all_data, print_names);
}
@@ -295,6 +434,7 @@ write_locales (void)
static void
write_charmaps (void)
{
void *all_data = NULL;
DIR *dir;
struct dirent *dirent;
@@ -310,9 +450,31 @@ write_charmaps (void)
while ((dirent = readdir (dir)) != NULL)
if (strcmp (dirent->d_name, ".") != 0
&& strcmp (dirent->d_name, "..") != 0)
puts (dirent->d_name);
{
mode_t mode;
#ifdef _DIRENT_HAVE_D_TYPE
if (dirent->d_type != DT_UNKNOWN)
mode = DTTOIF (dirent->d_type);
else
#endif
{
struct stat st;
char buf[sizeof (CHARMAP_PATH) + strlen (dirent->d_name) + 1];
stpcpy (stpcpy (stpcpy (buf, CHARMAP_PATH), "/"), dirent->d_name);
if (stat (buf, &st) < 0)
continue;
mode = st.st_mode;
}
if (S_ISREG (mode))
PUT (strdup (dirent->d_name));
}
closedir (dir);
twalk (all_data, print_names);
}
@@ -347,6 +509,25 @@ show_locale_vars (void)
}
/* Some of the "string" we print contain non-printable characters. We
encode them here. */
static void
print_escaped (const char *string)
{
const unsigned char *ch;
ch = string;
while ('\0' != *ch)
{
if (isprint (*ch))
putchar (*ch);
else
printf("<0x%02x>", *ch);
++ch;
}
}
/* Show the information request for NAME. */
static void
show_info (const char *name)
@@ -361,9 +542,11 @@ show_info (const char *name)
switch (item->value_type)
{
case string:
printf ("%s%s%s", show_keyword_name ? "\"" : "",
nl_langinfo (item->item_id) ? : "",
show_keyword_name ? "\"" : "");
if (show_keyword_name)
putchar ('"');
print_escaped (nl_langinfo (item->item_id) ? : "");
if (show_keyword_name)
putchar ('"');
break;
case stringarray:
{
@@ -376,11 +559,14 @@ show_info (const char *name)
for (cnt = 0; cnt < item->max - 1; ++cnt)
{
val = nl_langinfo (item->item_id + cnt);
printf ("%s;", val ? : "");
if (val != NULL)
print_escaped (val);
putchar (';');
}
val = nl_langinfo (item->item_id + cnt);
printf ("%s", val ? : "");
if (val != NULL)
print_escaped (val);
if (show_keyword_name)
putchar ('"');
@@ -411,7 +597,8 @@ show_info (const char *name)
break;
case word:
{
unsigned int val = (unsigned int) nl_langinfo (item->item_id);
unsigned int val =
(unsigned int) (unsigned long int) nl_langinfo (item->item_id);
printf ("%d", val);
}
break;
+14 -7
View File
@@ -70,6 +70,8 @@ int posix_conformance;
/* If not zero give a lot more messages. */
int verbose;
/* If not zero don't print warnings. */
int be_quiet;
/* Long options. */
@@ -81,6 +83,7 @@ static const struct option long_options[] =
{ "force", no_argument, NULL, 'c' },
{ "inputfile", required_argument, NULL, 'i' },
{ "posix", no_argument, &posix_conformance, 1 },
{ "quiet", no_argument, &be_quiet, 1 },
{ "verbose", no_argument, &verbose, 1},
{ "version", no_argument, NULL, 'V' },
{ NULL, 0, NULL, 0 }
@@ -252,27 +255,31 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
{
avail = act_add_locdef->locale->categories[cat].generic != NULL;
if (avail)
localedef->categories[cat].generic
= act_add_locdef->locale->categories[cat].generic;
{
localedef->categories[cat].generic
= act_add_locdef->locale->categories[cat].generic;
localedef->avail |= 1 << cat;
}
}
if (! avail)
{
const char *locale_names[] = { "LC_COLLATE", "LC_CTYPE",
"LC_MONETARY", "LC_NUMERIC",
"LC_TIME", "LC_MESSAGES" };
static const char *locale_names[] =
{ "LC_COLLATE", "LC_CTYPE", "LC_MONETARY",
"LC_NUMERIC", "LC_TIME", "LC_MESSAGES"
};
char *fname;
int fd;
struct stat st;
asprintf (&fname, LOCALE_PATH "/%s/%s", act_add_locdef->name,
asprintf (&fname, LOCALEDIR "/%s/%s", act_add_locdef->name,
locale_names[cat]);
fd = open (fname, O_RDONLY);
if (fd == -1)
{
free (fname);
asprintf (&fname, LOCALE_PATH "/%s/%s/SYS_%s",
asprintf (&fname, LOCALEDIR "/%s/%s/SYS_%s",
act_add_locdef->name, locale_names[cat],
locale_names[cat]);
+53 -19
View File
@@ -1,6 +1,6 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
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
@@ -26,6 +26,7 @@
#include <locale.h>
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -76,10 +77,31 @@ locfile_read (const char *filename, struct charset_t *charset)
{
if (filename[0] != '/')
{
char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)];
char *i18npath = __secure_getenv ("I18NPATH");
if (i18npath != NULL && *i18npath != '\0')
{
char path[strlen (filename) + 1 + strlen (i18npath) + 1];
char *next;
i18npath = strdupa (i18npath);
stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename);
ldfile = lr_open (path, locfile_hash);
while (ldfile == NULL
&& (next = strsep (&i18npath, ":")) != NULL)
{
stpcpy (stpcpy (stpcpy (path, next), "/"), filename);
ldfile = lr_open (path, locfile_hash);
}
}
/* Test in the default directory. */
if (ldfile == NULL)
{
char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)];
stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename);
ldfile = lr_open (path, locfile_hash);
}
}
if (ldfile == NULL)
@@ -898,17 +920,23 @@ void
check_all_categories (struct localedef_t *locale, struct charset_t *charset)
{
/* Call the finishing functions for all locales. */
if ((locale->binary & (1 << LC_CTYPE)) == 0)
if ((locale->avail & (1 << LC_CTYPE)) != 0
&& (locale->binary & (1 << LC_CTYPE)) == 0)
ctype_finish (locale, charset);
if ((locale->binary & (1 << LC_COLLATE)) == 0)
if ((locale->avail & (1 << LC_COLLATE)) != 0
&& (locale->binary & (1 << LC_COLLATE)) == 0)
collate_finish (locale, charset);
if ((locale->binary & (1 << LC_MONETARY)) == 0)
if ((locale->avail & (1 << LC_MONETARY)) != 0
&& (locale->binary & (1 << LC_MONETARY)) == 0)
monetary_finish (locale);
if ((locale->binary & (1 << LC_NUMERIC)) == 0)
if ((locale->avail & (1 << LC_NUMERIC)) != 0
&& (locale->binary & (1 << LC_NUMERIC)) == 0)
numeric_finish (locale);
if ((locale->binary & (1 << LC_TIME)) == 0)
if ((locale->avail & (1 << LC_TIME)) != 0
&& (locale->binary & (1 << LC_TIME)) == 0)
time_finish (locale);
if ((locale->binary & (1 << LC_MESSAGES)) == 0)
if ((locale->avail & (1 << LC_MESSAGES)) != 0
&& (locale->binary & (1 << LC_MESSAGES)) == 0)
messages_finish (locale);
}
@@ -918,12 +946,18 @@ write_all_categories (struct localedef_t *locale, struct charset_t *charset,
const char *output_path)
{
/* Call all functions to write locale data. */
ctype_output (locale, charset, output_path);
collate_output (locale, charset, output_path);
monetary_output (locale, output_path);
numeric_output (locale, output_path);
time_output (locale, output_path);
messages_output (locale, output_path);
if ((locale->avail & (1 << LC_CTYPE)) != 0)
ctype_output (locale, charset, output_path);
if ((locale->avail & (1 << LC_COLLATE)) != 0)
collate_output (locale, charset, output_path);
if ((locale->avail & (1 << LC_MONETARY)) != 0)
monetary_output (locale, output_path);
if ((locale->avail & (1 << LC_NUMERIC)) != 0)
numeric_output (locale, output_path);
if ((locale->avail & (1 << LC_TIME)) != 0)
time_output (locale, output_path);
if ((locale->avail & (1 << LC_MESSAGES)) != 0)
messages_output (locale, output_path);
}
@@ -981,7 +1015,7 @@ write_locale_data (const char *output_path, const char *category,
save_err = errno;
}
if (fd == -1)
if (fd == -1 && !be_quiet)
{
error (0, save_err, _("\
cannot open output file `%s' for category `%s'"),
@@ -1005,7 +1039,7 @@ cannot open output file `%s' for category `%s'"),
if (maxiov > 0)
step = MIN (maxiov, step);
if (writev (fd, &vec[cnt], step) < 0)
if (writev (fd, &vec[cnt], step) < 0 && !be_quiet)
{
error (0, errno, _("failure while writing data for category `%s'"),
category);
+3 -1
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -53,6 +53,8 @@ struct localedef_t
size_t len[6];
};
/* Declared in localedef.c. */
extern int be_quiet;
/* Found in localedef.c. */
void def_to_process (const char *name, int category);
+27 -16
View File
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1992, 1995, 1996 Free Software Foundation, Inc.
This file is part of the GNU C Library.
/* Copyright (C) 1991, 1992, 1995, 1996, 1997 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 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.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <alloca.h>
#include <argz.h>
@@ -49,6 +49,9 @@ static const struct locale_data * *const _nl_current[] =
[category] = &_nl_current_##category,
#include "categories.def"
#undef DEFINE_CATEGORY
/* We need this additional element to simplify the code. It must
simply be != NULL. */
[LC_ALL] = (const struct locale_data **) ~0ul
};
/* Array indexed by category of pointers to _nl_C_CATEGORY slots.
@@ -201,8 +204,10 @@ new_composite_name (int category, char *newnames[LC_ALL])
static inline void
setname (int category, const char *name)
{
if (_nl_current[category] == NULL
&& _nl_current_names[category] != _nl_C_name)
if (_nl_current_names[category] == name)
return;
if (category == LC_ALL && _nl_current_names[category] != _nl_C_name)
free ((void *) _nl_current_names[category]);
_nl_current_names[category] = name;
@@ -352,6 +357,9 @@ setlocale (int category, const char *locale)
/* Critical section left. */
__libc_lock_unlock (__libc_setlocale_lock);
/* Free the resources (the locale path variable. */
free (locale_path);
return composite;
}
else
@@ -391,6 +399,9 @@ setlocale (int category, const char *locale)
/* Critical section left. */
__libc_lock_unlock (__libc_setlocale_lock);
/* Free the resources (the locale path variable. */
free (locale_path);
return newname;
}
}
+7 -9
View File
@@ -55,8 +55,8 @@ typedef struct weight_t
((u_int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_RULES))
static __inline int get_weight (const STRING_TYPE **str, weight_t *result);
static __inline int
static __inline void get_weight (const STRING_TYPE **str, weight_t *result);
static __inline void
get_weight (const STRING_TYPE **str, weight_t *result)
{
unsigned int ch = *((USTRING_TYPE *) (*str))++;
@@ -86,7 +86,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
result->data[cnt].value = &__collate_extra[idx];
idx += result->data[cnt].number;
}
return 0;
return;
}
slot += level_size;
}
@@ -102,7 +102,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
result->data[cnt].number = 1;
result->data[cnt].value = &__collate_table[slot + 1 + cnt];
}
return ch == 0;
return;
}
/* We now look for any collation element which starts with CH.
@@ -135,14 +135,12 @@ get_weight (const STRING_TYPE **str, weight_t *result)
result->data[cnt].value = &__collate_extra[idx];
idx += result->data[cnt].number;
}
return 0;
return;
}
/* To next entry in list. */
slot += __collate_extra[slot];
}
/* NOTREACHED */
return 0; /* To calm down gcc. */
}
@@ -155,7 +153,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
do \
{ \
weight_t *newp; \
do \
while (*str != '\0') \
{ \
newp = (weight_t *) alloca (sizeof (weight_t) \
+ (collate_nrules \
@@ -168,7 +166,7 @@ get_weight (const STRING_TYPE **str, weight_t *result)
backw->next = newp; \
newp->next = NULL; \
backw = newp; \
get_weight (&str, newp); \
} \
while (get_weight (&str, newp) == 0); \
} \
while (0)
+7 -3
View File
@@ -1,4 +1,4 @@
# Copyright (C) 1996 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997 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
@@ -25,7 +25,7 @@ subdir := login
headers := utmp.h utmpbits.h lastlog.h pty.h
routines := getutent getutent_r getutid getutline getutid_r getutline_r \
utmp_file utmp_db
utmp_file updwtmp utmpname
distribute := utmp-private.h
@@ -35,5 +35,9 @@ extra-libs-others := $(extra-libs)
libutil-routines:= login login_tty logout logwtmp pty
include ../Rules
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
$(objpfx)libutil.so: $(common-objpfx)libc.so
+3 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -25,7 +25,7 @@ static struct utmp buffer;
struct utmp *
getutent (void)
__getutent (void)
{
struct utmp *result;
@@ -34,3 +34,4 @@ getutent (void)
return result;
}
weak_alias (__getutent, getutent)
+98 -114
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 1996 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>
and Paul Janzen <pcj@primenet.com>, 1996.
@@ -18,102 +18,126 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <assert.h>
#include <db.h>
#include <fcntl.h>
#include <libc-lock.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <utmp.h>
#include <sys/stat.h>
#include "utmp-private.h"
/* The various backends we have. */
static int __setutent_unknown (int reset);
static int __getutent_r_unknown (struct utmp *buffer, struct utmp **result);
static struct utmp *__pututline_unknown (const struct utmp *data);
static void __endutent_unknown (void);
/* Functions defined here. */
static int setutent_unknown (void);
static int getutent_r_unknown (struct utmp *buffer, struct utmp **result);
static int getutid_r_unknown (const struct utmp *line, struct utmp *buffer,
struct utmp **result);
static int getutline_r_unknown (const struct utmp *id, struct utmp *buffer,
struct utmp **result);
static struct utmp *pututline_unknown (const struct utmp *data);
static void endutent_unknown (void);
/* We have three jump tables: unknown, db, or file. */
static struct utfuncs unknown_functions =
/* Initial Jump table. */
struct utfuncs __libc_utmp_unknown_functions =
{
__setutent_unknown,
__getutent_r_unknown,
NULL,
NULL,
__pututline_unknown,
__endutent_unknown,
setutent_unknown,
getutent_r_unknown,
getutid_r_unknown,
getutline_r_unknown,
pututline_unknown,
endutent_unknown,
NULL
};
/* Currently selected backend. */
struct utfuncs *__libc_utmp_jump_table = &unknown_functions;
/* The tables from the services. */
extern struct utfuncs __libc_utmp_db_functions;
extern struct utfuncs __libc_utmp_file_functions;
struct utfuncs *__libc_utmp_jump_table = &__libc_utmp_unknown_functions;
/* We need to protect the opening of the file. */
__libc_lock_define_initialized (, __libc_utmp_lock)
static int
setutent_unknown (void)
{
int result;
result = (*__libc_utmp_file_functions.setutent) ();
if (result)
__libc_utmp_jump_table = &__libc_utmp_file_functions;
return result;
}
static int
getutent_r_unknown (struct utmp *buffer, struct utmp **result)
{
/* The backend was not yet initialized. */
if (setutent_unknown ())
return (*__libc_utmp_jump_table->getutent_r) (buffer, result);
/* Not available. */
*result = NULL;
return -1;
}
static int
getutid_r_unknown (const struct utmp *id, struct utmp *buffer,
struct utmp **result)
{
/* The backend was not yet initialized. */
if (setutent_unknown ())
return (*__libc_utmp_jump_table->getutid_r) (id, buffer, result);
/* Not available. */
*result = NULL;
return -1;
}
static int
getutline_r_unknown (const struct utmp *line, struct utmp *buffer,
struct utmp **result)
{
/* The backend was not yet initialized. */
if (setutent_unknown ())
return (*__libc_utmp_jump_table->getutline_r) (line, buffer, result);
/* Not available. */
*result = NULL;
return -1;
}
static struct utmp *
pututline_unknown (const struct utmp *data)
{
/* The backend was not yet initialized. */
if (setutent_unknown ())
return (*__libc_utmp_jump_table->pututline) (data);
/* Not available. */
return NULL;
}
static void
endutent_unknown (void)
{
/* Nothing to do. */
}
void
__setutent (void)
{
__libc_lock_lock (__libc_utmp_lock);
(void) (*__libc_utmp_jump_table->setutent) (1);
(*__libc_utmp_jump_table->setutent) ();
__libc_lock_unlock (__libc_utmp_lock);
}
weak_alias (__setutent, setutent)
static int
__setutent_unknown (int reset)
{
/* We have to test whether it is still not decided which backend to use. */
assert (__libc_utmp_jump_table == &unknown_functions);
/* See whether utmp db file exists. */
if ((*__libc_utmp_db_functions.setutent) (reset))
__libc_utmp_jump_table = &__libc_utmp_db_functions;
else
{
/* Either the db file does not exist or we have other
problems. So use the normal file. */
(*__libc_utmp_file_functions.setutent) (reset);
__libc_utmp_jump_table = &__libc_utmp_file_functions;
}
return 0;
}
void
__endutent (void)
{
__libc_lock_lock (__libc_utmp_lock);
(*__libc_utmp_jump_table->endutent) ();
__libc_lock_unlock (__libc_utmp_lock);
}
weak_alias (__endutent, endutent)
static void
__endutent_unknown (void)
{
/* Huh, how do we came here? Nothing to do. */
}
int
__getutent_r (struct utmp *buffer, struct utmp **result)
{
@@ -130,16 +154,6 @@ __getutent_r (struct utmp *buffer, struct utmp **result)
weak_alias (__getutent_r, getutent_r)
static int
__getutent_r_unknown (struct utmp *buffer, struct utmp **result)
{
/* It is not yet initialized. */
__setutent_unknown (0);
return (*__libc_utmp_jump_table->getutent_r) (buffer, result);
}
struct utmp *
__pututline (const struct utmp *data)
{
@@ -156,44 +170,14 @@ __pututline (const struct utmp *data)
weak_alias (__pututline, pututline)
static struct utmp *
__pututline_unknown (const struct utmp *data)
void
__endutent (void)
{
/* It is not yet initialized. */
__setutent_unknown (0);
return (*__libc_utmp_jump_table->pututline) (data);
}
int
__utmpname (const char *file)
{
int result = -1;
__libc_lock_lock (__libc_utmp_lock);
/* Close the old file. */
(*__libc_utmp_jump_table->endutent) ();
/* Store new names. */
if ((*__libc_utmp_file_functions.utmpname) (file) == 0
&& !(*__libc_utmp_db_functions.utmpname) (file) == 0)
{
/* Try to find out whether we are supposed to work with a db
file or not. Do this by looking for the extension ".db". */
const char *ext = strrchr (file, '.');
if (ext != NULL && strcmp (ext, ".db") == 0)
__libc_utmp_jump_table = &__libc_utmp_db_functions;
else
__libc_utmp_jump_table = &unknown_functions;
result = 0;
}
__libc_utmp_jump_table = &__libc_utmp_unknown_functions;
__libc_lock_unlock (__libc_utmp_lock);
return result;
}
weak_alias (__utmpname, utmpname)
weak_alias (__endutent, endutent)

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